diff options
Diffstat (limited to 'src/js/out/modules/node/stream.js')
-rw-r--r-- | src/js/out/modules/node/stream.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/out/modules/node/stream.js b/src/js/out/modules/node/stream.js index 533cf8a04..06727e66e 100644 --- a/src/js/out/modules/node/stream.js +++ b/src/js/out/modules/node/stream.js @@ -1,2 +1,2 @@ -var wq=function(q){if(!(this instanceof wq))return new wq(q);bq.call(this,q);const Q=q.__id;if(Q)fq(this,"__id",{value:Q,readable:!0,writable:!1,enumerable:!1})},dq=function(q){return typeof q==="object"&&q!==null&&q instanceof ReadableStream},lq=function(q,Q){if(typeof q!=="boolean")throw new nq(Q,"boolean",q)};var nq=function(q,Q,X){return new Error(`The argument '${q}' is invalid. Received '${X}' for type '${Q}'`)},oq=function(q,Q,X){return new Error(`The value '${Q}' is invalid for argument '${q}'. Reason: ${X}`)},jQ=function(q,Q){var[X,J,H,Z,K,B,Y]=globalThis[Symbol.for("Bun.lazy")](q),$=[!1],z=function(j,L,N,W){if(L>0){const P=N.subarray(0,L),I=N.subarray(L);if(P.byteLength>0)j.push(P);if(W)j.push(null);return I.byteLength>0?I:void 0}if(W)j.push(null);return N},V=function(j,L,N,W){if(L.byteLength>0)j.push(L);if(W)j.push(null);return N},G=process.env.BUN_DISABLE_DYNAMIC_CHUNK_SIZE!=="1";const U=new FinalizationRegistry((j)=>j&&K(j)),F=512;var M=class j extends Q{#q;#Q=1;#X=!1;#J=void 0;#H;#Z=!1;#K=!G;#B;constructor(L,N={}){super(N);if(typeof N.highWaterMark==="number")this.#H=N.highWaterMark;else this.#H=262144;this.#q=L,this.#X=!1,this.#J=void 0,this.#Z=!1,this.#B={},U.register(this,this.#q,this.#B)}_read(L){if(xq&&Iq("NativeReadable._read",this.__id),this.#Z){xq&&Iq("pendingRead is true",this.__id);return}var N=this.#q;if(xq&&Iq("ptr @ NativeReadable._read",N,this.__id),N===0){this.push(null);return}if(!this.#X)xq&&Iq("NativeReadable not constructed yet",this.__id),this.#Y(N);return this.#V(this.#$(L),N)}#Y(L){this.#X=!0;const N=J(L,this.#H);if(xq&&Iq("NativeReadable internal `start` result",N,this.__id),typeof N==="number"&&N>1)this.#K=!0,xq&&Iq("NativeReadable resized",this.__id),this.#H=Math.min(this.#H,N);if(Y){const W=Y(L);if(xq&&Iq("NativeReadable drain result",W,this.__id),(W?.byteLength??0)>0)this.push(W)}}#$(L=this.#H){var N=this.#J;if(xq&&Iq("chunk @ #getRemainingChunk",N,this.__id),N?.byteLength??0<F){var W=L>F?L:F;this.#J=N=new Buffer(W)}return N}push(L,N){return xq&&Iq("NativeReadable push -- result, encoding",L,N,this.__id),super.push(...arguments)}#z(L,N,W){if(xq&&Iq("result, isClosed @ #handleResult",L,W,this.__id),typeof L==="number"){if(L>=this.#H&&!this.#K&&!W)this.#H*=2,this.#K=!0;return z(this,L,N,W)}else if(typeof L==="boolean")return this.push(null),N?.byteLength??0>0?N:void 0;else if(ArrayBuffer.isView(L)){if(L.byteLength>=this.#H&&!this.#K&&!W)this.#H*=2,this.#K=!0,xq&&Iq("Resized",this.__id);return V(this,L,N,W)}else throw xq&&Iq("Unknown result type",L,this.__id),new Error("Invalid result from pull")}#V(L,N){xq&&Iq("#internalRead()",this.__id),$[0]=!1;var W=X(N,L,$);if(Cq(W))return this.#Z=!0,W.then((P)=>{this.#Z=!1,xq&&Iq("pending no longerrrrrrrr (result returned from pull)",this.__id),this.#J=this.#z(P,L,$[0])},(P)=>{xq&&Iq("error from pull",P,this.__id),errorOrDestroy(this,P)});else this.#J=this.#z(W,L,$[0])}_destroy(L,N){var W=this.#q;if(W===0){N(L);return}if(U.unregister(this.#B),this.#q=0,B)B(W,!1);xq&&Iq("NativeReadable destroyed",this.__id),H(W,L),N(L)}ref(){var L=this.#q;if(L===0)return;if(this.#Q++===0)B(L,!0)}unref(){var L=this.#q;if(L===0)return;if(this.#Q--===1)B(L,!1)}};if(!B)M.prototype.ref=void 0,M.prototype.unref=void 0;return M},NQ=function(q,Q){return LQ[q]||=jQ(q,Q)},WQ=function(q,Q,X){if(!(Q&&typeof Q==="object"&&Q instanceof ReadableStream))return;const J=gq(Q);if(!J){Iq("no native readable stream");return}const{stream:H,data:Z}=J;return new(NQ(Z,q))(H,X)},{isPromise:Cq,isCallable:Rq,direct:gq,Object:Oq}=import.meta.primordials;globalThis.__IDS_TO_TRACK=process.env.DEBUG_TRACK_EE?.length?process.env.DEBUG_TRACK_EE.split(","):process.env.DEBUG_STREAMS?.length?process.env.DEBUG_STREAMS.split(","):null;var Sq=!!process.env.DEBUG_TRACK_EE,xq=!!(process.env.DEBUG||process.env.DEBUG_STREAMS||Sq),Iq=xq?globalThis.__IDS_TO_TRACK?(...q)=>{const Q=q[q.length-1];if(!globalThis.__IDS_TO_TRACK.includes(Q))return;console.log(`ID: ${Q}`,...q.slice(0,-1))}:(...q)=>console.log(...q.slice(0,-1)):()=>{},kq=Oq.create,fq=Oq.defineProperty,yq=Oq.getOwnPropertyDescriptor,hq=Oq.getOwnPropertyNames,pq=Oq.getPrototypeOf,uq=Oq.prototype.hasOwnProperty,mq=Oq.setPrototypeOf,Eq=(q)=>import.meta.require(q),bq=Eq("bun:events_native");mq(wq.prototype,bq.prototype);mq(wq,bq);wq.prototype.emit=function(q,...Q){var X=this.__id;if(X)Iq("emit",q,...Q,X);else Iq("emit",q,...Q);return bq.prototype.emit.call(this,q,...Q)};wq.prototype.on=function(q,Q){var X=this.__id;if(X)Iq("on",q,"added",X);else Iq("on",q,"added");return bq.prototype.on.call(this,q,Q)};wq.prototype.addListener=function(q,Q){return this.on(q,Q)};var cq=(q,Q)=>function X(){return Q||(0,q[hq(q)[0]])((Q={exports:{}}).exports,Q),Q.exports};var Aq=process.nextTick;var iq=Array.isArray,Dq=cq({"node_modules/readable-stream/lib/ours/primordials.js"(q,Q){Q.exports={ArrayIsArray(X){return Array.isArray(X)},ArrayPrototypeIncludes(X,J){return X.includes(J)},ArrayPrototypeIndexOf(X,J){return X.indexOf(J)},ArrayPrototypeJoin(X,J){return X.join(J)},ArrayPrototypeMap(X,J){return X.map(J)},ArrayPrototypePop(X,J){return X.pop(J)},ArrayPrototypePush(X,J){return X.push(J)},ArrayPrototypeSlice(X,J,H){return X.slice(J,H)},Error,FunctionPrototypeCall(X,J,...H){return X.call(J,...H)},FunctionPrototypeSymbolHasInstance(X,J){return Function.prototype[Symbol.hasInstance].call(X,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(X,J){return Oq.defineProperties(X,J)},ObjectDefineProperty(X,J,H){return Oq.defineProperty(X,J,H)},ObjectGetOwnPropertyDescriptor(X,J){return Oq.getOwnPropertyDescriptor(X,J)},ObjectKeys(X){return Oq.keys(X)},ObjectSetPrototypeOf(X,J){return Oq.setPrototypeOf(X,J)},Promise,PromisePrototypeCatch(X,J){return X.catch(J)},PromisePrototypeThen(X,J,H){return X.then(J,H)},PromiseReject(X){return Promise.reject(X)},ReflectApply:Reflect.apply,RegExpPrototypeTest(X,J){return X.test(J)},SafeSet:Set,String,StringPrototypeSlice(X,J,H){return X.slice(J,H)},StringPrototypeToLowerCase(X){return X.toLowerCase()},StringPrototypeToUpperCase(X){return X.toUpperCase()},StringPrototypeTrim(X){return X.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(X,J,H){return X.set(J,H)},Uint8Array}}}),_q=cq({"node_modules/readable-stream/lib/ours/util.js"(q,Q){var X=Eq("buffer"),J=Oq.getPrototypeOf(async function(){}).constructor,H=globalThis.Blob||X.Blob,Z=typeof H!=="undefined"?function B(Y){return Y instanceof H}:function B(Y){return!1},K=class extends Error{constructor(B){if(!Array.isArray(B))throw new TypeError(`Expected input to be an Array, got ${typeof B}`);let Y="";for(let $=0;$<B.length;$++)Y+=` ${B[$].stack} -`;super(Y);this.name="AggregateError",this.errors=B}};Q.exports={AggregateError:K,once(B){let Y=!1;return function(...$){if(Y)return;Y=!0,B.apply(this,$)}},createDeferredPromise:function(){let B,Y;return{promise:new Promise((z,V)=>{B=z,Y=V}),resolve:B,reject:Y}},promisify(B){return new Promise((Y,$)=>{B((z,...V)=>{if(z)return $(z);return Y(...V)})})},debuglog(){return function(){}},format(B,...Y){return B.replace(/%([sdifj])/g,function(...[$,z]){const V=Y.shift();if(z==="f")return V.toFixed(6);else if(z==="j")return JSON.stringify(V);else if(z==="s"&&typeof V==="object")return`${V.constructor!==Oq?V.constructor.name:""} {}`.trim();else return V.toString()})},inspect(B){switch(typeof B){case"string":if(B.includes("'")){if(!B.includes('"'))return`"${B}"`;else if(!B.includes("`")&&!B.includes("${"))return`\`${B}\``}return`'${B}'`;case"number":if(isNaN(B))return"NaN";else if(Oq.is(B,-0))return String(B);return B;case"bigint":return`${String(B)}n`;case"boolean":case"undefined":return String(B);case"object":return"{}"}},types:{isAsyncFunction(B){return B instanceof J},isArrayBufferView(B){return ArrayBuffer.isView(B)}},isBlob:Z},Q.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}}),sq=cq({"node_modules/readable-stream/lib/ours/errors.js"(q,Q){var{format:X,inspect:J,AggregateError:H}=_q(),Z=globalThis.AggregateError||H,K=Symbol("kIsNodeError"),B=["string","function","number","object","Function","Object","boolean","bigint","symbol"],Y=/^([A-Z][a-z0-9]*)+$/,$="__node_internal_",z={};function V(N,W){if(!N)throw new z.ERR_INTERNAL_ASSERTION(W)}function G(N){let W="",P=N.length;const I=N[0]==="-"?1:0;for(;P>=I+4;P-=3)W=`_${N.slice(P-3,P)}${W}`;return`${N.slice(0,P)}${W}`}function U(N,W,P){if(typeof W==="function")return V(W.length<=P.length,`Code: ${N}; The provided arguments length (${P.length}) does not match the required ones (${W.length}).`),W(...P);const I=(W.match(/%[dfijoOs]/g)||[]).length;if(V(I===P.length,`Code: ${N}; The provided arguments length (${P.length}) does not match the required ones (${I}).`),P.length===0)return W;return X(W,...P)}function F(N,W,P){if(!P)P=Error;class I extends P{constructor(...x){super(U(N,W,x))}toString(){return`${this.name} [${N}]: ${this.message}`}}Oq.defineProperties(I.prototype,{name:{value:P.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${N}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),I.prototype.code=N,I.prototype[K]=!0,z[N]=I}function M(N){const W=$+N.name;return Oq.defineProperty(N,"name",{value:W}),N}function j(N,W){if(N&&W&&N!==W){if(Array.isArray(W.errors))return W.errors.push(N),W;const P=new Z([W,N],W.message);return P.code=W.code,P}return N||W}var L=class extends Error{constructor(N="The operation was aborted",W=void 0){if(W!==void 0&&typeof W!=="object")throw new z.ERR_INVALID_ARG_TYPE("options","Object",W);super(N,W);this.code="ABORT_ERR",this.name="AbortError"}};F("ERR_ASSERTION","%s",Error),F("ERR_INVALID_ARG_TYPE",(N,W,P)=>{if(V(typeof N==="string","'name' must be a string"),!Array.isArray(W))W=[W];let I="The ";if(N.endsWith(" argument"))I+=`${N} `;else I+=`"${N}" ${N.includes(".")?"property":"argument"} `;I+="must be ";const x=[],T=[],A=[];for(let C of W)if(V(typeof C==="string","All expected entries have to be of type string"),B.includes(C))x.push(C.toLowerCase());else if(Y.test(C))T.push(C);else V(C!=="object",'The value "object" should be written as "Object"'),A.push(C);if(T.length>0){const C=x.indexOf("object");if(C!==-1)x.splice(x,C,1),T.push("Object")}if(x.length>0){switch(x.length){case 1:I+=`of type ${x[0]}`;break;case 2:I+=`one of type ${x[0]} or ${x[1]}`;break;default:{const C=x.pop();I+=`one of type ${x.join(", ")}, or ${C}`}}if(T.length>0||A.length>0)I+=" or "}if(T.length>0){switch(T.length){case 1:I+=`an instance of ${T[0]}`;break;case 2:I+=`an instance of ${T[0]} or ${T[1]}`;break;default:{const C=T.pop();I+=`an instance of ${T.join(", ")}, or ${C}`}}if(A.length>0)I+=" or "}switch(A.length){case 0:break;case 1:if(A[0].toLowerCase()!==A[0])I+="an ";I+=`${A[0]}`;break;case 2:I+=`one of ${A[0]} or ${A[1]}`;break;default:{const C=A.pop();I+=`one of ${A.join(", ")}, or ${C}`}}if(P==null)I+=`. Received ${P}`;else if(typeof P==="function"&&P.name)I+=`. Received function ${P.name}`;else if(typeof P==="object"){var O;if((O=P.constructor)!==null&&O!==void 0&&O.name)I+=`. Received an instance of ${P.constructor.name}`;else{const C=J(P,{depth:-1});I+=`. Received ${C}`}}else{let C=J(P,{colors:!1});if(C.length>25)C=`${C.slice(0,25)}...`;I+=`. Received type ${typeof P} (${C})`}return I},TypeError),F("ERR_INVALID_ARG_VALUE",(N,W,P="is invalid")=>{let I=J(W);if(I.length>128)I=I.slice(0,128)+"...";return`The ${N.includes(".")?"property":"argument"} '${N}' ${P}. Received ${I}`},TypeError),F("ERR_INVALID_RETURN_VALUE",(N,W,P)=>{var I;const x=P!==null&&P!==void 0&&(I=P.constructor)!==null&&I!==void 0&&I.name?`instance of ${P.constructor.name}`:`type ${typeof P}`;return`Expected ${N} to be returned from the "${W}" function but got ${x}.`},TypeError),F("ERR_MISSING_ARGS",(...N)=>{V(N.length>0,"At least one arg needs to be specified");let W;const P=N.length;switch(N=(Array.isArray(N)?N:[N]).map((I)=>`"${I}"`).join(" or "),P){case 1:W+=`The ${N[0]} argument`;break;case 2:W+=`The ${N[0]} and ${N[1]} arguments`;break;default:{const I=N.pop();W+=`The ${N.join(", ")}, and ${I} arguments`}break}return`${W} must be specified`},TypeError),F("ERR_OUT_OF_RANGE",(N,W,P)=>{V(W,'Missing "range" argument');let I;if(Number.isInteger(P)&&Math.abs(P)>4294967296)I=G(String(P));else if(typeof P==="bigint"){if(I=String(P),P>2n**32n||P<-(2n**32n))I=G(I);I+="n"}else I=J(P);return`The value of "${N}" is out of range. It must be ${W}. Received ${I}`},RangeError),F("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),F("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),F("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),F("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),F("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),F("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),F("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),F("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),F("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),F("ERR_STREAM_WRITE_AFTER_END","write after end",Error),F("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),Q.exports={AbortError:L,aggregateTwoErrors:M(j),hideStackFrames:M,codes:z}}}),aq=cq({"node_modules/readable-stream/lib/internal/validators.js"(q,Q){var{ArrayIsArray:X,ArrayPrototypeIncludes:J,ArrayPrototypeJoin:H,ArrayPrototypeMap:Z,NumberIsInteger:K,NumberMAX_SAFE_INTEGER:B,NumberMIN_SAFE_INTEGER:Y,NumberParseInt:$,RegExpPrototypeTest:z,String:V,StringPrototypeToUpperCase:G,StringPrototypeTrim:U}=Dq(),{hideStackFrames:F,codes:{ERR_SOCKET_BAD_PORT:M,ERR_INVALID_ARG_TYPE:j,ERR_INVALID_ARG_VALUE:L,ERR_OUT_OF_RANGE:N,ERR_UNKNOWN_SIGNAL:W}}=sq(),{normalizeEncoding:P}=_q(),{isAsyncFunction:I,isArrayBufferView:x}=_q().types,T={};function A(i){return i===(i|0)}function O(i){return i===i>>>0}var C=/^[0-7]+$/,E="must be a 32-bit unsigned integer or an octal string";function w(i,n,o){if(typeof i==="undefined")i=o;if(typeof i==="string"){if(!z(C,i))throw new L(n,i,E);i=$(i,8)}return _(i,n,0,4294967295),i}var D=F((i,n,o=Y,s=B)=>{if(typeof i!=="number")throw new j(n,"number",i);if(!K(i))throw new N(n,"an integer",i);if(i<o||i>s)throw new N(n,`>= ${o} && <= ${s}`,i)}),_=F((i,n,o=-2147483648,s=2147483647)=>{if(typeof i!=="number")throw new j(n,"number",i);if(!A(i)){if(!K(i))throw new N(n,"an integer",i);throw new N(n,`>= ${o} && <= ${s}`,i)}if(i<o||i>s)throw new N(n,`>= ${o} && <= ${s}`,i)}),v=F((i,n,o)=>{if(typeof i!=="number")throw new j(n,"number",i);if(!O(i)){if(!K(i))throw new N(n,"an integer",i);throw new N(n,`>= ${o?1:0} && < 4294967296`,i)}if(o&&i===0)throw new N(n,">= 1 && < 4294967296",i)});function R(i,n){if(typeof i!=="string")throw new j(n,"string",i)}function g(i,n){if(typeof i!=="number")throw new j(n,"number",i)}var S=F((i,n,o)=>{if(!J(o,i)){const a="must be one of: "+H(Z(o,(r)=>typeof r==="string"?`'${r}'`:V(r)),", ");throw new L(n,i,a)}});function k(i,n){if(typeof i!=="boolean")throw new j(n,"boolean",i)}var f=F((i,n,o)=>{const s=o==null,a=s?!1:o.allowArray,r=s?!1:o.allowFunction;if(!(s?!1:o.nullable)&&i===null||!a&&X(i)||typeof i!=="object"&&(!r||typeof i!=="function"))throw new j(n,"Object",i)}),y=F((i,n,o=0)=>{if(!X(i))throw new j(n,"Array",i);if(i.length<o){const s=`must be longer than ${o}`;throw new L(n,i,s)}});function h(i,n="signal"){if(R(i,n),T[i]===void 0){if(T[G(i)]!==void 0)throw new W(i+" (signals must use all capital letters)");throw new W(i)}}var p=F((i,n="buffer")=>{if(!x(i))throw new j(n,["Buffer","TypedArray","DataView"],i)});function u(i,n){const o=P(n),s=i.length;if(o==="hex"&&s%2!==0)throw new L("encoding",n,`is invalid for data of length ${s}`)}function m(i,n="Port",o=!0){if(typeof i!=="number"&&typeof i!=="string"||typeof i==="string"&&U(i).length===0||+i!==+i>>>0||i>65535||i===0&&!o)throw new M(n,i,o);return i|0}var b=F((i,n)=>{if(i!==void 0&&(i===null||typeof i!=="object"||!("aborted"in i)))throw new j(n,"AbortSignal",i)}),c=F((i,n)=>{if(typeof i!=="function")throw new j(n,"Function",i)}),d=F((i,n)=>{if(typeof i!=="function"||I(i))throw new j(n,"Function",i)}),l=F((i,n)=>{if(i!==void 0)throw new j(n,"undefined",i)});Q.exports={isInt32:A,isUint32:O,parseFileMode:w,validateArray:y,validateBoolean:k,validateBuffer:p,validateEncoding:u,validateFunction:c,validateInt32:_,validateInteger:D,validateNumber:g,validateObject:f,validateOneOf:S,validatePlainFunction:d,validatePort:m,validateSignalName:h,validateString:R,validateUint32:v,validateUndefined:l,validateAbortSignal:b}}}),rq=cq({"node_modules/readable-stream/lib/internal/streams/utils.js"(q,Q){var{Symbol:X,SymbolAsyncIterator:J,SymbolIterator:H}=Dq(),Z=X("kDestroyed"),K=X("kIsErrored"),B=X("kIsReadable"),Y=X("kIsDisturbed");function $(v,R=!1){var g;return!!(v&&typeof v.pipe==="function"&&typeof v.on==="function"&&(!R||typeof v.pause==="function"&&typeof v.resume==="function")&&(!v._writableState||((g=v._readableState)===null||g===void 0?void 0:g.readable)!==!1)&&(!v._writableState||v._readableState))}function z(v){var R;return!!(v&&typeof v.write==="function"&&typeof v.on==="function"&&(!v._readableState||((R=v._writableState)===null||R===void 0?void 0:R.writable)!==!1))}function V(v){return!!(v&&typeof v.pipe==="function"&&v._readableState&&typeof v.on==="function"&&typeof v.write==="function")}function G(v){return v&&(v._readableState||v._writableState||typeof v.write==="function"&&typeof v.on==="function"||typeof v.pipe==="function"&&typeof v.on==="function")}function U(v,R){if(v==null)return!1;if(R===!0)return typeof v[J]==="function";if(R===!1)return typeof v[H]==="function";return typeof v[J]==="function"||typeof v[H]==="function"}function F(v){if(!G(v))return null;const{_writableState:R,_readableState:g}=v,S=R||g;return!!(v.destroyed||v[Z]||S!==null&&S!==void 0&&S.destroyed)}function M(v){if(!z(v))return null;if(v.writableEnded===!0)return!0;const R=v._writableState;if(R!==null&&R!==void 0&&R.errored)return!1;if(typeof(R===null||R===void 0?void 0:R.ended)!=="boolean")return null;return R.ended}function j(v,R){if(!z(v))return null;if(v.writableFinished===!0)return!0;const g=v._writableState;if(g!==null&&g!==void 0&&g.errored)return!1;if(typeof(g===null||g===void 0?void 0:g.finished)!=="boolean")return null;return!!(g.finished||R===!1&&g.ended===!0&&g.length===0)}function L(v){if(!$(v))return null;if(v.readableEnded===!0)return!0;const R=v._readableState;if(!R||R.errored)return!1;if(typeof(R===null||R===void 0?void 0:R.ended)!=="boolean")return null;return R.ended}function N(v,R){if(!$(v))return null;const g=v._readableState;if(g!==null&&g!==void 0&&g.errored)return!1;if(typeof(g===null||g===void 0?void 0:g.endEmitted)!=="boolean")return null;return!!(g.endEmitted||R===!1&&g.ended===!0&&g.length===0)}function W(v){if(v&&v[B]!=null)return v[B];if(typeof(v===null||v===void 0?void 0:v.readable)!=="boolean")return null;if(F(v))return!1;return $(v)&&v.readable&&!N(v)}function P(v){if(typeof(v===null||v===void 0?void 0:v.writable)!=="boolean")return null;if(F(v))return!1;return z(v)&&v.writable&&!M(v)}function I(v,R){if(!G(v))return null;if(F(v))return!0;if((R===null||R===void 0?void 0:R.readable)!==!1&&W(v))return!1;if((R===null||R===void 0?void 0:R.writable)!==!1&&P(v))return!1;return!0}function x(v){var R,g;if(!G(v))return null;if(v.writableErrored)return v.writableErrored;return(R=(g=v._writableState)===null||g===void 0?void 0:g.errored)!==null&&R!==void 0?R:null}function T(v){var R,g;if(!G(v))return null;if(v.readableErrored)return v.readableErrored;return(R=(g=v._readableState)===null||g===void 0?void 0:g.errored)!==null&&R!==void 0?R:null}function A(v){if(!G(v))return null;if(typeof v.closed==="boolean")return v.closed;const{_writableState:R,_readableState:g}=v;if(typeof(R===null||R===void 0?void 0:R.closed)==="boolean"||typeof(g===null||g===void 0?void 0:g.closed)==="boolean")return(R===null||R===void 0?void 0:R.closed)||(g===null||g===void 0?void 0:g.closed);if(typeof v._closed==="boolean"&&O(v))return v._closed;return null}function O(v){return typeof v._closed==="boolean"&&typeof v._defaultKeepAlive==="boolean"&&typeof v._removedConnection==="boolean"&&typeof v._removedContLen==="boolean"}function C(v){return typeof v._sent100==="boolean"&&O(v)}function E(v){var R;return typeof v._consuming==="boolean"&&typeof v._dumped==="boolean"&&((R=v.req)===null||R===void 0?void 0:R.upgradeOrConnect)===void 0}function w(v){if(!G(v))return null;const{_writableState:R,_readableState:g}=v,S=R||g;return!S&&C(v)||!!(S&&S.autoDestroy&&S.emitClose&&S.closed===!1)}function D(v){var R;return!!(v&&((R=v[Y])!==null&&R!==void 0?R:v.readableDidRead||v.readableAborted))}function _(v){var R,g,S,k,f,y,h,p,u,m;return!!(v&&((R=(g=(S=(k=(f=(y=v[K])!==null&&y!==void 0?y:v.readableErrored)!==null&&f!==void 0?f:v.writableErrored)!==null&&k!==void 0?k:(h=v._readableState)===null||h===void 0?void 0:h.errorEmitted)!==null&&S!==void 0?S:(p=v._writableState)===null||p===void 0?void 0:p.errorEmitted)!==null&&g!==void 0?g:(u=v._readableState)===null||u===void 0?void 0:u.errored)!==null&&R!==void 0?R:(m=v._writableState)===null||m===void 0?void 0:m.errored))}Q.exports={kDestroyed:Z,isDisturbed:D,kIsDisturbed:Y,isErrored:_,kIsErrored:K,isReadable:W,kIsReadable:B,isClosed:A,isDestroyed:F,isDuplexNodeStream:V,isFinished:I,isIterable:U,isReadableNodeStream:$,isReadableEnded:L,isReadableFinished:N,isReadableErrored:T,isNodeStream:G,isWritable:P,isWritableNodeStream:z,isWritableEnded:M,isWritableFinished:j,isWritableErrored:x,isServerRequest:E,isServerResponse:C,willEmitClose:w}}}),tq=cq({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(q,Q){var{AbortError:X,codes:J}=sq(),{ERR_INVALID_ARG_TYPE:H,ERR_STREAM_PREMATURE_CLOSE:Z}=J,{once:K}=_q(),{validateAbortSignal:B,validateFunction:Y,validateObject:$}=aq(),{Promise:z}=Dq(),{isClosed:V,isReadable:G,isReadableNodeStream:U,isReadableFinished:F,isReadableErrored:M,isWritable:j,isWritableNodeStream:L,isWritableFinished:N,isWritableErrored:W,isNodeStream:P,willEmitClose:I}=rq();function x(C){return C.setHeader&&typeof C.abort==="function"}var T=()=>{};function A(C,E,w){var D,_;if(arguments.length===2)w=E,E={};else if(E==null)E={};else $(E,"options");Y(w,"callback"),B(E.signal,"options.signal"),w=K(w);const v=(D=E.readable)!==null&&D!==void 0?D:U(C),R=(_=E.writable)!==null&&_!==void 0?_:L(C);if(!P(C))throw new H("stream","Stream",C);const{_writableState:g,_readableState:S}=C,k=()=>{if(!C.writable)h()};let f=I(C)&&U(C)===v&&L(C)===R,y=N(C,!1);const h=()=>{if(y=!0,C.destroyed)f=!1;if(f&&(!C.readable||v))return;if(!v||p)w.call(C)};let p=F(C,!1);const u=()=>{if(p=!0,C.destroyed)f=!1;if(f&&(!C.writable||R))return;if(!R||y)w.call(C)},m=(i)=>{w.call(C,i)};let b=V(C);const c=()=>{b=!0;const i=W(C)||M(C);if(i&&typeof i!=="boolean")return w.call(C,i);if(v&&!p&&U(C,!0)){if(!F(C,!1))return w.call(C,new Z)}if(R&&!y){if(!N(C,!1))return w.call(C,new Z)}w.call(C)},d=()=>{C.req.on("finish",h)};if(x(C)){if(C.on("complete",h),!f)C.on("abort",c);if(C.req)d();else C.on("request",d)}else if(R&&!g)C.on("end",k),C.on("close",k);if(!f&&typeof C.aborted==="boolean")C.on("aborted",c);if(C.on("end",u),C.on("finish",h),E.error!==!1)C.on("error",m);if(C.on("close",c),b)Aq(c);else if(g!==null&&g!==void 0&&g.errorEmitted||S!==null&&S!==void 0&&S.errorEmitted){if(!f)Aq(c)}else if(!v&&(!f||G(C))&&(y||j(C)===!1))Aq(c);else if(!R&&(!f||j(C))&&(p||G(C)===!1))Aq(c);else if(S&&C.req&&C.aborted)Aq(c);const l=()=>{if(w=T,C.removeListener("aborted",c),C.removeListener("complete",h),C.removeListener("abort",c),C.removeListener("request",d),C.req)C.req.removeListener("finish",h);C.removeListener("end",k),C.removeListener("close",k),C.removeListener("finish",h),C.removeListener("end",u),C.removeListener("error",m),C.removeListener("close",c)};if(E.signal&&!b){const i=()=>{const n=w;l(),n.call(C,new X(void 0,{cause:E.signal.reason}))};if(E.signal.aborted)Aq(i);else{const n=w;w=K((...o)=>{E.signal.removeEventListener("abort",i),n.apply(C,o)}),E.signal.addEventListener("abort",i)}}return l}function O(C,E){return new z((w,D)=>{A(C,E,(_)=>{if(_)D(_);else w()})})}Q.exports=A,Q.exports.finished=O}}),eq=cq({"node_modules/readable-stream/lib/internal/streams/operators.js"(q,Q){var X=globalThis.AbortController||Eq("abort-controller").AbortController,{codes:{ERR_INVALID_ARG_TYPE:J,ERR_MISSING_ARGS:H,ERR_OUT_OF_RANGE:Z},AbortError:K}=sq(),{validateAbortSignal:B,validateInteger:Y,validateObject:$}=aq(),z=Dq().Symbol("kWeak"),{finished:V}=tq(),{ArrayPrototypePush:G,MathFloor:U,Number:F,NumberIsNaN:M,Promise:j,PromiseReject:L,PromisePrototypeCatch:N,Symbol:W}=Dq(),P=W("kEmpty"),I=W("kEof");function x(f,y){if(typeof f!=="function")throw new J("fn",["Function","AsyncFunction"],f);if(y!=null)$(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)B(y.signal,"options.signal");let h=1;if((y===null||y===void 0?void 0:y.concurrency)!=null)h=U(y.concurrency);return Y(h,"concurrency",1),async function*p(){var u,m;const b=new X,c=this,d=[],l=b.signal,i={signal:l},n=()=>b.abort();if(y!==null&&y!==void 0&&(u=y.signal)!==null&&u!==void 0&&u.aborted)n();y===null||y===void 0||(m=y.signal)===null||m===void 0||m.addEventListener("abort",n);let o,s,a=!1;function r(){a=!0}async function t(){try{for await(let Qq of c){var e;if(a)return;if(l.aborted)throw new K;try{Qq=f(Qq,i)}catch(Xq){Qq=L(Xq)}if(Qq===P)continue;if(typeof((e=Qq)===null||e===void 0?void 0:e.catch)==="function")Qq.catch(r);if(d.push(Qq),o)o(),o=null;if(!a&&d.length&&d.length>=h)await new j((Xq)=>{s=Xq})}d.push(I)}catch(Qq){const Xq=L(Qq);N(Xq,r),d.push(Xq)}finally{var qq;if(a=!0,o)o(),o=null;y===null||y===void 0||(qq=y.signal)===null||qq===void 0||qq.removeEventListener("abort",n)}}t();try{while(!0){while(d.length>0){const e=await d[0];if(e===I)return;if(l.aborted)throw new K;if(e!==P)yield e;if(d.shift(),s)s(),s=null}await new j((e)=>{o=e})}}finally{if(b.abort(),a=!0,s)s(),s=null}}.call(this)}function T(f=void 0){if(f!=null)$(f,"options");if((f===null||f===void 0?void 0:f.signal)!=null)B(f.signal,"options.signal");return async function*y(){let h=0;for await(let u of this){var p;if(f!==null&&f!==void 0&&(p=f.signal)!==null&&p!==void 0&&p.aborted)throw new K({cause:f.signal.reason});yield[h++,u]}}.call(this)}async function A(f,y=void 0){for await(let h of w.call(this,f,y))return!0;return!1}async function O(f,y=void 0){if(typeof f!=="function")throw new J("fn",["Function","AsyncFunction"],f);return!await A.call(this,async(...h)=>{return!await f(...h)},y)}async function C(f,y){for await(let h of w.call(this,f,y))return h;return}async function E(f,y){if(typeof f!=="function")throw new J("fn",["Function","AsyncFunction"],f);async function h(p,u){return await f(p,u),P}for await(let p of x.call(this,h,y));}function w(f,y){if(typeof f!=="function")throw new J("fn",["Function","AsyncFunction"],f);async function h(p,u){if(await f(p,u))return p;return P}return x.call(this,h,y)}var D=class extends H{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}};async function _(f,y,h){var p;if(typeof f!=="function")throw new J("reducer",["Function","AsyncFunction"],f);if(h!=null)$(h,"options");if((h===null||h===void 0?void 0:h.signal)!=null)B(h.signal,"options.signal");let u=arguments.length>1;if(h!==null&&h!==void 0&&(p=h.signal)!==null&&p!==void 0&&p.aborted){const l=new K(void 0,{cause:h.signal.reason});throw this.once("error",()=>{}),await V(this.destroy(l)),l}const m=new X,b=m.signal;if(h!==null&&h!==void 0&&h.signal){const l={once:!0,[z]:this};h.signal.addEventListener("abort",()=>m.abort(),l)}let c=!1;try{for await(let l of this){var d;if(c=!0,h!==null&&h!==void 0&&(d=h.signal)!==null&&d!==void 0&&d.aborted)throw new K;if(!u)y=l,u=!0;else y=await f(y,l,{signal:b})}if(!c&&!u)throw new D}finally{m.abort()}return y}async function v(f){if(f!=null)$(f,"options");if((f===null||f===void 0?void 0:f.signal)!=null)B(f.signal,"options.signal");const y=[];for await(let p of this){var h;if(f!==null&&f!==void 0&&(h=f.signal)!==null&&h!==void 0&&h.aborted)throw new K(void 0,{cause:f.signal.reason});G(y,p)}return y}function R(f,y){const h=x.call(this,f,y);return async function*p(){for await(let u of h)yield*u}.call(this)}function g(f){if(f=F(f),M(f))return 0;if(f<0)throw new Z("number",">= 0",f);return f}function S(f,y=void 0){if(y!=null)$(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)B(y.signal,"options.signal");return f=g(f),async function*h(){var p;if(y!==null&&y!==void 0&&(p=y.signal)!==null&&p!==void 0&&p.aborted)throw new K;for await(let m of this){var u;if(y!==null&&y!==void 0&&(u=y.signal)!==null&&u!==void 0&&u.aborted)throw new K;if(f--<=0)yield m}}.call(this)}function k(f,y=void 0){if(y!=null)$(y,"options");if((y===null||y===void 0?void 0:y.signal)!=null)B(y.signal,"options.signal");return f=g(f),async function*h(){var p;if(y!==null&&y!==void 0&&(p=y.signal)!==null&&p!==void 0&&p.aborted)throw new K;for await(let m of this){var u;if(y!==null&&y!==void 0&&(u=y.signal)!==null&&u!==void 0&&u.aborted)throw new K;if(f-- >0)yield m;else return}}.call(this)}Q.exports.streamReturningOperators={asIndexedPairs:T,drop:S,filter:w,flatMap:R,map:x,take:k},Q.exports.promiseReturningOperators={every:O,forEach:E,reduce:_,toArray:v,some:A,find:C}}}),qQ=cq({"node_modules/readable-stream/lib/internal/streams/destroy.js"(q,Q){var{aggregateTwoErrors:X,codes:{ERR_MULTIPLE_CALLBACK:J},AbortError:H}=sq(),{Symbol:Z}=Dq(),{kDestroyed:K,isDestroyed:B,isFinished:Y,isServerRequest:$}=rq(),z="#kDestroy",V="#kConstruct";function G(E,w,D){if(E){if(E.stack,w&&!w.errored)w.errored=E;if(D&&!D.errored)D.errored=E}}function U(E,w){const D=this._readableState,_=this._writableState,v=_||D;if(_&&_.destroyed||D&&D.destroyed){if(typeof w==="function")w();return this}if(G(E,_,D),_)_.destroyed=!0;if(D)D.destroyed=!0;if(!v.constructed)this.once(z,(R)=>{F(this,X(R,E),w)});else F(this,E,w);return this}function F(E,w,D){let _=!1;function v(R){if(_)return;_=!0;const{_readableState:g,_writableState:S}=E;if(G(R,S,g),S)S.closed=!0;if(g)g.closed=!0;if(typeof D==="function")D(R);if(R)Aq(M,E,R);else Aq(j,E)}try{E._destroy(w||null,v)}catch(R){v(R)}}function M(E,w){L(E,w),j(E)}function j(E){const{_readableState:w,_writableState:D}=E;if(D)D.closeEmitted=!0;if(w)w.closeEmitted=!0;if(D&&D.emitClose||w&&w.emitClose)E.emit("close")}function L(E,w){const D=E?._readableState,_=E?._writableState;if(_?.errorEmitted||D?.errorEmitted)return;if(_)_.errorEmitted=!0;if(D)D.errorEmitted=!0;E?.emit?.("error",w)}function N(){const E=this._readableState,w=this._writableState;if(E)E.constructed=!0,E.closed=!1,E.closeEmitted=!1,E.destroyed=!1,E.errored=null,E.errorEmitted=!1,E.reading=!1,E.ended=E.readable===!1,E.endEmitted=E.readable===!1;if(w)w.constructed=!0,w.destroyed=!1,w.closed=!1,w.closeEmitted=!1,w.errored=null,w.errorEmitted=!1,w.finalCalled=!1,w.prefinished=!1,w.ended=w.writable===!1,w.ending=w.writable===!1,w.finished=w.writable===!1}function W(E,w,D){const _=E?._readableState,v=E?._writableState;if(v&&v.destroyed||_&&_.destroyed)return this;if(_&&_.autoDestroy||v&&v.autoDestroy)E.destroy(w);else if(w){if(Error.captureStackTrace(w),v&&!v.errored)v.errored=w;if(_&&!_.errored)_.errored=w;if(D)Aq(L,E,w);else L(E,w)}}function P(E,w){if(typeof E._construct!=="function")return;const{_readableState:D,_writableState:_}=E;if(D)D.constructed=!1;if(_)_.constructed=!1;if(E.once(V,w),E.listenerCount(V)>1)return;Aq(I,E)}function I(E){let w=!1;function D(_){if(w){W(E,_!==null&&_!==void 0?_:new J);return}w=!0;const{_readableState:v,_writableState:R}=E,g=R||v;if(v)v.constructed=!0;if(R)R.constructed=!0;if(g.destroyed)E.emit(z,_);else if(_)W(E,_,!0);else Aq(x,E)}try{E._construct(D)}catch(_){D(_)}}function x(E){E.emit(V)}function T(E){return E&&E.setHeader&&typeof E.abort==="function"}function A(E){E.emit("close")}function O(E,w){E.emit("error",w),Aq(A,E)}function C(E,w){if(!E||B(E))return;if(!w&&!Y(E))w=new H;if($(E))E.socket=null,E.destroy(w);else if(T(E))E.abort();else if(T(E.req))E.req.abort();else if(typeof E.destroy==="function")E.destroy(w);else if(typeof E.close==="function")E.close();else if(w)Aq(O,E);else Aq(A,E);if(!E.destroyed)E[K]=!0}Q.exports={construct:P,destroyer:C,destroy:U,undestroy:N,errorOrDestroy:W}}}),QQ=cq({"node_modules/readable-stream/lib/internal/streams/legacy.js"(q,Q){var{ArrayIsArray:X,ObjectSetPrototypeOf:J}=Dq(),{EventEmitter:H}=Eq("bun:events_native"),Z;if(Sq)Z=wq;else Z=H;function K(Y){if(!(this instanceof K))return new K(Y);Z.call(this,Y)}J(K.prototype,Z.prototype),J(K,Z),K.prototype.pipe=function(Y,$){const z=this;function V(N){if(Y.writable&&Y.write(N)===!1&&z.pause)z.pause()}z.on("data",V);function G(){if(z.readable&&z.resume)z.resume()}if(Y.on("drain",G),!Y._isStdio&&(!$||$.end!==!1))z.on("end",F),z.on("close",M);let U=!1;function F(){if(U)return;U=!0,Y.end()}function M(){if(U)return;if(U=!0,typeof Y.destroy==="function")Y.destroy()}function j(N){if(L(),Z.listenerCount(this,"error")===0)this.emit("error",N)}B(z,"error",j),B(Y,"error",j);function L(){z.removeListener("data",V),Y.removeListener("drain",G),z.removeListener("end",F),z.removeListener("close",M),z.removeListener("error",j),Y.removeListener("error",j),z.removeListener("end",L),z.removeListener("close",L),Y.removeListener("close",L)}return z.on("end",L),z.on("close",L),Y.on("close",L),Y.emit("pipe",z),Y};function B(Y,$,z){if(typeof Y.prependListener==="function")return Y.prependListener($,z);if(!Y._events||!Y._events[$])Y.on($,z);else if(X(Y._events[$]))Y._events[$].unshift(z);else Y._events[$]=[z,Y._events[$]]}Q.exports={Stream:K,prependListener:B}}}),XQ=cq({"node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"(q,Q){var{AbortError:X,codes:J}=sq(),H=tq(),{ERR_INVALID_ARG_TYPE:Z}=J,K=(Y,$)=>{if(typeof Y!=="object"||!("aborted"in Y))throw new Z($,"AbortSignal",Y)};function B(Y){return!!(Y&&typeof Y.pipe==="function")}Q.exports.addAbortSignal=function Y($,z){if(K($,"signal"),!B(z))throw new Z("stream","stream.Stream",z);return Q.exports.addAbortSignalNoValidate($,z)},Q.exports.addAbortSignalNoValidate=function(Y,$){if(typeof Y!=="object"||!("aborted"in Y))return $;const z=()=>{$.destroy(new X(void 0,{cause:Y.reason}))};if(Y.aborted)z();else Y.addEventListener("abort",z),H($,()=>Y.removeEventListener("abort",z));return $}}}),JQ=cq({"node_modules/readable-stream/lib/internal/streams/state.js"(q,Q){var{MathFloor:X,NumberIsInteger:J}=Dq(),{ERR_INVALID_ARG_VALUE:H}=sq().codes;function Z(Y,$,z){return Y.highWaterMark!=null?Y.highWaterMark:$?Y[z]:null}function K(Y){return Y?16:16384}function B(Y,$,z,V){const G=Z($,V,z);if(G!=null){if(!J(G)||G<0){const U=V?`options.${z}`:"options.highWaterMark";throw new H(U,G)}return X(G)}return K(Y.objectMode)}Q.exports={getHighWaterMark:B,getDefaultHighWaterMark:K}}}),HQ=cq({"node_modules/readable-stream/lib/internal/streams/from.js"(q,Q){var{PromisePrototypeThen:X,SymbolAsyncIterator:J,SymbolIterator:H}=Dq(),{ERR_INVALID_ARG_TYPE:Z,ERR_STREAM_NULL_VALUES:K}=sq().codes;function B(Y,$,z){let V;if(typeof $==="string"||$ instanceof Buffer)return new Y({objectMode:!0,...z,read(){this.push($),this.push(null)}});let G;if($&&$[J])G=!0,V=$[J]();else if($&&$[H])G=!1,V=$[H]();else throw new Z("iterable",["Iterable"],$);const U=new Y({objectMode:!0,highWaterMark:1,...z});let F=!1;U._read=function(){if(!F)F=!0,j()},U._destroy=function(L,N){X(M(L),()=>Aq(N,L),(W)=>Aq(N,W||L))};async function M(L){const N=L!==void 0&&L!==null,W=typeof V.throw==="function";if(N&&W){const{value:P,done:I}=await V.throw(L);if(await P,I)return}if(typeof V.return==="function"){const{value:P}=await V.return();await P}}async function j(){for(;;){try{const{value:L,done:N}=G?await V.next():V.next();if(N)U.push(null);else{const W=L&&typeof L.then==="function"?await L:L;if(W===null)throw F=!1,new K;else if(U.push(W))continue;else F=!1}}catch(L){U.destroy(L)}break}}return U}Q.exports=B}}),ZQ,KQ=cq({"node_modules/readable-stream/lib/internal/streams/readable.js"(q,Q){var{ArrayPrototypeIndexOf:X,NumberIsInteger:J,NumberIsNaN:H,NumberParseInt:Z,ObjectDefineProperties:K,ObjectKeys:B,ObjectSetPrototypeOf:Y,Promise:$,SafeSet:z,SymbolAsyncIterator:V,Symbol:G}=Dq(),U=globalThis[Symbol.for("Bun.lazy")]("bun:stream").ReadableState,{EventEmitter:F}=Eq("bun:events_native"),{Stream:M,prependListener:j}=QQ();function L(Xq){if(!(this instanceof L))return new L(Xq);const Jq=this instanceof vq();if(this._readableState=new U(Xq,this,Jq),Xq){const{read:Hq,destroy:Zq,construct:Kq,signal:Bq}=Xq;if(typeof Hq==="function")this._read=Hq;if(typeof Zq==="function")this._destroy=Zq;if(typeof Kq==="function")this._construct=Kq;if(Bq&&!Jq)P(Bq,this)}M.call(this,Xq),w.construct(this,()=>{if(this._readableState.needReadable)C(this,this._readableState)})}Y(L.prototype,M.prototype),Y(L,M),L.prototype.on=function(Xq,Jq){const Hq=M.prototype.on.call(this,Xq,Jq),Zq=this._readableState;if(Xq==="data")if(Zq.readableListening=this.listenerCount("readable")>0,Zq.flowing!==!1)xq&&Iq("in flowing mode!",this.__id),this.resume();else xq&&Iq("in readable mode!",this.__id);else if(Xq==="readable"){if(xq&&Iq("readable listener added!",this.__id),!Zq.endEmitted&&!Zq.readableListening){if(Zq.readableListening=Zq.needReadable=!0,Zq.flowing=!1,Zq.emittedReadable=!1,xq&&Iq("on readable - state.length, reading, emittedReadable",Zq.length,Zq.reading,Zq.emittedReadable,this.__id),Zq.length)E(this,Zq);else if(!Zq.reading)Aq(n,this)}else if(Zq.endEmitted)xq&&Iq("end already emitted...",this.__id)}return Hq};class N extends L{#q;#Q;#X;#J;constructor(Xq,Jq){const{objectMode:Hq,highWaterMark:Zq,encoding:Kq,signal:Bq}=Xq;super({objectMode:Hq,highWaterMark:Zq,encoding:Kq,signal:Bq});this.#X=[],this.#q=void 0,this.#J=Jq,this.#Q=!1}#H(){var Xq=this.#X,Jq=0,Hq=Xq.length;for(;Jq<Hq;Jq++){const Zq=Xq[Jq];if(Xq[Jq]=void 0,!this.push(Zq,void 0))return this.#X=Xq.slice(Jq+1),!0}if(Hq>0)this.#X=[];return!1}#Z(Xq){Xq.releaseLock(),this.#q=void 0,this.#Q=!0,this.push(null);return}async _read(){xq&&Iq("ReadableFromWeb _read()",this.__id);var Xq=this.#J,Jq=this.#q;if(Xq)Jq=this.#q=Xq.getReader(),this.#J=void 0;else if(this.#H())return;var Hq;try{do{var Zq=!1,Kq;const Bq=Jq.readMany();if(Cq(Bq)){if({done:Zq,value:Kq}=await Bq,this.#Q){this.#X.push(...Kq);return}}else({done:Zq,value:Kq}=Bq);if(Zq){this.#Z(Jq);return}if(!this.push(Kq[0])){this.#X=Kq.slice(1);return}for(let Yq=1,$q=Kq.length;Yq<$q;Yq++)if(!this.push(Kq[Yq])){this.#X=Kq.slice(Yq+1);return}}while(!this.#Q)}catch(Bq){Hq=Bq}finally{if(Hq)throw Hq}}_destroy(Xq,Jq){if(!this.#Q){var Hq=this.#q;if(Hq)this.#q=void 0,Hq.cancel(Xq).finally(()=>{this.#Q=!0,Jq(Xq)});return}try{Jq(Xq)}catch(Zq){globalThis.reportError(Zq)}}}function W(Xq,Jq={}){if(!dq(Xq))throw new _("readableStream","ReadableStream",Xq);k(Jq,"options");const{highWaterMark:Hq,encoding:Zq,objectMode:Kq=!1,signal:Bq}=Jq;if(Zq!==void 0&&!Buffer.isEncoding(Zq))throw new oq(Zq,"options.encoding");return lq(Kq,"options.objectMode"),WQ(L,Xq,Jq)||new N({highWaterMark:Hq,encoding:Zq,objectMode:Kq,signal:Bq},Xq)}Q.exports=L,ZQ=N;var{addAbortSignal:P}=XQ(),I=tq();const{maybeReadMore:x,resume:T,emitReadable:A,onEofChunk:O}=globalThis[Symbol.for("Bun.lazy")]("bun:stream");function C(Xq,Jq){process.nextTick(x,Xq,Jq)}function E(Xq,Jq){xq&&Iq("NativeReadable - emitReadable",Xq.__id),A(Xq,Jq)}var w=qQ(),{aggregateTwoErrors:D,codes:{ERR_INVALID_ARG_TYPE:_,ERR_METHOD_NOT_IMPLEMENTED:v,ERR_OUT_OF_RANGE:R,ERR_STREAM_PUSH_AFTER_EOF:g,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:S}}=sq(),{validateObject:k}=aq(),{StringDecoder:f}=Eq("string_decoder"),y=HQ(),h=()=>{},{errorOrDestroy:p}=w;L.prototype.destroy=w.destroy,L.prototype._undestroy=w.undestroy,L.prototype._destroy=function(Xq,Jq){Jq(Xq)},L.prototype[F.captureRejectionSymbol]=function(Xq){this.destroy(Xq)},L.prototype.push=function(Xq,Jq){return u(this,Xq,Jq,!1)},L.prototype.unshift=function(Xq,Jq){return u(this,Xq,Jq,!0)};function u(Xq,Jq,Hq,Zq){xq&&Iq("readableAddChunk",Jq,Xq.__id);const Kq=Xq._readableState;let Bq;if(!Kq.objectMode){if(typeof Jq==="string"){if(Hq=Hq||Kq.defaultEncoding,Kq.encoding!==Hq)if(Zq&&Kq.encoding)Jq=Buffer.from(Jq,Hq).toString(Kq.encoding);else Jq=Buffer.from(Jq,Hq),Hq=""}else if(Jq instanceof Buffer)Hq="";else if(M._isUint8Array(Jq)){if(Zq||!Kq.decoder)Jq=M._uint8ArrayToBuffer(Jq);Hq=""}else if(Jq!=null)Bq=new _("chunk",["string","Buffer","Uint8Array"],Jq)}if(Bq)p(Xq,Bq);else if(Jq===null)Kq.reading=!1,O(Xq,Kq);else if(Kq.objectMode||Jq&&Jq.length>0)if(Zq)if(Kq.endEmitted)p(Xq,new S);else if(Kq.destroyed||Kq.errored)return!1;else m(Xq,Kq,Jq,!0);else if(Kq.ended)p(Xq,new g);else if(Kq.destroyed||Kq.errored)return!1;else if(Kq.reading=!1,Kq.decoder&&!Hq)if(Jq=Kq.decoder.write(Jq),Kq.objectMode||Jq.length!==0)m(Xq,Kq,Jq,!1);else C(Xq,Kq);else m(Xq,Kq,Jq,!1);else if(!Zq)Kq.reading=!1,C(Xq,Kq);return!Kq.ended&&(Kq.length<Kq.highWaterMark||Kq.length===0)}function m(Xq,Jq,Hq,Zq){if(xq&&Iq("adding chunk",Xq.__id),xq&&Iq("chunk",Hq.toString(),Xq.__id),Jq.flowing&&Jq.length===0&&!Jq.sync&&Xq.listenerCount("data")>0){if(Jq.multiAwaitDrain)Jq.awaitDrainWriters.clear();else Jq.awaitDrainWriters=null;Jq.dataEmitted=!0,Xq.emit("data",Hq)}else{if(Jq.length+=Jq.objectMode?1:Hq.length,Zq)Jq.buffer.unshift(Hq);else Jq.buffer.push(Hq);if(xq&&Iq("needReadable @ addChunk",Jq.needReadable,Xq.__id),Jq.needReadable)E(Xq,Jq)}C(Xq,Jq)}L.prototype.isPaused=function(){const Xq=this._readableState;return Xq.paused===!0||Xq.flowing===!1},L.prototype.setEncoding=function(Xq){const Jq=new f(Xq);this._readableState.decoder=Jq,this._readableState.encoding=this._readableState.decoder.encoding;const Hq=this._readableState.buffer;let Zq="";for(let Kq=Hq.length;Kq>0;Kq--)Zq+=Jq.write(Hq.shift());if(Zq!=="")Hq.push(Zq);return this._readableState.length=Zq.length,this};var b=1073741824;function c(Xq){if(Xq>b)throw new R("size","<= 1GiB",Xq);else Xq--,Xq|=Xq>>>1,Xq|=Xq>>>2,Xq|=Xq>>>4,Xq|=Xq>>>8,Xq|=Xq>>>16,Xq++;return Xq}function d(Xq,Jq){if(Xq<=0||Jq.length===0&&Jq.ended)return 0;if(Jq.objectMode)return 1;if(H(Xq)){if(Jq.flowing&&Jq.length)return Jq.buffer.first().length;return Jq.length}if(Xq<=Jq.length)return Xq;return Jq.ended?Jq.length:0}L.prototype.read=function(Xq){if(xq&&Iq("read - n =",Xq,this.__id),!J(Xq))Xq=Z(Xq,10);const Jq=this._readableState,Hq=Xq;if(Xq>Jq.highWaterMark)Jq.highWaterMark=c(Xq);if(Xq!==0)Jq.emittedReadable=!1;if(Xq===0&&Jq.needReadable&&((Jq.highWaterMark!==0?Jq.length>=Jq.highWaterMark:Jq.length>0)||Jq.ended)){if(xq&&Iq("read: emitReadable or endReadable",Jq.length,Jq.ended,this.__id),Jq.length===0&&Jq.ended)r(this);else E(this,Jq);return null}if(Xq=d(Xq,Jq),Xq===0&&Jq.ended){if(xq&&Iq("read: calling endReadable if length 0 -- length, state.ended",Jq.length,Jq.ended,this.__id),Jq.length===0)r(this);return null}let Zq=Jq.needReadable;if(xq&&Iq("need readable",Zq,this.__id),Jq.length===0||Jq.length-Xq<Jq.highWaterMark)Zq=!0,xq&&Iq("length less than watermark",Zq,this.__id);if(Jq.ended||Jq.reading||Jq.destroyed||Jq.errored||!Jq.constructed)xq&&Iq("state.constructed?",Jq.constructed,this.__id),Zq=!1,xq&&Iq("reading, ended or constructing",Zq,this.__id);else if(Zq){if(xq&&Iq("do read",this.__id),Jq.reading=!0,Jq.sync=!0,Jq.length===0)Jq.needReadable=!0;try{var Kq=this._read(Jq.highWaterMark);if(Cq(Kq)){xq&&Iq("async _read",this.__id);const Yq=Bun.peek(Kq);if(xq&&Iq("peeked promise",Yq,this.__id),Yq!==Kq)Kq=Yq}if(Cq(Kq)&&Kq?.then&&Rq(Kq.then))xq&&Iq("async _read result.then setup",this.__id),Kq.then(h,function(Yq){p(this,Yq)})}catch(Yq){p(this,Yq)}if(Jq.sync=!1,!Jq.reading)Xq=d(Hq,Jq)}xq&&Iq("n @ fromList",Xq,this.__id);let Bq;if(Xq>0)Bq=a(Xq,Jq);else Bq=null;if(xq&&Iq("ret @ read",Bq,this.__id),Bq===null)Jq.needReadable=Jq.length<=Jq.highWaterMark,xq&&Iq("state.length while ret = null",Jq.length,this.__id),Xq=0;else if(Jq.length-=Xq,Jq.multiAwaitDrain)Jq.awaitDrainWriters.clear();else Jq.awaitDrainWriters=null;if(Jq.length===0){if(!Jq.ended)Jq.needReadable=!0;if(Hq!==Xq&&Jq.ended)r(this)}if(Bq!==null&&!Jq.errorEmitted&&!Jq.closeEmitted)Jq.dataEmitted=!0,this.emit("data",Bq);return Bq},L.prototype._read=function(Xq){throw new v("_read()")},L.prototype.pipe=function(Xq,Jq){const Hq=this,Zq=this._readableState;if(Zq.pipes.length===1){if(!Zq.multiAwaitDrain)Zq.multiAwaitDrain=!0,Zq.awaitDrainWriters=new z(Zq.awaitDrainWriters?[Zq.awaitDrainWriters]:[])}Zq.pipes.push(Xq),xq&&Iq("pipe count=%d opts=%j",Zq.pipes.length,Jq,Hq.__id);const Bq=(!Jq||Jq.end!==!1)&&Xq!==process.stdout&&Xq!==process.stderr?$q:Nq;if(Zq.endEmitted)Aq(Bq);else Hq.once("end",Bq);Xq.on("unpipe",Yq);function Yq(Wq,Pq){if(xq&&Iq("onunpipe",Hq.__id),Wq===Hq){if(Pq&&Pq.hasUnpiped===!1)Pq.hasUnpiped=!0,Gq()}}function $q(){xq&&Iq("onend",Hq.__id),Xq.end()}let zq,Vq=!1;function Gq(){if(xq&&Iq("cleanup",Hq.__id),Xq.removeListener("close",jq),Xq.removeListener("finish",Lq),zq)Xq.removeListener("drain",zq);if(Xq.removeListener("error",Mq),Xq.removeListener("unpipe",Yq),Hq.removeListener("end",$q),Hq.removeListener("end",Nq),Hq.removeListener("data",Fq),Vq=!0,zq&&Zq.awaitDrainWriters&&(!Xq._writableState||Xq._writableState.needDrain))zq()}function Uq(){if(!Vq){if(Zq.pipes.length===1&&Zq.pipes[0]===Xq)xq&&Iq("false write response, pause",0,Hq.__id),Zq.awaitDrainWriters=Xq,Zq.multiAwaitDrain=!1;else if(Zq.pipes.length>1&&Zq.pipes.includes(Xq))xq&&Iq("false write response, pause",Zq.awaitDrainWriters.size,Hq.__id),Zq.awaitDrainWriters.add(Xq);Hq.pause()}if(!zq)zq=l(Hq,Xq),Xq.on("drain",zq)}Hq.on("data",Fq);function Fq(Wq){xq&&Iq("ondata",Hq.__id);const Pq=Xq.write(Wq);if(xq&&Iq("dest.write",Pq,Hq.__id),Pq===!1)Uq()}function Mq(Wq){if(Iq("onerror",Wq),Nq(),Xq.removeListener("error",Mq),Xq.listenerCount("error")===0){const Pq=Xq._writableState||Xq._readableState;if(Pq&&!Pq.errorEmitted)p(Xq,Wq);else Xq.emit("error",Wq)}}j(Xq,"error",Mq);function jq(){Xq.removeListener("finish",Lq),Nq()}Xq.once("close",jq);function Lq(){Iq("onfinish"),Xq.removeListener("close",jq),Nq()}Xq.once("finish",Lq);function Nq(){Iq("unpipe"),Hq.unpipe(Xq)}if(Xq.emit("pipe",Hq),Xq.writableNeedDrain===!0){if(Zq.flowing)Uq()}else if(!Zq.flowing)Iq("pipe resume"),Hq.resume();return Xq};function l(Xq,Jq){return function Hq(){const Zq=Xq._readableState;if(Zq.awaitDrainWriters===Jq)Iq("pipeOnDrain",1),Zq.awaitDrainWriters=null;else if(Zq.multiAwaitDrain)Iq("pipeOnDrain",Zq.awaitDrainWriters.size),Zq.awaitDrainWriters.delete(Jq);if((!Zq.awaitDrainWriters||Zq.awaitDrainWriters.size===0)&&Xq.listenerCount("data"))Xq.resume()}}L.prototype.unpipe=function(Xq){const Jq=this._readableState,Hq={hasUnpiped:!1};if(Jq.pipes.length===0)return this;if(!Xq){const Kq=Jq.pipes;Jq.pipes=[],this.pause();for(let Bq=0;Bq<Kq.length;Bq++)Kq[Bq].emit("unpipe",this,{hasUnpiped:!1});return this}const Zq=X(Jq.pipes,Xq);if(Zq===-1)return this;if(Jq.pipes.splice(Zq,1),Jq.pipes.length===0)this.pause();return Xq.emit("unpipe",this,Hq),this},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(Xq,Jq){const Hq=M.prototype.removeListener.call(this,Xq,Jq);if(Xq==="readable")Aq(i,this);return Hq},L.prototype.off=L.prototype.removeListener,L.prototype.removeAllListeners=function(Xq){const Jq=M.prototype.removeAllListeners.apply(this,arguments);if(Xq==="readable"||Xq===void 0)Aq(i,this);return Jq};function i(Xq){const Jq=Xq._readableState;if(Jq.readableListening=Xq.listenerCount("readable")>0,Jq.resumeScheduled&&Jq.paused===!1)Jq.flowing=!0;else if(Xq.listenerCount("data")>0)Xq.resume();else if(!Jq.readableListening)Jq.flowing=null}function n(Xq){xq&&Iq("on readable nextTick, calling read(0)",Xq.__id),Xq.read(0)}L.prototype.resume=function(){const Xq=this._readableState;if(!Xq.flowing)xq&&Iq("resume",this.__id),Xq.flowing=!Xq.readableListening,T(this,Xq);return Xq.paused=!1,this},L.prototype.pause=function(){if(xq&&Iq("call pause flowing=%j",this._readableState.flowing,this.__id),this._readableState.flowing!==!1)xq&&Iq("pause",this.__id),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this},L.prototype.wrap=function(Xq){let Jq=!1;Xq.on("data",(Zq)=>{if(!this.push(Zq)&&Xq.pause)Jq=!0,Xq.pause()}),Xq.on("end",()=>{this.push(null)}),Xq.on("error",(Zq)=>{p(this,Zq)}),Xq.on("close",()=>{this.destroy()}),Xq.on("destroy",()=>{this.destroy()}),this._read=()=>{if(Jq&&Xq.resume)Jq=!1,Xq.resume()};const Hq=B(Xq);for(let Zq=1;Zq<Hq.length;Zq++){const Kq=Hq[Zq];if(this[Kq]===void 0&&typeof Xq[Kq]==="function")this[Kq]=Xq[Kq].bind(Xq)}return this},L.prototype[V]=function(){return o(this)},L.prototype.iterator=function(Xq){if(Xq!==void 0)k(Xq,"options");return o(this,Xq)};function o(Xq,Jq){if(typeof Xq.read!=="function")Xq=L.wrap(Xq,{objectMode:!0});const Hq=s(Xq,Jq);return Hq.stream=Xq,Hq}async function*s(Xq,Jq){let Hq=h;function Zq(Yq){if(this===Xq)Hq(),Hq=h;else Hq=Yq}Xq.on("readable",Zq);let Kq;const Bq=I(Xq,{writable:!1},(Yq)=>{Kq=Yq?D(Kq,Yq):null,Hq(),Hq=h});try{while(!0){const Yq=Xq.destroyed?null:Xq.read();if(Yq!==null)yield Yq;else if(Kq)throw Kq;else if(Kq===null)return;else await new $(Zq)}}catch(Yq){throw Kq=D(Kq,Yq),Kq}finally{if((Kq||(Jq===null||Jq===void 0?void 0:Jq.destroyOnReturn)!==!1)&&(Kq===void 0||Xq._readableState.autoDestroy))w.destroyer(Xq,null);else Xq.off("readable",Zq),Bq()}}K(L.prototype,{readable:{get(){const Xq=this._readableState;return!!Xq&&Xq.readable!==!1&&!Xq.destroyed&&!Xq.errorEmitted&&!Xq.endEmitted},set(Xq){if(this._readableState)this._readableState.readable=!!Xq}},readableDidRead:{enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Xq){if(this._readableState)this._readableState.flowing=Xq}},readableLength:{enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{get(){return this._readableState?this._readableState.closed:!1}},destroyed:{enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(Xq){if(!this._readableState)return;this._readableState.destroyed=Xq}},readableEnded:{enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),L._fromList=a;function a(Xq,Jq){if(Jq.length===0)return null;let Hq;if(Jq.objectMode)Hq=Jq.buffer.shift();else if(!Xq||Xq>=Jq.length){if(Jq.decoder)Hq=Jq.buffer.join("");else if(Jq.buffer.length===1)Hq=Jq.buffer.first();else Hq=Jq.buffer.concat(Jq.length);Jq.buffer.clear()}else Hq=Jq.buffer.consume(Xq,Jq.decoder);return Hq}function r(Xq){const Jq=Xq._readableState;if(xq&&Iq("endEmitted @ endReadable",Jq.endEmitted,Xq.__id),!Jq.endEmitted)Jq.ended=!0,Aq(t,Jq,Xq)}function t(Xq,Jq){if(xq&&Iq("endReadableNT -- endEmitted, state.length",Xq.endEmitted,Xq.length,Jq.__id),!Xq.errored&&!Xq.closeEmitted&&!Xq.endEmitted&&Xq.length===0){if(Xq.endEmitted=!0,Jq.emit("end"),xq&&Iq("end emitted @ endReadableNT",Jq.__id),Jq.writable&&Jq.allowHalfOpen===!1)Aq(e,Jq);else if(Xq.autoDestroy){const Hq=Jq._writableState;if(!Hq||Hq.autoDestroy&&(Hq.finished||Hq.writable===!1))Jq.destroy()}}}function e(Xq){if(Xq.writable&&!Xq.writableEnded&&!Xq.destroyed)Xq.end()}L.from=function(Xq,Jq){return y(L,Xq,Jq)};var qq={newStreamReadableFromReadableStream:W};function Qq(){if(qq===void 0)qq={};return qq}L.fromWeb=function(Xq,Jq){return Qq().newStreamReadableFromReadableStream(Xq,Jq)},L.toWeb=function(Xq){return Qq().newReadableStreamFromStreamReadable(Xq)},L.wrap=function(Xq,Jq){var Hq,Zq;return new L({objectMode:(Hq=(Zq=Xq.readableObjectMode)!==null&&Zq!==void 0?Zq:Xq.objectMode)!==null&&Hq!==void 0?Hq:!0,...Jq,destroy(Kq,Bq){w.destroyer(Xq,Kq),Bq(Kq)}}).wrap(Xq)}}}),BQ=cq({"node_modules/readable-stream/lib/internal/streams/writable.js"(q,Q){var{ArrayPrototypeSlice:X,Error:J,FunctionPrototypeSymbolHasInstance:H,ObjectDefineProperty:Z,ObjectDefineProperties:K,ObjectSetPrototypeOf:B,StringPrototypeToLowerCase:Y,Symbol:$,SymbolHasInstance:z}=Dq(),{EventEmitter:V}=Eq("bun:events_native"),G=QQ().Stream,U=qQ(),{addAbortSignal:F}=XQ(),{getHighWaterMark:M,getDefaultHighWaterMark:j}=JQ(),{ERR_INVALID_ARG_TYPE:L,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_MULTIPLE_CALLBACK:W,ERR_STREAM_CANNOT_PIPE:P,ERR_STREAM_DESTROYED:I,ERR_STREAM_ALREADY_FINISHED:x,ERR_STREAM_NULL_VALUES:T,ERR_STREAM_WRITE_AFTER_END:A,ERR_UNKNOWN_ENCODING:O}=sq().codes,{errorOrDestroy:C}=U;function E(s={}){const a=this instanceof vq();if(!a&&!H(E,this))return new E(s);if(this._writableState=new _(s,this,a),s){if(typeof s.write==="function")this._write=s.write;if(typeof s.writev==="function")this._writev=s.writev;if(typeof s.destroy==="function")this._destroy=s.destroy;if(typeof s.final==="function")this._final=s.final;if(typeof s.construct==="function")this._construct=s.construct;if(s.signal)F(s.signal,this)}G.call(this,s),U.construct(this,()=>{const r=this._writableState;if(!r.writing)u(this,r);d(this,r)})}B(E.prototype,G.prototype),B(E,G),Q.exports=E;function w(){}var D=$("kOnFinished");function _(s,a,r){if(typeof r!=="boolean")r=a instanceof vq();if(this.objectMode=!!(s&&s.objectMode),r)this.objectMode=this.objectMode||!!(s&&s.writableObjectMode);this.highWaterMark=s?M(this,s,"writableHighWaterMark",r):j(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const t=!!(s&&s.decodeStrings===!1);this.decodeStrings=!t,this.defaultEncoding=s&&s.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=f.bind(void 0,a),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,v(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!s||s.emitClose!==!1,this.autoDestroy=!s||s.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[D]=[]}function v(s){s.buffered=[],s.bufferedIndex=0,s.allBuffers=!0,s.allNoop=!0}_.prototype.getBuffer=function s(){return X(this.buffered,this.bufferedIndex)},Z(_.prototype,"bufferedRequestCount",{get(){return this.buffered.length-this.bufferedIndex}}),Z(E,z,{value:function(s){if(H(this,s))return!0;if(this!==E)return!1;return s&&s._writableState instanceof _}}),E.prototype.pipe=function(){C(this,new P)};function R(s,a,r,t){const e=s._writableState;if(typeof r==="function")t=r,r=e.defaultEncoding;else{if(!r)r=e.defaultEncoding;else if(r!=="buffer"&&!Buffer.isEncoding(r))throw new O(r);if(typeof t!=="function")t=w}if(a===null)throw new T;else if(!e.objectMode)if(typeof a==="string"){if(e.decodeStrings!==!1)a=Buffer.from(a,r),r="buffer"}else if(a instanceof Buffer)r="buffer";else if(G._isUint8Array(a))a=G._uint8ArrayToBuffer(a),r="buffer";else throw new L("chunk",["string","Buffer","Uint8Array"],a);let qq;if(e.ending)qq=new A;else if(e.destroyed)qq=new I("write");if(qq)return Aq(t,qq),C(s,qq,!0),qq;return e.pendingcb++,g(s,e,a,r,t)}E.prototype.write=function(s,a,r){return R(this,s,a,r)===!0},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){const s=this._writableState;if(s.corked){if(s.corked--,!s.writing)u(this,s)}},E.prototype.setDefaultEncoding=function s(a){if(typeof a==="string")a=Y(a);if(!Buffer.isEncoding(a))throw new O(a);return this._writableState.defaultEncoding=a,this};function g(s,a,r,t,e){const qq=a.objectMode?1:r.length;a.length+=qq;const Qq=a.length<a.highWaterMark;if(!Qq)a.needDrain=!0;if(a.writing||a.corked||a.errored||!a.constructed){if(a.buffered.push({chunk:r,encoding:t,callback:e}),a.allBuffers&&t!=="buffer")a.allBuffers=!1;if(a.allNoop&&e!==w)a.allNoop=!1}else a.writelen=qq,a.writecb=e,a.writing=!0,a.sync=!0,s._write(r,t,a.onwrite),a.sync=!1;return Qq&&!a.errored&&!a.destroyed}function S(s,a,r,t,e,qq,Qq){if(a.writelen=t,a.writecb=Qq,a.writing=!0,a.sync=!0,a.destroyed)a.onwrite(new I("write"));else if(r)s._writev(e,a.onwrite);else s._write(e,qq,a.onwrite);a.sync=!1}function k(s,a,r,t){--a.pendingcb,t(r),p(a),C(s,r)}function f(s,a){const r=s._writableState,t=r.sync,e=r.writecb;if(typeof e!=="function"){C(s,new W);return}if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,a){if(Error.captureStackTrace(a),!r.errored)r.errored=a;if(s._readableState&&!s._readableState.errored)s._readableState.errored=a;if(t)Aq(k,s,r,a,e);else k(s,r,a,e)}else{if(r.buffered.length>r.bufferedIndex)u(s,r);if(t)if(r.afterWriteTickInfo!==null&&r.afterWriteTickInfo.cb===e)r.afterWriteTickInfo.count++;else r.afterWriteTickInfo={count:1,cb:e,stream:s,state:r},Aq(y,r.afterWriteTickInfo);else h(s,r,1,e)}}function y({stream:s,state:a,count:r,cb:t}){return a.afterWriteTickInfo=null,h(s,a,r,t)}function h(s,a,r,t){if(!a.ending&&!s.destroyed&&a.length===0&&a.needDrain)a.needDrain=!1,s.emit("drain");while(r-- >0)a.pendingcb--,t();if(a.destroyed)p(a);d(s,a)}function p(s){if(s.writing)return;for(let e=s.bufferedIndex;e<s.buffered.length;++e){var a;const{chunk:qq,callback:Qq}=s.buffered[e],Xq=s.objectMode?1:qq.length;s.length-=Xq,Qq((a=s.errored)!==null&&a!==void 0?a:new I("write"))}const r=s[D].splice(0);for(let e=0;e<r.length;e++){var t;r[e]((t=s.errored)!==null&&t!==void 0?t:new I("end"))}v(s)}function u(s,a){if(a.corked||a.bufferProcessing||a.destroyed||!a.constructed)return;const{buffered:r,bufferedIndex:t,objectMode:e}=a,qq=r.length-t;if(!qq)return;let Qq=t;if(a.bufferProcessing=!0,qq>1&&s._writev){a.pendingcb-=qq-1;const Xq=a.allNoop?w:(Hq)=>{for(let Zq=Qq;Zq<r.length;++Zq)r[Zq].callback(Hq)},Jq=a.allNoop&&Qq===0?r:X(r,Qq);Jq.allBuffers=a.allBuffers,S(s,a,!0,a.length,Jq,"",Xq),v(a)}else{do{const{chunk:Xq,encoding:Jq,callback:Hq}=r[Qq];r[Qq++]=null;const Zq=e?1:Xq.length;S(s,a,!1,Zq,Xq,Jq,Hq)}while(Qq<r.length&&!a.writing);if(Qq===r.length)v(a);else if(Qq>256)r.splice(0,Qq),a.bufferedIndex=0;else a.bufferedIndex=Qq}a.bufferProcessing=!1}E.prototype._write=function(s,a,r){if(this._writev)this._writev([{chunk:s,encoding:a}],r);else throw new N("_write()")},E.prototype._writev=null,E.prototype.end=function(s,a,r,t=!1){const e=this._writableState;if(xq&&Iq("end",e,this.__id),typeof s==="function")r=s,s=null,a=null;else if(typeof a==="function")r=a,a=null;let qq;if(s!==null&&s!==void 0){let Qq;if(!t)Qq=R(this,s,a);else Qq=this.write(s,a);if(Qq instanceof J)qq=Qq}if(e.corked)e.corked=1,this.uncork();if(qq)this.emit("error",qq);else if(!e.errored&&!e.ending)e.ending=!0,d(this,e,!0),e.ended=!0;else if(e.finished)qq=new x("end");else if(e.destroyed)qq=new I("end");if(typeof r==="function")if(qq||e.finished)Aq(r,qq);else e[D].push(r);return this};function m(s,a){var r=s.ending&&!s.destroyed&&s.constructed&&s.length===0&&!s.errored&&s.buffered.length===0&&!s.finished&&!s.writing&&!s.errorEmitted&&!s.closeEmitted;return Iq("needFinish",r,a),r}function b(s,a){let r=!1;function t(e){if(r){C(s,e!==null&&e!==void 0?e:W());return}if(r=!0,a.pendingcb--,e){const qq=a[D].splice(0);for(let Qq=0;Qq<qq.length;Qq++)qq[Qq](e);C(s,e,a.sync)}else if(m(a))a.prefinished=!0,s.emit("prefinish"),a.pendingcb++,Aq(l,s,a)}a.sync=!0,a.pendingcb++;try{s._final(t)}catch(e){t(e)}a.sync=!1}function c(s,a){if(!a.prefinished&&!a.finalCalled)if(typeof s._final==="function"&&!a.destroyed)a.finalCalled=!0,b(s,a);else a.prefinished=!0,s.emit("prefinish")}function d(s,a,r){if(xq&&Iq("finishMaybe -- state, sync",a,r,s.__id),!m(a,s.__id))return;if(c(s,a),a.pendingcb===0){if(r)a.pendingcb++,Aq((t,e)=>{if(m(e))l(t,e);else e.pendingcb--},s,a);else if(m(a))a.pendingcb++,l(s,a)}}function l(s,a){a.pendingcb--,a.finished=!0;const r=a[D].splice(0);for(let t=0;t<r.length;t++)r[t]();if(s.emit("finish"),a.autoDestroy){const t=s._readableState;if(!t||t.autoDestroy&&(t.endEmitted||t.readable===!1))s.destroy()}}K(E.prototype,{closed:{get(){return this._writableState?this._writableState.closed:!1}},destroyed:{get(){return this._writableState?this._writableState.destroyed:!1},set(s){if(this._writableState)this._writableState.destroyed=s}},writable:{get(){const s=this._writableState;return!!s&&s.writable!==!1&&!s.destroyed&&!s.errored&&!s.ending&&!s.ended},set(s){if(this._writableState)this._writableState.writable=!!s}},writableFinished:{get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{get(){const s=this._writableState;if(!s)return!1;return!s.destroyed&&!s.ending&&s.needDrain}},writableHighWaterMark:{get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{get(){return this._writableState?this._writableState.corked:0}},writableLength:{get(){return this._writableState&&this._writableState.length}},errored:{enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var i=U.destroy;E.prototype.destroy=function(s,a){const r=this._writableState;if(!r.destroyed&&(r.bufferedIndex<r.buffered.length||r[D].length))Aq(p,r);return i.call(this,s,a),this},E.prototype._undestroy=U.undestroy,E.prototype._destroy=function(s,a){a(s)},E.prototype[V.captureRejectionSymbol]=function(s){this.destroy(s)};var n;function o(){if(n===void 0)n={};return n}E.fromWeb=function(s,a){return o().newStreamWritableFromWritableStream(s,a)},E.toWeb=function(s){return o().newWritableStreamFromStreamWritable(s)}}}),YQ=cq({"node_modules/readable-stream/lib/internal/streams/duplexify.js"(q,Q){var X=Eq("buffer"),{isReadable:J,isWritable:H,isIterable:Z,isNodeStream:K,isReadableNodeStream:B,isWritableNodeStream:Y,isDuplexNodeStream:$}=rq(),z=tq(),{AbortError:V,codes:{ERR_INVALID_ARG_TYPE:G,ERR_INVALID_RETURN_VALUE:U}}=sq(),{destroyer:F}=qQ(),M=vq(),j=KQ(),{createDeferredPromise:L}=_q(),N=HQ(),W=globalThis.Blob||X.Blob,P=typeof W!=="undefined"?function C(E){return E instanceof W}:function C(E){return!1},I=globalThis.AbortController||Eq("abort-controller").AbortController,{FunctionPrototypeCall:x}=Dq();class T extends M{constructor(C){super(C);if((C===null||C===void 0?void 0:C.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((C===null||C===void 0?void 0:C.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}Q.exports=function C(E,w){if($(E))return E;if(B(E))return O({readable:E});if(Y(E))return O({writable:E});if(K(E))return O({writable:!1,readable:!1});if(typeof E==="function"){const{value:_,write:v,final:R,destroy:g}=A(E);if(Z(_))return N(T,_,{objectMode:!0,write:v,final:R,destroy:g});const S=_===null||_===void 0?void 0:_.then;if(typeof S==="function"){let k;const f=x(S,_,(y)=>{if(y!=null)throw new U("nully","body",y)},(y)=>{F(k,y)});return k=new T({objectMode:!0,readable:!1,write:v,final(y){R(async()=>{try{await f,Aq(y,null)}catch(h){Aq(y,h)}})},destroy:g})}throw new U("Iterable, AsyncIterable or AsyncFunction",w,_)}if(P(E))return C(E.arrayBuffer());if(Z(E))return N(T,E,{objectMode:!0,writable:!1});if(typeof(E===null||E===void 0?void 0:E.writable)==="object"||typeof(E===null||E===void 0?void 0:E.readable)==="object"){const _=E!==null&&E!==void 0&&E.readable?B(E===null||E===void 0?void 0:E.readable)?E===null||E===void 0?void 0:E.readable:C(E.readable):void 0,v=E!==null&&E!==void 0&&E.writable?Y(E===null||E===void 0?void 0:E.writable)?E===null||E===void 0?void 0:E.writable:C(E.writable):void 0;return O({readable:_,writable:v})}const D=E===null||E===void 0?void 0:E.then;if(typeof D==="function"){let _;return x(D,E,(v)=>{if(v!=null)_.push(v);_.push(null)},(v)=>{F(_,v)}),_=new T({objectMode:!0,writable:!1,read(){}})}throw new G(w,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],E)};function A(C){let{promise:E,resolve:w}=L();const D=new I,_=D.signal;return{value:C(async function*(){while(!0){const R=E;E=null;const{chunk:g,done:S,cb:k}=await R;if(Aq(k),S)return;if(_.aborted)throw new V(void 0,{cause:_.reason});({promise:E,resolve:w}=L()),yield g}}(),{signal:_}),write(R,g,S){const k=w;w=null,k({chunk:R,done:!1,cb:S})},final(R){const g=w;w=null,g({done:!0,cb:R})},destroy(R,g){D.abort(),g(R)}}}function O(C){const E=C.readable&&typeof C.readable.read!=="function"?j.wrap(C.readable):C.readable,w=C.writable;let D=!!J(E),_=!!H(w),v,R,g,S,k;function f(y){const h=S;if(S=null,h)h(y);else if(y)k.destroy(y);else if(!D&&!_)k.destroy()}if(k=new T({readableObjectMode:!!(E!==null&&E!==void 0&&E.readableObjectMode),writableObjectMode:!!(w!==null&&w!==void 0&&w.writableObjectMode),readable:D,writable:_}),_)z(w,(y)=>{if(_=!1,y)F(E,y);f(y)}),k._write=function(y,h,p){if(w.write(y,h))p();else v=p},k._final=function(y){w.end(),R=y},w.on("drain",function(){if(v){const y=v;v=null,y()}}),w.on("finish",function(){if(R){const y=R;R=null,y()}});if(D)z(E,(y)=>{if(D=!1,y)F(E,y);f(y)}),E.on("readable",function(){if(g){const y=g;g=null,y()}}),E.on("end",function(){k.push(null)}),k._read=function(){while(!0){const y=E.read();if(y===null){g=k._read;return}if(!k.push(y))return}};return k._destroy=function(y,h){if(!y&&S!==null)y=new V;if(g=null,v=null,R=null,S===null)h(y);else S=h,F(w,y),F(E,y)},k}}}),vq=cq({"node_modules/readable-stream/lib/internal/streams/duplex.js"(q,Q){var{ObjectDefineProperties:X,ObjectGetOwnPropertyDescriptor:J,ObjectKeys:H,ObjectSetPrototypeOf:Z}=Dq(),K=KQ();function B(G){if(!(this instanceof B))return new B(G);if(K.call(this,G),Tq.call(this,G),G){if(this.allowHalfOpen=G.allowHalfOpen!==!1,G.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(G.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}Q.exports=B,Z(B.prototype,K.prototype),Z(B,K);for(var Y in Tq.prototype)if(!B.prototype[Y])B.prototype[Y]=Tq.prototype[Y];X(B.prototype,{writable:J(Tq.prototype,"writable"),writableHighWaterMark:J(Tq.prototype,"writableHighWaterMark"),writableObjectMode:J(Tq.prototype,"writableObjectMode"),writableBuffer:J(Tq.prototype,"writableBuffer"),writableLength:J(Tq.prototype,"writableLength"),writableFinished:J(Tq.prototype,"writableFinished"),writableCorked:J(Tq.prototype,"writableCorked"),writableEnded:J(Tq.prototype,"writableEnded"),writableNeedDrain:J(Tq.prototype,"writableNeedDrain"),destroyed:{get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(G){if(this._readableState&&this._writableState)this._readableState.destroyed=G,this._writableState.destroyed=G}}});var $;function z(){if($===void 0)$={};return $}B.fromWeb=function(G,U){return z().newStreamDuplexFromReadableWritablePair(G,U)},B.toWeb=function(G){return z().newReadableWritablePairFromDuplex(G)};var V;B.from=function(G){if(!V)V=YQ();return V(G,"body")}}}),$Q=cq({"node_modules/readable-stream/lib/internal/streams/transform.js"(q,Q){var{ObjectSetPrototypeOf:X,Symbol:J}=Dq(),{ERR_METHOD_NOT_IMPLEMENTED:H}=sq().codes,Z=vq();function K(z){if(!(this instanceof K))return new K(z);if(Z.call(this,z),this._readableState.sync=!1,this[B]=null,z){if(typeof z.transform==="function")this._transform=z.transform;if(typeof z.flush==="function")this._flush=z.flush}this.on("prefinish",$.bind(this))}X(K.prototype,Z.prototype),X(K,Z),Q.exports=K;var B=J("kCallback");function Y(z){if(typeof this._flush==="function"&&!this.destroyed)this._flush((V,G)=>{if(V){if(z)z(V);else this.destroy(V);return}if(G!=null)this.push(G);if(this.push(null),z)z()});else if(this.push(null),z)z()}function $(){if(this._final!==Y)Y.call(this)}K.prototype._final=Y,K.prototype._transform=function(z,V,G){throw new H("_transform()")},K.prototype._write=function(z,V,G){const U=this._readableState,F=this._writableState,M=U.length;this._transform(z,V,(j,L)=>{if(j){G(j);return}if(L!=null)this.push(L);if(F.ended||M===U.length||U.length<U.highWaterMark||U.highWaterMark===0||U.length===0)G();else this[B]=G})},K.prototype._read=function(){if(this[B]){const z=this[B];this[B]=null,z()}}}}),zQ=cq({"node_modules/readable-stream/lib/internal/streams/passthrough.js"(q,Q){var{ObjectSetPrototypeOf:X}=Dq(),J=$Q();function H(Z){if(!(this instanceof H))return new H(Z);J.call(this,Z)}X(H.prototype,J.prototype),X(H,J),H.prototype._transform=function(Z,K,B){B(null,Z)},Q.exports=H}}),VQ=cq({"node_modules/readable-stream/lib/internal/streams/pipeline.js"(q,Q){var{ArrayIsArray:X,Promise:J,SymbolAsyncIterator:H}=Dq(),Z=tq(),{once:K}=_q(),B=qQ(),Y=vq(),{aggregateTwoErrors:$,codes:{ERR_INVALID_ARG_TYPE:z,ERR_INVALID_RETURN_VALUE:V,ERR_MISSING_ARGS:G,ERR_STREAM_DESTROYED:U},AbortError:F}=sq(),{validateFunction:M,validateAbortSignal:j}=aq(),{isIterable:L,isReadable:N,isReadableNodeStream:W,isNodeStream:P}=rq(),I=globalThis.AbortController||Eq("abort-controller").AbortController,x,T;function A(R,g,S){let k=!1;R.on("close",()=>{k=!0});const f=Z(R,{readable:g,writable:S},(y)=>{k=!y});return{destroy:(y)=>{if(k)return;k=!0,B.destroyer(R,y||new U("pipe"))},cleanup:f}}function O(R){return M(R[R.length-1],"streams[stream.length - 1]"),R.pop()}function C(R){if(L(R))return R;else if(W(R))return E(R);throw new z("val",["Readable","Iterable","AsyncIterable"],R)}async function*E(R){if(!T)T=KQ();yield*T.prototype[H].call(R)}async function w(R,g,S,{end:k}){let f,y=null;const h=(m)=>{if(m)f=m;if(y){const b=y;y=null,b()}},p=()=>new J((m,b)=>{if(f)b(f);else y=()=>{if(f)b(f);else m()}});g.on("drain",h);const u=Z(g,{readable:!1},h);try{if(g.writableNeedDrain)await p();for await(let m of R)if(!g.write(m))await p();if(k)g.end();await p(),S()}catch(m){S(f!==m?$(f,m):m)}finally{u(),g.off("drain",h)}}function D(...R){return _(R,K(O(R)))}function _(R,g,S){if(R.length===1&&X(R[0]))R=R[0];if(R.length<2)throw new G("streams");const k=new I,f=k.signal,y=S===null||S===void 0?void 0:S.signal,h=[];j(y,"options.signal");function p(){l(new F)}y===null||y===void 0||y.addEventListener("abort",p);let u,m;const b=[];let c=0;function d(o){l(o,--c===0)}function l(o,s){if(o&&(!u||u.code==="ERR_STREAM_PREMATURE_CLOSE"))u=o;if(!u&&!s)return;while(b.length)b.shift()(u);if(y===null||y===void 0||y.removeEventListener("abort",p),k.abort(),s){if(!u)h.forEach((a)=>a());Aq(g,u,m)}}let i;for(let o=0;o<R.length;o++){const s=R[o],a=o<R.length-1,r=o>0,t=a||(S===null||S===void 0?void 0:S.end)!==!1,e=o===R.length-1;if(P(s)){let qq=function(Qq){if(Qq&&Qq.name!=="AbortError"&&Qq.code!=="ERR_STREAM_PREMATURE_CLOSE")d(Qq)};if(t){const{destroy:Qq,cleanup:Xq}=A(s,a,r);if(b.push(Qq),N(s)&&e)h.push(Xq)}if(s.on("error",qq),N(s)&&e)h.push(()=>{s.removeListener("error",qq)})}if(o===0)if(typeof s==="function"){if(i=s({signal:f}),!L(i))throw new V("Iterable, AsyncIterable or Stream","source",i)}else if(L(s)||W(s))i=s;else i=Y.from(s);else if(typeof s==="function")if(i=C(i),i=s(i,{signal:f}),a){if(!L(i,!0))throw new V("AsyncIterable",`transform[${o-1}]`,i)}else{var n;if(!x)x=zQ();const qq=new x({objectMode:!0}),Qq=(n=i)===null||n===void 0?void 0:n.then;if(typeof Qq==="function")c++,Qq.call(i,(Hq)=>{if(m=Hq,Hq!=null)qq.write(Hq);if(t)qq.end();Aq(d)},(Hq)=>{qq.destroy(Hq),Aq(d,Hq)});else if(L(i,!0))c++,w(i,qq,d,{end:t});else throw new V("AsyncIterable or Promise","destination",i);i=qq;const{destroy:Xq,cleanup:Jq}=A(i,!1,!0);if(b.push(Xq),e)h.push(Jq)}else if(P(s)){if(W(i)){c+=2;const qq=v(i,s,d,{end:t});if(N(s)&&e)h.push(qq)}else if(L(i))c++,w(i,s,d,{end:t});else throw new z("val",["Readable","Iterable","AsyncIterable"],i);i=s}else i=Y.from(s)}if(f!==null&&f!==void 0&&f.aborted||y!==null&&y!==void 0&&y.aborted)Aq(p);return i}function v(R,g,S,{end:k}){if(R.pipe(g,{end:k}),k)R.once("end",()=>g.end());else S();return Z(R,{readable:!0,writable:!1},(f)=>{const y=R._readableState;if(f&&f.code==="ERR_STREAM_PREMATURE_CLOSE"&&y&&y.ended&&!y.errored&&!y.errorEmitted)R.once("end",S).once("error",S);else S(f)}),Z(g,{readable:!1,writable:!0},S)}Q.exports={pipelineImpl:_,pipeline:D}}}),GQ=cq({"node_modules/readable-stream/lib/internal/streams/compose.js"(q,Q){var{pipeline:X}=VQ(),J=vq(),{destroyer:H}=qQ(),{isNodeStream:Z,isReadable:K,isWritable:B}=rq(),{AbortError:Y,codes:{ERR_INVALID_ARG_VALUE:$,ERR_MISSING_ARGS:z}}=sq();Q.exports=function V(...G){if(G.length===0)throw new z("streams");if(G.length===1)return J.from(G[0]);const U=[...G];if(typeof G[0]==="function")G[0]=J.from(G[0]);if(typeof G[G.length-1]==="function"){const A=G.length-1;G[A]=J.from(G[A])}for(let A=0;A<G.length;++A){if(!Z(G[A]))continue;if(A<G.length-1&&!K(G[A]))throw new $(`streams[${A}]`,U[A],"must be readable");if(A>0&&!B(G[A]))throw new $(`streams[${A}]`,U[A],"must be writable")}let F,M,j,L,N;function W(A){const O=L;if(L=null,O)O(A);else if(A)N.destroy(A);else if(!T&&!x)N.destroy()}const P=G[0],I=X(G,W),x=!!B(P),T=!!K(I);if(N=new J({writableObjectMode:!!(P!==null&&P!==void 0&&P.writableObjectMode),readableObjectMode:!!(I!==null&&I!==void 0&&I.writableObjectMode),writable:x,readable:T}),x)N._write=function(A,O,C){if(P.write(A,O))C();else F=C},N._final=function(A){P.end(),M=A},P.on("drain",function(){if(F){const A=F;F=null,A()}}),I.on("finish",function(){if(M){const A=M;M=null,A()}});if(T)I.on("readable",function(){if(j){const A=j;j=null,A()}}),I.on("end",function(){N.push(null)}),N._read=function(){while(!0){const A=I.read();if(A===null){j=N._read;return}if(!N.push(A))return}};return N._destroy=function(A,O){if(!A&&L!==null)A=new Y;if(j=null,F=null,M=null,L===null)O(A);else L=O,H(I,A)},N}}}),UQ=cq({"node_modules/readable-stream/lib/stream/promises.js"(q,Q){var{ArrayPrototypePop:X,Promise:J}=Dq(),{isIterable:H,isNodeStream:Z}=rq(),{pipelineImpl:K}=VQ(),{finished:B}=tq();function Y(...$){return new J((z,V)=>{let G,U;const F=$[$.length-1];if(F&&typeof F==="object"&&!Z(F)&&!H(F)){const M=X($);G=M.signal,U=M.end}K($,(M,j)=>{if(M)V(M);else z(j)},{signal:G,end:U})})}Q.exports={finished:B,pipeline:Y}}}),FQ=cq({"node_modules/readable-stream/lib/stream.js"(q,Q){var{ObjectDefineProperty:X,ObjectKeys:J,ReflectApply:H}=Dq(),{promisify:{custom:Z}}=_q(),{streamReturningOperators:K,promiseReturningOperators:B}=eq(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:Y}}=sq(),$=GQ(),{pipeline:z}=VQ(),{destroyer:V}=qQ(),G=tq(),U=UQ(),F=rq(),M=Q.exports=QQ().Stream;M.isDisturbed=F.isDisturbed,M.isErrored=F.isErrored,M.isWritable=F.isWritable,M.isReadable=F.isReadable,M.Readable=KQ();for(let L of J(K)){let N=function(...P){if(new.target)throw Y();return M.Readable.from(H(W,this,P))};const W=K[L];X(N,"name",{value:W.name}),X(N,"length",{value:W.length}),X(M.Readable.prototype,L,{value:N,enumerable:!1,configurable:!0,writable:!0})}for(let L of J(B)){let N=function(...P){if(new.target)throw Y();return H(W,this,P)};const W=B[L];X(N,"name",{value:W.name}),X(N,"length",{value:W.length}),X(M.Readable.prototype,L,{value:N,enumerable:!1,configurable:!0,writable:!0})}M.Writable=BQ(),M.Duplex=vq(),M.Transform=$Q(),M.PassThrough=zQ(),M.pipeline=z;var{addAbortSignal:j}=XQ();M.addAbortSignal=j,M.finished=G,M.destroy=V,M.compose=$,X(M,"promises",{configurable:!0,enumerable:!0,get(){return U}}),X(z,Z,{enumerable:!0,get(){return U.pipeline}}),X(G,Z,{enumerable:!0,get(){return U.finished}}),M.Stream=M,M._isUint8Array=function L(N){return N instanceof Uint8Array},M._uint8ArrayToBuffer=function L(N){return new Buffer(N.buffer,N.byteOffset,N.byteLength)}}}),MQ=cq({"node_modules/readable-stream/lib/ours/index.js"(q,Q){const X=FQ(),J=UQ(),H=X.Readable.destroy;Q.exports=X,Q.exports._uint8ArrayToBuffer=X._uint8ArrayToBuffer,Q.exports._isUint8Array=X._isUint8Array,Q.exports.isDisturbed=X.isDisturbed,Q.exports.isErrored=X.isErrored,Q.exports.isWritable=X.isWritable,Q.exports.isReadable=X.isReadable,Q.exports.Readable=X.Readable,Q.exports.Writable=X.Writable,Q.exports.Duplex=X.Duplex,Q.exports.Transform=X.Transform,Q.exports.PassThrough=X.PassThrough,Q.exports.addAbortSignal=X.addAbortSignal,Q.exports.finished=X.finished,Q.exports.destroy=X.destroy,Q.exports.destroy=H,Q.exports.pipeline=X.pipeline,Q.exports.compose=X.compose,Q.exports._getNativeReadableStreamPrototype=NQ,Q.exports.NativeWritable=pQ,Oq.defineProperty(X,"promises",{configurable:!0,enumerable:!0,get(){return J}}),Q.exports.Stream=X.Stream,Q.exports.default=Q.exports}}),LQ={0:void 0,1:void 0,2:void 0,3:void 0,4:void 0,5:void 0},Tq=BQ(),pQ=class q extends Tq{#q;#Q;#X=!0;_construct;_destroy;_final;constructor(Q,X={}){super(X);this._construct=this.#J,this._destroy=this.#Z,this._final=this.#K,this.#q=Q}#J(Q){this._writableState.constructed=!0,this.constructed=!0,Q()}#H(){if(typeof this.#q==="object")if(typeof this.#q.write==="function")this.#Q=this.#q;else throw new Error("Invalid FileSink");else this.#Q=Bun.file(this.#q).writer()}write(Q,X,J,H=this.#X){if(!H)return this.#X=!1,super.write(Q,X,J);if(!this.#Q)this.#H();var Z=this.#Q,K=Z.write(Q);if(Cq(K))return K.then(()=>{this.emit("drain"),Z.flush(!0)}),!1;if(Z.flush(!0),J)J(null,Q.byteLength);return!0}end(Q,X,J,H=this.#X){return super.end(Q,X,J,H)}#Z(Q,X){if(this._writableState.destroyed=!0,X)X(Q)}#K(Q){if(this.#Q)this.#Q.end();if(Q)Q()}ref(){if(!this.#Q)this.#H();this.#Q.ref()}unref(){if(!this.#Q)return;this.#Q.unref()}},PQ=MQ();PQ[Symbol.for("CommonJS")]=0;PQ[Symbol.for("::bunternal::")]={_ReadableFromWeb:ZQ};var lQ=PQ,IQ=PQ._uint8ArrayToBuffer,xQ=PQ._isUint8Array,TQ=PQ.isDisturbed,AQ=PQ.isErrored,OQ=PQ.isWritable,CQ=PQ.isReadable,EQ=PQ.Readable,Tq=PQ.Writable,wQ=PQ.Duplex,DQ=PQ.Transform,_Q=PQ.PassThrough,vQ=PQ.addAbortSignal,RQ=PQ.finished,gQ=PQ.destroy,SQ=PQ.pipeline,kQ=PQ.compose,fQ=PQ.Stream,yQ=PQ["eos"]=tq,hQ=PQ._getNativeReadableStreamPrototype,pQ=PQ.NativeWritable,uQ=fQ.promise;export{uQ as promises,SQ as pipeline,OQ as isWritable,CQ as isReadable,AQ as isErrored,TQ as isDisturbed,RQ as finished,yQ as eos,gQ as destroy,lQ as default,kQ as compose,vQ as addAbortSignal,IQ as _uint8ArrayToBuffer,xQ as _isUint8Array,hQ as _getNativeReadableStreamPrototype,Tq as Writable,DQ as Transform,fQ as Stream,EQ as Readable,_Q as PassThrough,pQ as NativeWritable,wQ as Duplex}; +import{EventEmitter as Iq} from"bun:events_native";import{StringDecoder as aq} from"node:string_decoder";var tq=function(a){return typeof a==="object"&&a!==null&&a instanceof ReadableStream},eq=function(a,j){if(typeof a!=="boolean")throw new qQ(j,"boolean",a)};var qQ=function(a,j,B){return new Error(`The argument '${a}' is invalid. Received '${B}' for type '${j}'`)},QQ=function(a,j,B){return new Error(`The value '${j}' is invalid for argument '${a}'. Reason: ${B}`)},YQ=function(a,j){var[B,G,y,A,M,R,T]=globalThis[Symbol.for("Bun.lazy")](a),g=[!1],k=function(E,P,Z,U){if(P>0){const I=Z.subarray(0,P),_=Z.subarray(P);if(I.byteLength>0)E.push(I);if(U)E.push(null);return _.byteLength>0?_:void 0}if(U)E.push(null);return Z},c=function(E,P,Z,U){if(P.byteLength>0)E.push(P);if(U)E.push(null);return Z},O=process.env.BUN_DISABLE_DYNAMIC_CHUNK_SIZE!=="1";const l=new FinalizationRegistry((E)=>E&&M(E)),D=512;var p=class E extends j{#q;#Q=1;#X=!1;#H=void 0;#J;#K=!1;#Z=!O;#B;constructor(P,Z={}){super(Z);if(typeof Z.highWaterMark==="number")this.#J=Z.highWaterMark;else this.#J=262144;this.#q=P,this.#X=!1,this.#H=void 0,this.#K=!1,this.#B={},l.register(this,this.#q,this.#B)}_read(P){if(this.#K)return;var Z=this.#q;if(Z===0){this.push(null);return}if(!this.#X)this.#$(Z);return this.#V(this.#z(P),Z)}#$(P){this.#X=!0;const Z=G(P,this.#J);if(typeof Z==="number"&&Z>1)this.#Z=!0,this.#J=Math.min(this.#J,Z);if(T){const U=T(P);if((U?.byteLength??0)>0)this.push(U)}}#z(P=this.#J){var Z=this.#H;if(Z?.byteLength??0<D){var U=P>D?P:D;this.#H=Z=new Buffer(U)}return Z}#Y(P,Z,U){if(typeof P==="number"){if(P>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return k(this,P,Z,U)}else if(typeof P==="boolean")return process.nextTick(()=>{this.push(null)}),Z?.byteLength??0>0?Z:void 0;else if(ArrayBuffer.isView(P)){if(P.byteLength>=this.#J&&!this.#Z&&!U)this.#J*=2,this.#Z=!0;return c(this,P,Z,U)}else throw new Error("Invalid result from pull")}#V(P,Z){g[0]=!1;var U=B(Z,P,g);if(xq(U))return this.#K=!0,U.then((I)=>{this.#K=!1,this.#H=this.#Y(I,P,g[0])},(I)=>{errorOrDestroy(this,I)});else this.#H=this.#Y(U,P,g[0])}_destroy(P,Z){var U=this.#q;if(U===0){Z(P);return}if(l.unregister(this.#B),this.#q=0,R)R(U,!1);y(U,P),Z(P)}ref(){var P=this.#q;if(P===0)return;if(this.#Q++===0)R(P,!0)}unref(){var P=this.#q;if(P===0)return;if(this.#Q--===1)R(P,!1)}};if(!R)p.prototype.ref=void 0,p.prototype.unref=void 0;return p},lq=function(a,j){return $Q[a]||=YQ(a,j)},zQ=function(a,j,B){if(!(j&&typeof j==="object"&&j instanceof ReadableStream))return;const G=sq(j);if(!G){Gq("no native readable stream");return}const{stream:y,data:A}=G;return new(lq(A,a))(y,B)};var Gq=()=>{},{isPromise:xq,isCallable:oq,direct:sq,Object:zq}=globalThis[Symbol.for("Bun.lazy")]("primordials"),GQ=zq.create,MQ=zq.defineProperty,FQ=zq.getOwnPropertyDescriptor,rq=zq.getOwnPropertyNames,LQ=zq.getPrototypeOf,jQ=zq.prototype.hasOwnProperty,NQ=zq.setPrototypeOf,Bq=(a,j)=>function B(){return j||(0,a[rq(a)[0]])((j={exports:{}}).exports,j),j.exports};var Xq=process.nextTick;var AQ=Array.isArray,Vq=Bq({"node_modules/readable-stream/lib/ours/primordials.js"(a,j){j.exports={ArrayIsArray(B){return Array.isArray(B)},ArrayPrototypeIncludes(B,G){return B.includes(G)},ArrayPrototypeIndexOf(B,G){return B.indexOf(G)},ArrayPrototypeJoin(B,G){return B.join(G)},ArrayPrototypeMap(B,G){return B.map(G)},ArrayPrototypePop(B,G){return B.pop(G)},ArrayPrototypePush(B,G){return B.push(G)},ArrayPrototypeSlice(B,G,y){return B.slice(G,y)},Error,FunctionPrototypeCall(B,G,...y){return B.call(G,...y)},FunctionPrototypeSymbolHasInstance(B,G){return Function.prototype[Symbol.hasInstance].call(B,G)},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(B,G){return zq.defineProperties(B,G)},ObjectDefineProperty(B,G,y){return zq.defineProperty(B,G,y)},ObjectGetOwnPropertyDescriptor(B,G){return zq.getOwnPropertyDescriptor(B,G)},ObjectKeys(B){return zq.keys(B)},ObjectSetPrototypeOf(B,G){return zq.setPrototypeOf(B,G)},Promise,PromisePrototypeCatch(B,G){return B.catch(G)},PromisePrototypeThen(B,G,y){return B.then(G,y)},PromiseReject(B){return Promise.reject(B)},ReflectApply:Reflect.apply,RegExpPrototypeTest(B,G){return B.test(G)},SafeSet:Set,String,StringPrototypeSlice(B,G,y){return B.slice(G,y)},StringPrototypeToLowerCase(B){return B.toLowerCase()},StringPrototypeToUpperCase(B){return B.toUpperCase()},StringPrototypeTrim(B){return B.trim()},Symbol,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(B,G,y){return B.set(G,y)},Uint8Array}}}),Aq=Bq({"node_modules/readable-stream/lib/ours/util.js"(a,j){var B=zq.getPrototypeOf(async function(){}).constructor,G=typeof Blob!=="undefined"?function A(M){return M instanceof Blob}:function A(M){return!1},y=class extends Error{constructor(A){if(!Array.isArray(A))throw new TypeError(`Expected input to be an Array, got ${typeof A}`);let M="";for(let R=0;R<A.length;R++)M+=` ${A[R].stack} +`;super(M);this.name="AggregateError",this.errors=A}};j.exports={AggregateError:y,once(A){let M=!1;return function(...R){if(M)return;M=!0,A.apply(this,R)}},createDeferredPromise:function(){let A,M;return{promise:new Promise((T,g)=>{A=T,M=g}),resolve:A,reject:M}},promisify(A){return new Promise((M,R)=>{A((T,...g)=>{if(T)return R(T);return M(...g)})})},debuglog(){return function(){}},format(A,...M){return A.replace(/%([sdifj])/g,function(...[R,T]){const g=M.shift();if(T==="f")return g.toFixed(6);else if(T==="j")return JSON.stringify(g);else if(T==="s"&&typeof g==="object")return`${g.constructor!==zq?g.constructor.name:""} {}`.trim();else return g.toString()})},inspect(A){switch(typeof A){case"string":if(A.includes("'")){if(!A.includes('"'))return`"${A}"`;else if(!A.includes("`")&&!A.includes("${"))return`\`${A}\``}return`'${A}'`;case"number":if(isNaN(A))return"NaN";else if(zq.is(A,-0))return String(A);return A;case"bigint":return`${String(A)}n`;case"boolean":case"undefined":return String(A);case"object":return"{}"}},types:{isAsyncFunction(A){return A instanceof B},isArrayBufferView(A){return ArrayBuffer.isView(A)}},isBlob:G},j.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")}}),Wq=Bq({"node_modules/readable-stream/lib/ours/errors.js"(a,j){var{format:B,inspect:G,AggregateError:y}=Aq(),A=globalThis.AggregateError||y,M=Symbol("kIsNodeError"),R=["string","function","number","object","Function","Object","boolean","bigint","symbol"],T=/^([A-Z][a-z0-9]*)+$/,g="__node_internal_",k={};function c(Z,U){if(!Z)throw new k.ERR_INTERNAL_ASSERTION(U)}function O(Z){let U="",I=Z.length;const _=Z[0]==="-"?1:0;for(;I>=_+4;I-=3)U=`_${Z.slice(I-3,I)}${U}`;return`${Z.slice(0,I)}${U}`}function l(Z,U,I){if(typeof U==="function")return c(U.length<=I.length,`Code: ${Z}; The provided arguments length (${I.length}) does not match the required ones (${U.length}).`),U(...I);const _=(U.match(/%[dfijoOs]/g)||[]).length;if(c(_===I.length,`Code: ${Z}; The provided arguments length (${I.length}) does not match the required ones (${_}).`),I.length===0)return U;return B(U,...I)}function D(Z,U,I){if(!I)I=Error;class _ extends I{constructor(...t){super(l(Z,U,t))}toString(){return`${this.name} [${Z}]: ${this.message}`}}zq.defineProperties(_.prototype,{name:{value:I.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${Z}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),_.prototype.code=Z,_.prototype[M]=!0,k[Z]=_}function p(Z){const U=g+Z.name;return zq.defineProperty(Z,"name",{value:U}),Z}function E(Z,U){if(Z&&U&&Z!==U){if(Array.isArray(U.errors))return U.errors.push(Z),U;const I=new A([U,Z],U.message);return I.code=U.code,I}return Z||U}var P=class extends Error{constructor(Z="The operation was aborted",U=void 0){if(U!==void 0&&typeof U!=="object")throw new k.ERR_INVALID_ARG_TYPE("options","Object",U);super(Z,U);this.code="ABORT_ERR",this.name="AbortError"}};D("ERR_ASSERTION","%s",Error),D("ERR_INVALID_ARG_TYPE",(Z,U,I)=>{if(c(typeof Z==="string","'name' must be a string"),!Array.isArray(U))U=[U];let _="The ";if(Z.endsWith(" argument"))_+=`${Z} `;else _+=`"${Z}" ${Z.includes(".")?"property":"argument"} `;_+="must be ";const t=[],i=[],$=[];for(let Y of U)if(c(typeof Y==="string","All expected entries have to be of type string"),R.includes(Y))t.push(Y.toLowerCase());else if(T.test(Y))i.push(Y);else c(Y!=="object",'The value "object" should be written as "Object"'),$.push(Y);if(i.length>0){const Y=t.indexOf("object");if(Y!==-1)t.splice(t,Y,1),i.push("Object")}if(t.length>0){switch(t.length){case 1:_+=`of type ${t[0]}`;break;case 2:_+=`one of type ${t[0]} or ${t[1]}`;break;default:{const Y=t.pop();_+=`one of type ${t.join(", ")}, or ${Y}`}}if(i.length>0||$.length>0)_+=" or "}if(i.length>0){switch(i.length){case 1:_+=`an instance of ${i[0]}`;break;case 2:_+=`an instance of ${i[0]} or ${i[1]}`;break;default:{const Y=i.pop();_+=`an instance of ${i.join(", ")}, or ${Y}`}}if($.length>0)_+=" or "}switch($.length){case 0:break;case 1:if($[0].toLowerCase()!==$[0])_+="an ";_+=`${$[0]}`;break;case 2:_+=`one of ${$[0]} or ${$[1]}`;break;default:{const Y=$.pop();_+=`one of ${$.join(", ")}, or ${Y}`}}if(I==null)_+=`. Received ${I}`;else if(typeof I==="function"&&I.name)_+=`. Received function ${I.name}`;else if(typeof I==="object"){var n;if((n=I.constructor)!==null&&n!==void 0&&n.name)_+=`. Received an instance of ${I.constructor.name}`;else{const Y=G(I,{depth:-1});_+=`. Received ${Y}`}}else{let Y=G(I,{colors:!1});if(Y.length>25)Y=`${Y.slice(0,25)}...`;_+=`. Received type ${typeof I} (${Y})`}return _},TypeError),D("ERR_INVALID_ARG_VALUE",(Z,U,I="is invalid")=>{let _=G(U);if(_.length>128)_=_.slice(0,128)+"...";return`The ${Z.includes(".")?"property":"argument"} '${Z}' ${I}. Received ${_}`},TypeError),D("ERR_INVALID_RETURN_VALUE",(Z,U,I)=>{var _;const t=I!==null&&I!==void 0&&(_=I.constructor)!==null&&_!==void 0&&_.name?`instance of ${I.constructor.name}`:`type ${typeof I}`;return`Expected ${Z} to be returned from the "${U}" function but got ${t}.`},TypeError),D("ERR_MISSING_ARGS",(...Z)=>{c(Z.length>0,"At least one arg needs to be specified");let U;const I=Z.length;switch(Z=(Array.isArray(Z)?Z:[Z]).map((_)=>`"${_}"`).join(" or "),I){case 1:U+=`The ${Z[0]} argument`;break;case 2:U+=`The ${Z[0]} and ${Z[1]} arguments`;break;default:{const _=Z.pop();U+=`The ${Z.join(", ")}, and ${_} arguments`}break}return`${U} must be specified`},TypeError),D("ERR_OUT_OF_RANGE",(Z,U,I)=>{c(U,'Missing "range" argument');let _;if(Number.isInteger(I)&&Math.abs(I)>4294967296)_=O(String(I));else if(typeof I==="bigint"){if(_=String(I),I>2n**32n||I<-(2n**32n))_=O(_);_+="n"}else _=G(I);return`The value of "${Z}" is out of range. It must be ${U}. Received ${_}`},RangeError),D("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),D("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),D("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),D("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),D("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),D("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),D("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),D("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),D("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),D("ERR_STREAM_WRITE_AFTER_END","write after end",Error),D("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),j.exports={AbortError:P,aggregateTwoErrors:p(E),hideStackFrames:p,codes:k}}}),Cq=Bq({"node_modules/readable-stream/lib/internal/validators.js"(a,j){var{ArrayIsArray:B,ArrayPrototypeIncludes:G,ArrayPrototypeJoin:y,ArrayPrototypeMap:A,NumberIsInteger:M,NumberMAX_SAFE_INTEGER:R,NumberMIN_SAFE_INTEGER:T,NumberParseInt:g,RegExpPrototypeTest:k,String:c,StringPrototypeToUpperCase:O,StringPrototypeTrim:l}=Vq(),{hideStackFrames:D,codes:{ERR_SOCKET_BAD_PORT:p,ERR_INVALID_ARG_TYPE:E,ERR_INVALID_ARG_VALUE:P,ERR_OUT_OF_RANGE:Z,ERR_UNKNOWN_SIGNAL:U}}=Wq(),{normalizeEncoding:I}=Aq(),{isAsyncFunction:_,isArrayBufferView:t}=Aq().types,i={};function $(V){return V===(V|0)}function n(V){return V===V>>>0}var Y=/^[0-7]+$/,K="must be a 32-bit unsigned integer or an octal string";function F(V,h,Q){if(typeof V==="undefined")V=Q;if(typeof V==="string"){if(!k(Y,V))throw new P(h,V,K);V=g(V,8)}return u(V,h,0,4294967295),V}var m=D((V,h,Q=T,H=R)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!M(V))throw new Z(h,"an integer",V);if(V<Q||V>H)throw new Z(h,`>= ${Q} && <= ${H}`,V)}),u=D((V,h,Q=-2147483648,H=2147483647)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!$(V)){if(!M(V))throw new Z(h,"an integer",V);throw new Z(h,`>= ${Q} && <= ${H}`,V)}if(V<Q||V>H)throw new Z(h,`>= ${Q} && <= ${H}`,V)}),J=D((V,h,Q)=>{if(typeof V!=="number")throw new E(h,"number",V);if(!n(V)){if(!M(V))throw new Z(h,"an integer",V);throw new Z(h,`>= ${Q?1:0} && < 4294967296`,V)}if(Q&&V===0)throw new Z(h,">= 1 && < 4294967296",V)});function z(V,h){if(typeof V!=="string")throw new E(h,"string",V)}function w(V,h){if(typeof V!=="number")throw new E(h,"number",V)}var S=D((V,h,Q)=>{if(!G(Q,V)){const L="must be one of: "+y(A(Q,(d)=>typeof d==="string"?`'${d}'`:c(d)),", ");throw new P(h,V,L)}});function N(V,h){if(typeof V!=="boolean")throw new E(h,"boolean",V)}var W=D((V,h,Q)=>{const H=Q==null,L=H?!1:Q.allowArray,d=H?!1:Q.allowFunction;if(!(H?!1:Q.nullable)&&V===null||!L&&B(V)||typeof V!=="object"&&(!d||typeof V!=="function"))throw new E(h,"Object",V)}),b=D((V,h,Q=0)=>{if(!B(V))throw new E(h,"Array",V);if(V.length<Q){const H=`must be longer than ${Q}`;throw new P(h,V,H)}});function o(V,h="signal"){if(z(V,h),i[V]===void 0){if(i[O(V)]!==void 0)throw new U(V+" (signals must use all capital letters)");throw new U(V)}}var s=D((V,h="buffer")=>{if(!t(V))throw new E(h,["Buffer","TypedArray","DataView"],V)});function e(V,h){const Q=I(h),H=V.length;if(Q==="hex"&&H%2!==0)throw new P("encoding",h,`is invalid for data of length ${H}`)}function Hq(V,h="Port",Q=!0){if(typeof V!=="number"&&typeof V!=="string"||typeof V==="string"&&l(V).length===0||+V!==+V>>>0||V>65535||V===0&&!Q)throw new p(h,V,Q);return V|0}var $q=D((V,h)=>{if(V!==void 0&&(V===null||typeof V!=="object"||!("aborted"in V)))throw new E(h,"AbortSignal",V)}),qq=D((V,h)=>{if(typeof V!=="function")throw new E(h,"Function",V)}),Kq=D((V,h)=>{if(typeof V!=="function"||_(V))throw new E(h,"Function",V)}),Qq=D((V,h)=>{if(V!==void 0)throw new E(h,"undefined",V)});j.exports={isInt32:$,isUint32:n,parseFileMode:F,validateArray:b,validateBoolean:N,validateBuffer:s,validateEncoding:e,validateFunction:qq,validateInt32:u,validateInteger:m,validateNumber:w,validateObject:W,validateOneOf:S,validatePlainFunction:Kq,validatePort:Hq,validateSignalName:o,validateString:z,validateUint32:J,validateUndefined:Qq,validateAbortSignal:$q}}}),Eq=Bq({"node_modules/readable-stream/lib/internal/streams/utils.js"(a,j){var{Symbol:B,SymbolAsyncIterator:G,SymbolIterator:y}=Vq(),A=B("kDestroyed"),M=B("kIsErrored"),R=B("kIsReadable"),T=B("kIsDisturbed");function g(J,z=!1){var w;return!!(J&&typeof J.pipe==="function"&&typeof J.on==="function"&&(!z||typeof J.pause==="function"&&typeof J.resume==="function")&&(!J._writableState||((w=J._readableState)===null||w===void 0?void 0:w.readable)!==!1)&&(!J._writableState||J._readableState))}function k(J){var z;return!!(J&&typeof J.write==="function"&&typeof J.on==="function"&&(!J._readableState||((z=J._writableState)===null||z===void 0?void 0:z.writable)!==!1))}function c(J){return!!(J&&typeof J.pipe==="function"&&J._readableState&&typeof J.on==="function"&&typeof J.write==="function")}function O(J){return J&&(J._readableState||J._writableState||typeof J.write==="function"&&typeof J.on==="function"||typeof J.pipe==="function"&&typeof J.on==="function")}function l(J,z){if(J==null)return!1;if(z===!0)return typeof J[G]==="function";if(z===!1)return typeof J[y]==="function";return typeof J[G]==="function"||typeof J[y]==="function"}function D(J){if(!O(J))return null;const{_writableState:z,_readableState:w}=J,S=z||w;return!!(J.destroyed||J[A]||S!==null&&S!==void 0&&S.destroyed)}function p(J){if(!k(J))return null;if(J.writableEnded===!0)return!0;const z=J._writableState;if(z!==null&&z!==void 0&&z.errored)return!1;if(typeof(z===null||z===void 0?void 0:z.ended)!=="boolean")return null;return z.ended}function E(J,z){if(!k(J))return null;if(J.writableFinished===!0)return!0;const w=J._writableState;if(w!==null&&w!==void 0&&w.errored)return!1;if(typeof(w===null||w===void 0?void 0:w.finished)!=="boolean")return null;return!!(w.finished||z===!1&&w.ended===!0&&w.length===0)}function P(J){if(!g(J))return null;if(J.readableEnded===!0)return!0;const z=J._readableState;if(!z||z.errored)return!1;if(typeof(z===null||z===void 0?void 0:z.ended)!=="boolean")return null;return z.ended}function Z(J,z){if(!g(J))return null;const w=J._readableState;if(w!==null&&w!==void 0&&w.errored)return!1;if(typeof(w===null||w===void 0?void 0:w.endEmitted)!=="boolean")return null;return!!(w.endEmitted||z===!1&&w.ended===!0&&w.length===0)}function U(J){if(J&&J[R]!=null)return J[R];if(typeof(J===null||J===void 0?void 0:J.readable)!=="boolean")return null;if(D(J))return!1;return g(J)&&J.readable&&!Z(J)}function I(J){if(typeof(J===null||J===void 0?void 0:J.writable)!=="boolean")return null;if(D(J))return!1;return k(J)&&J.writable&&!p(J)}function _(J,z){if(!O(J))return null;if(D(J))return!0;if((z===null||z===void 0?void 0:z.readable)!==!1&&U(J))return!1;if((z===null||z===void 0?void 0:z.writable)!==!1&&I(J))return!1;return!0}function t(J){var z,w;if(!O(J))return null;if(J.writableErrored)return J.writableErrored;return(z=(w=J._writableState)===null||w===void 0?void 0:w.errored)!==null&&z!==void 0?z:null}function i(J){var z,w;if(!O(J))return null;if(J.readableErrored)return J.readableErrored;return(z=(w=J._readableState)===null||w===void 0?void 0:w.errored)!==null&&z!==void 0?z:null}function $(J){if(!O(J))return null;if(typeof J.closed==="boolean")return J.closed;const{_writableState:z,_readableState:w}=J;if(typeof(z===null||z===void 0?void 0:z.closed)==="boolean"||typeof(w===null||w===void 0?void 0:w.closed)==="boolean")return(z===null||z===void 0?void 0:z.closed)||(w===null||w===void 0?void 0:w.closed);if(typeof J._closed==="boolean"&&n(J))return J._closed;return null}function n(J){return typeof J._closed==="boolean"&&typeof J._defaultKeepAlive==="boolean"&&typeof J._removedConnection==="boolean"&&typeof J._removedContLen==="boolean"}function Y(J){return typeof J._sent100==="boolean"&&n(J)}function K(J){var z;return typeof J._consuming==="boolean"&&typeof J._dumped==="boolean"&&((z=J.req)===null||z===void 0?void 0:z.upgradeOrConnect)===void 0}function F(J){if(!O(J))return null;const{_writableState:z,_readableState:w}=J,S=z||w;return!S&&Y(J)||!!(S&&S.autoDestroy&&S.emitClose&&S.closed===!1)}function m(J){var z;return!!(J&&((z=J[T])!==null&&z!==void 0?z:J.readableDidRead||J.readableAborted))}function u(J){var z,w,S,N,W,b,o,s,e,Hq;return!!(J&&((z=(w=(S=(N=(W=(b=J[M])!==null&&b!==void 0?b:J.readableErrored)!==null&&W!==void 0?W:J.writableErrored)!==null&&N!==void 0?N:(o=J._readableState)===null||o===void 0?void 0:o.errorEmitted)!==null&&S!==void 0?S:(s=J._writableState)===null||s===void 0?void 0:s.errorEmitted)!==null&&w!==void 0?w:(e=J._readableState)===null||e===void 0?void 0:e.errored)!==null&&z!==void 0?z:(Hq=J._writableState)===null||Hq===void 0?void 0:Hq.errored))}j.exports={kDestroyed:A,isDisturbed:m,kIsDisturbed:T,isErrored:u,kIsErrored:M,isReadable:U,kIsReadable:R,isClosed:$,isDestroyed:D,isDuplexNodeStream:c,isFinished:_,isIterable:l,isReadableNodeStream:g,isReadableEnded:P,isReadableFinished:Z,isReadableErrored:i,isNodeStream:O,isWritable:I,isWritableNodeStream:k,isWritableEnded:p,isWritableFinished:E,isWritableErrored:t,isServerRequest:K,isServerResponse:Y,willEmitClose:F}}}),Fq=Bq({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(a,j){var{AbortError:B,codes:G}=Wq(),{ERR_INVALID_ARG_TYPE:y,ERR_STREAM_PREMATURE_CLOSE:A}=G,{once:M}=Aq(),{validateAbortSignal:R,validateFunction:T,validateObject:g}=Cq(),{Promise:k}=Vq(),{isClosed:c,isReadable:O,isReadableNodeStream:l,isReadableFinished:D,isReadableErrored:p,isWritable:E,isWritableNodeStream:P,isWritableFinished:Z,isWritableErrored:U,isNodeStream:I,willEmitClose:_}=Eq();function t(Y){return Y.setHeader&&typeof Y.abort==="function"}var i=()=>{};function $(Y,K,F){var m,u;if(arguments.length===2)F=K,K={};else if(K==null)K={};else g(K,"options");T(F,"callback"),R(K.signal,"options.signal"),F=M(F);const J=(m=K.readable)!==null&&m!==void 0?m:l(Y),z=(u=K.writable)!==null&&u!==void 0?u:P(Y);if(!I(Y))throw new y("stream","Stream",Y);const{_writableState:w,_readableState:S}=Y,N=()=>{if(!Y.writable)o()};let W=_(Y)&&l(Y)===J&&P(Y)===z,b=Z(Y,!1);const o=()=>{if(b=!0,Y.destroyed)W=!1;if(W&&(!Y.readable||J))return;if(!J||s)F.call(Y)};let s=D(Y,!1);const e=()=>{if(s=!0,Y.destroyed)W=!1;if(W&&(!Y.writable||z))return;if(!z||b)F.call(Y)},Hq=(V)=>{F.call(Y,V)};let $q=c(Y);const qq=()=>{$q=!0;const V=U(Y)||p(Y);if(V&&typeof V!=="boolean")return F.call(Y,V);if(J&&!s&&l(Y,!0)){if(!D(Y,!1))return F.call(Y,new A)}if(z&&!b){if(!Z(Y,!1))return F.call(Y,new A)}F.call(Y)},Kq=()=>{Y.req.on("finish",o)};if(t(Y)){if(Y.on("complete",o),!W)Y.on("abort",qq);if(Y.req)Kq();else Y.on("request",Kq)}else if(z&&!w)Y.on("end",N),Y.on("close",N);if(!W&&typeof Y.aborted==="boolean")Y.on("aborted",qq);if(Y.on("end",e),Y.on("finish",o),K.error!==!1)Y.on("error",Hq);if(Y.on("close",qq),$q)Xq(qq);else if(w!==null&&w!==void 0&&w.errorEmitted||S!==null&&S!==void 0&&S.errorEmitted){if(!W)Xq(qq)}else if(!J&&(!W||O(Y))&&(b||E(Y)===!1))Xq(qq);else if(!z&&(!W||E(Y))&&(s||O(Y)===!1))Xq(qq);else if(S&&Y.req&&Y.aborted)Xq(qq);const Qq=()=>{if(F=i,Y.removeListener("aborted",qq),Y.removeListener("complete",o),Y.removeListener("abort",qq),Y.removeListener("request",Kq),Y.req)Y.req.removeListener("finish",o);Y.removeListener("end",N),Y.removeListener("close",N),Y.removeListener("finish",o),Y.removeListener("end",e),Y.removeListener("error",Hq),Y.removeListener("close",qq)};if(K.signal&&!$q){const V=()=>{const h=F;Qq(),h.call(Y,new B(void 0,{cause:K.signal.reason}))};if(K.signal.aborted)Xq(V);else{const h=F;F=M((...Q)=>{K.signal.removeEventListener("abort",V),h.apply(Y,Q)}),K.signal.addEventListener("abort",V)}}return Qq}function n(Y,K){return new k((F,m)=>{$(Y,K,(u)=>{if(u)m(u);else F()})})}j.exports=$,j.exports.finished=n}}),XQ=Bq({"node_modules/readable-stream/lib/internal/streams/operators.js"(a,j){var{codes:{ERR_INVALID_ARG_TYPE:B,ERR_MISSING_ARGS:G,ERR_OUT_OF_RANGE:y},AbortError:A}=Wq(),{validateAbortSignal:M,validateInteger:R,validateObject:T}=Cq(),g=Vq().Symbol("kWeak"),{finished:k}=Fq(),{ArrayPrototypePush:c,MathFloor:O,Number:l,NumberIsNaN:D,Promise:p,PromiseReject:E,PromisePrototypeCatch:P,Symbol:Z}=Vq(),U=Z("kEmpty"),I=Z("kEof");function _(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);if(W!=null)T(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");let b=1;if((W===null||W===void 0?void 0:W.concurrency)!=null)b=O(W.concurrency);return R(b,"concurrency",1),async function*o(){var s,e;const Hq=new AbortController,$q=this,qq=[],Kq=Hq.signal,Qq={signal:Kq},V=()=>Hq.abort();if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)V();W===null||W===void 0||(e=W.signal)===null||e===void 0||e.addEventListener("abort",V);let h,Q,H=!1;function L(){H=!0}async function d(){try{for await(let q of $q){var f;if(H)return;if(Kq.aborted)throw new A;try{q=N(q,Qq)}catch(X){q=E(X)}if(q===U)continue;if(typeof((f=q)===null||f===void 0?void 0:f.catch)==="function")q.catch(L);if(qq.push(q),h)h(),h=null;if(!H&&qq.length&&qq.length>=b)await new p((X)=>{Q=X})}qq.push(I)}catch(q){const X=E(q);P(X,L),qq.push(X)}finally{var r;if(H=!0,h)h(),h=null;W===null||W===void 0||(r=W.signal)===null||r===void 0||r.removeEventListener("abort",V)}}d();try{while(!0){while(qq.length>0){const f=await qq[0];if(f===I)return;if(Kq.aborted)throw new A;if(f!==U)yield f;if(qq.shift(),Q)Q(),Q=null}await new p((f)=>{h=f})}}finally{if(Hq.abort(),H=!0,Q)Q(),Q=null}}.call(this)}function t(N=void 0){if(N!=null)T(N,"options");if((N===null||N===void 0?void 0:N.signal)!=null)M(N.signal,"options.signal");return async function*W(){let b=0;for await(let s of this){var o;if(N!==null&&N!==void 0&&(o=N.signal)!==null&&o!==void 0&&o.aborted)throw new A({cause:N.signal.reason});yield[b++,s]}}.call(this)}async function i(N,W=void 0){for await(let b of K.call(this,N,W))return!0;return!1}async function $(N,W=void 0){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);return!await i.call(this,async(...b)=>{return!await N(...b)},W)}async function n(N,W){for await(let b of K.call(this,N,W))return b;return}async function Y(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);async function b(o,s){return await N(o,s),U}for await(let o of _.call(this,b,W));}function K(N,W){if(typeof N!=="function")throw new B("fn",["Function","AsyncFunction"],N);async function b(o,s){if(await N(o,s))return o;return U}return _.call(this,b,W)}var F=class extends G{constructor(){super("reduce");this.message="Reduce of an empty stream requires an initial value"}};async function m(N,W,b){var o;if(typeof N!=="function")throw new B("reducer",["Function","AsyncFunction"],N);if(b!=null)T(b,"options");if((b===null||b===void 0?void 0:b.signal)!=null)M(b.signal,"options.signal");let s=arguments.length>1;if(b!==null&&b!==void 0&&(o=b.signal)!==null&&o!==void 0&&o.aborted){const Kq=new A(void 0,{cause:b.signal.reason});throw this.once("error",()=>{}),await k(this.destroy(Kq)),Kq}const e=new AbortController,Hq=e.signal;if(b!==null&&b!==void 0&&b.signal){const Kq={once:!0,[g]:this};b.signal.addEventListener("abort",()=>e.abort(),Kq)}let $q=!1;try{for await(let Kq of this){var qq;if($q=!0,b!==null&&b!==void 0&&(qq=b.signal)!==null&&qq!==void 0&&qq.aborted)throw new A;if(!s)W=Kq,s=!0;else W=await N(W,Kq,{signal:Hq})}if(!$q&&!s)throw new F}finally{e.abort()}return W}async function u(N){if(N!=null)T(N,"options");if((N===null||N===void 0?void 0:N.signal)!=null)M(N.signal,"options.signal");const W=[];for await(let o of this){var b;if(N!==null&&N!==void 0&&(b=N.signal)!==null&&b!==void 0&&b.aborted)throw new A(void 0,{cause:N.signal.reason});c(W,o)}return W}function J(N,W){const b=_.call(this,N,W);return async function*o(){for await(let s of b)yield*s}.call(this)}function z(N){if(N=l(N),D(N))return 0;if(N<0)throw new y("number",">= 0",N);return N}function w(N,W=void 0){if(W!=null)T(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");return N=z(N),async function*b(){var o;if(W!==null&&W!==void 0&&(o=W.signal)!==null&&o!==void 0&&o.aborted)throw new A;for await(let e of this){var s;if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)throw new A;if(N--<=0)yield e}}.call(this)}function S(N,W=void 0){if(W!=null)T(W,"options");if((W===null||W===void 0?void 0:W.signal)!=null)M(W.signal,"options.signal");return N=z(N),async function*b(){var o;if(W!==null&&W!==void 0&&(o=W.signal)!==null&&o!==void 0&&o.aborted)throw new A;for await(let e of this){var s;if(W!==null&&W!==void 0&&(s=W.signal)!==null&&s!==void 0&&s.aborted)throw new A;if(N-- >0)yield e;else return}}.call(this)}j.exports.streamReturningOperators={asIndexedPairs:t,drop:w,filter:K,flatMap:J,map:_,take:S},j.exports.promiseReturningOperators={every:$,forEach:Y,reduce:m,toArray:u,some:i,find:n}}}),Tq=Bq({"node_modules/readable-stream/lib/internal/streams/destroy.js"(a,j){var{aggregateTwoErrors:B,codes:{ERR_MULTIPLE_CALLBACK:G},AbortError:y}=Wq(),{Symbol:A}=Vq(),{kDestroyed:M,isDestroyed:R,isFinished:T,isServerRequest:g}=Eq(),k="#kDestroy",c="#kConstruct";function O(K,F,m){if(K){if(K.stack,F&&!F.errored)F.errored=K;if(m&&!m.errored)m.errored=K}}function l(K,F){const m=this._readableState,u=this._writableState,J=u||m;if(u&&u.destroyed||m&&m.destroyed){if(typeof F==="function")F();return this}if(O(K,u,m),u)u.destroyed=!0;if(m)m.destroyed=!0;if(!J.constructed)this.once(k,(z)=>{D(this,B(z,K),F)});else D(this,K,F);return this}function D(K,F,m){let u=!1;function J(z){if(u)return;u=!0;const{_readableState:w,_writableState:S}=K;if(O(z,S,w),S)S.closed=!0;if(w)w.closed=!0;if(typeof m==="function")m(z);if(z)Xq(p,K,z);else Xq(E,K)}try{K._destroy(F||null,J)}catch(z){J(z)}}function p(K,F){P(K,F),E(K)}function E(K){const{_readableState:F,_writableState:m}=K;if(m)m.closeEmitted=!0;if(F)F.closeEmitted=!0;if(m&&m.emitClose||F&&F.emitClose)K.emit("close")}function P(K,F){const m=K?._readableState,u=K?._writableState;if(u?.errorEmitted||m?.errorEmitted)return;if(u)u.errorEmitted=!0;if(m)m.errorEmitted=!0;K?.emit?.("error",F)}function Z(){const K=this._readableState,F=this._writableState;if(K)K.constructed=!0,K.closed=!1,K.closeEmitted=!1,K.destroyed=!1,K.errored=null,K.errorEmitted=!1,K.reading=!1,K.ended=K.readable===!1,K.endEmitted=K.readable===!1;if(F)F.constructed=!0,F.destroyed=!1,F.closed=!1,F.closeEmitted=!1,F.errored=null,F.errorEmitted=!1,F.finalCalled=!1,F.prefinished=!1,F.ended=F.writable===!1,F.ending=F.writable===!1,F.finished=F.writable===!1}function U(K,F,m){const u=K?._readableState,J=K?._writableState;if(J&&J.destroyed||u&&u.destroyed)return this;if(u&&u.autoDestroy||J&&J.autoDestroy)K.destroy(F);else if(F){if(Error.captureStackTrace(F),J&&!J.errored)J.errored=F;if(u&&!u.errored)u.errored=F;if(m)Xq(P,K,F);else P(K,F)}}function I(K,F){if(typeof K._construct!=="function")return;const{_readableState:m,_writableState:u}=K;if(m)m.constructed=!1;if(u)u.constructed=!1;if(K.once(c,F),K.listenerCount(c)>1)return;Xq(_,K)}function _(K){let F=!1;function m(u){if(F){U(K,u!==null&&u!==void 0?u:new G);return}F=!0;const{_readableState:J,_writableState:z}=K,w=z||J;if(J)J.constructed=!0;if(z)z.constructed=!0;if(w.destroyed)K.emit(k,u);else if(u)U(K,u,!0);else Xq(t,K)}try{K._construct(m)}catch(u){m(u)}}function t(K){K.emit(c)}function i(K){return K&&K.setHeader&&typeof K.abort==="function"}function $(K){K.emit("close")}function n(K,F){K.emit("error",F),Xq($,K)}function Y(K,F){if(!K||R(K))return;if(!F&&!T(K))F=new y;if(g(K))K.socket=null,K.destroy(F);else if(i(K))K.abort();else if(i(K.req))K.req.abort();else if(typeof K.destroy==="function")K.destroy(F);else if(typeof K.close==="function")K.close();else if(F)Xq(n,K);else Xq($,K);if(!K.destroyed)K[M]=!0}j.exports={construct:I,destroyer:Y,destroy:l,undestroy:Z,errorOrDestroy:U}}}),Rq=Bq({"node_modules/readable-stream/lib/internal/streams/legacy.js"(a,j){var{ArrayIsArray:B,ObjectSetPrototypeOf:G}=Vq();function y(M){if(!(this instanceof y))return new y(M);Iq.call(this,M)}G(y.prototype,Iq.prototype),G(y,Iq),y.prototype.pipe=function(M,R){const T=this;function g(E){if(M.writable&&M.write(E)===!1&&T.pause)T.pause()}T.on("data",g);function k(){if(T.readable&&T.resume)T.resume()}if(M.on("drain",k),!M._isStdio&&(!R||R.end!==!1))T.on("end",O),T.on("close",l);let c=!1;function O(){if(c)return;c=!0,M.end()}function l(){if(c)return;if(c=!0,typeof M.destroy==="function")M.destroy()}function D(E){if(p(),Iq.listenerCount(this,"error")===0)this.emit("error",E)}A(T,"error",D),A(M,"error",D);function p(){T.removeListener("data",g),M.removeListener("drain",k),T.removeListener("end",O),T.removeListener("close",l),T.removeListener("error",D),M.removeListener("error",D),T.removeListener("end",p),T.removeListener("close",p),M.removeListener("close",p)}return T.on("end",p),T.on("close",p),M.on("close",p),M.emit("pipe",T),M};function A(M,R,T){if(typeof M.prependListener==="function")return M.prependListener(R,T);if(!M._events||!M._events[R])M.on(R,T);else if(B(M._events[R]))M._events[R].unshift(T);else M._events[R]=[T,M._events[R]]}j.exports={Stream:y,prependListener:A}}}),Sq=Bq({"node_modules/readable-stream/lib/internal/streams/add-abort-signal.js"(a,j){var{AbortError:B,codes:G}=Wq(),y=Fq(),{ERR_INVALID_ARG_TYPE:A}=G,M=(T,g)=>{if(typeof T!=="object"||!("aborted"in T))throw new A(g,"AbortSignal",T)};function R(T){return!!(T&&typeof T.pipe==="function")}j.exports.addAbortSignal=function T(g,k){if(M(g,"signal"),!R(k))throw new A("stream","stream.Stream",k);return j.exports.addAbortSignalNoValidate(g,k)},j.exports.addAbortSignalNoValidate=function(T,g){if(typeof T!=="object"||!("aborted"in T))return g;const k=()=>{g.destroy(new B(void 0,{cause:T.reason}))};if(T.aborted)k();else T.addEventListener("abort",k),y(g,()=>T.removeEventListener("abort",k));return g}}}),JQ=Bq({"node_modules/readable-stream/lib/internal/streams/state.js"(a,j){var{MathFloor:B,NumberIsInteger:G}=Vq(),{ERR_INVALID_ARG_VALUE:y}=Wq().codes;function A(T,g,k){return T.highWaterMark!=null?T.highWaterMark:g?T[k]:null}function M(T){return T?16:16384}function R(T,g,k,c){const O=A(g,c,k);if(O!=null){if(!G(O)||O<0){const l=c?`options.${k}`:"options.highWaterMark";throw new y(l,O)}return B(O)}return M(T.objectMode)}j.exports={getHighWaterMark:R,getDefaultHighWaterMark:M}}}),hq=Bq({"node_modules/readable-stream/lib/internal/streams/from.js"(a,j){var{PromisePrototypeThen:B,SymbolAsyncIterator:G,SymbolIterator:y}=Vq(),{ERR_INVALID_ARG_TYPE:A,ERR_STREAM_NULL_VALUES:M}=Wq().codes;function R(T,g,k){let c;if(typeof g==="string"||g instanceof Buffer)return new T({objectMode:!0,...k,read(){this.push(g),this.push(null)}});let O;if(g&&g[G])O=!0,c=g[G]();else if(g&&g[y])O=!1,c=g[y]();else throw new A("iterable",["Iterable"],g);const l=new T({objectMode:!0,highWaterMark:1,...k});let D=!1;l._read=function(){if(!D)D=!0,E()},l._destroy=function(P,Z){B(p(P),()=>Xq(Z,P),(U)=>Xq(Z,U||P))};async function p(P){const Z=P!==void 0&&P!==null,U=typeof c.throw==="function";if(Z&&U){const{value:I,done:_}=await c.throw(P);if(await I,_)return}if(typeof c.return==="function"){const{value:I}=await c.return();await I}}async function E(){for(;;){try{const{value:P,done:Z}=O?await c.next():c.next();if(Z)l.push(null);else{const U=P&&typeof P.then==="function"?await P:P;if(U===null)throw D=!1,new M;else if(l.push(U))continue;else D=!1}}catch(P){l.destroy(P)}break}}return l}j.exports=R}}),pq,uq,_q=Bq({"node_modules/readable-stream/lib/internal/streams/readable.js"(a,j){var{ArrayPrototypeIndexOf:B,NumberIsInteger:G,NumberIsNaN:y,NumberParseInt:A,ObjectDefineProperties:M,ObjectKeys:R,ObjectSetPrototypeOf:T,Promise:g,SafeSet:k,SymbolAsyncIterator:c,Symbol:O}=Vq(),l=globalThis[Symbol.for("Bun.lazy")]("bun:stream").ReadableState,{Stream:D,prependListener:p}=Rq();function E(q){if(!(this instanceof E))return new E(q);const X=this instanceof Mq();if(this._readableState=new l(q,this,X),q){const{read:C,destroy:x,construct:v,signal:Jq}=q;if(typeof C==="function")this._read=C;if(typeof x==="function")this._destroy=x;if(typeof v==="function")this._construct=v;if(Jq&&!X)U(Jq,this)}D.call(this,q),K.construct(this,()=>{if(this._readableState.needReadable)n(this,this._readableState)})}T(E.prototype,D.prototype),T(E,D),E.prototype.on=function(q,X){const C=D.prototype.on.call(this,q,X),x=this._readableState;if(q==="data"){if(x.readableListening=this.listenerCount("readable")>0,x.flowing!==!1)this.resume()}else if(q==="readable"){if(!x.endEmitted&&!x.readableListening){if(x.readableListening=x.needReadable=!0,x.flowing=!1,x.emittedReadable=!1,x.length)Y(this,x);else if(!x.reading)Xq(Qq,this)}else if(x.endEmitted);}return C};class P extends E{#q;#Q;#X;#H;constructor(q,X){const{objectMode:C,highWaterMark:x,encoding:v,signal:Jq}=q;super({objectMode:C,highWaterMark:x,encoding:v,signal:Jq});this.#X=[],this.#q=void 0,this.#H=X,this.#Q=!1}#J(){var q=this.#X,X=0,C=q.length;for(;X<C;X++){const x=q[X];if(q[X]=void 0,!this.push(x,void 0))return this.#X=q.slice(X+1),!0}if(C>0)this.#X=[];return!1}#K(q){q.releaseLock(),this.#q=void 0,this.#Q=!0,this.push(null);return}async _read(){var q=this.#H,X=this.#q;if(q)X=this.#q=q.getReader(),this.#H=void 0;else if(this.#J())return;var C;try{do{var x=!1,v;const Jq=X.readMany();if(xq(Jq)){if({done:x,value:v}=await Jq,this.#Q){this.#X.push(...v);return}}else({done:x,value:v}=Jq);if(x){this.#K(X);return}if(!this.push(v[0])){this.#X=v.slice(1);return}for(let Zq=1,Oq=v.length;Zq<Oq;Zq++)if(!this.push(v[Zq])){this.#X=v.slice(Zq+1);return}}while(!this.#Q)}catch(Jq){C=Jq}finally{if(C)throw C}}_destroy(q,X){if(!this.#Q){var C=this.#q;if(C)this.#q=void 0,C.cancel(q).finally(()=>{this.#Q=!0,X(q)});return}try{X(q)}catch(x){globalThis.reportError(x)}}}uq=P;function Z(q,X={}){if(!tq(q))throw new m("readableStream","ReadableStream",q);S(X,"options");const{highWaterMark:C,encoding:x,objectMode:v=!1,signal:Jq}=X;if(x!==void 0&&!Buffer.isEncoding(x))throw new QQ(x,"options.encoding");return eq(v,"options.objectMode"),zQ(E,q,X)||new P({highWaterMark:C,encoding:x,objectMode:v,signal:Jq},q)}j.exports=E,pq=Z;var{addAbortSignal:U}=Sq(),I=Fq();const{maybeReadMore:_,resume:t,emitReadable:i,onEofChunk:$}=globalThis[Symbol.for("Bun.lazy")]("bun:stream");function n(q,X){process.nextTick(_,q,X)}function Y(q,X){i(q,X)}var K=Tq(),{aggregateTwoErrors:F,codes:{ERR_INVALID_ARG_TYPE:m,ERR_METHOD_NOT_IMPLEMENTED:u,ERR_OUT_OF_RANGE:J,ERR_STREAM_PUSH_AFTER_EOF:z,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:w}}=Wq(),{validateObject:S}=Cq(),N=hq(),W=()=>{},{errorOrDestroy:b}=K;E.prototype.destroy=K.destroy,E.prototype._undestroy=K.undestroy,E.prototype._destroy=function(q,X){X(q)},E.prototype[Iq.captureRejectionSymbol]=function(q){this.destroy(q)},E.prototype.push=function(q,X){return o(this,q,X,!1)},E.prototype.unshift=function(q,X){return o(this,q,X,!0)};function o(q,X,C,x){const v=q._readableState;let Jq;if(!v.objectMode){if(typeof X==="string"){if(C=C||v.defaultEncoding,v.encoding!==C)if(x&&v.encoding)X=Buffer.from(X,C).toString(v.encoding);else X=Buffer.from(X,C),C=""}else if(X instanceof Buffer)C="";else if(D._isUint8Array(X)){if(x||!v.decoder)X=D._uint8ArrayToBuffer(X);C=""}else if(X!=null)Jq=new m("chunk",["string","Buffer","Uint8Array"],X)}if(Jq)b(q,Jq);else if(X===null)v.reading=!1,$(q,v);else if(v.objectMode||X&&X.length>0)if(x)if(v.endEmitted)b(q,new w);else if(v.destroyed||v.errored)return!1;else s(q,v,X,!0);else if(v.ended)b(q,new z);else if(v.destroyed||v.errored)return!1;else if(v.reading=!1,v.decoder&&!C)if(X=v.decoder.write(X),v.objectMode||X.length!==0)s(q,v,X,!1);else n(q,v);else s(q,v,X,!1);else if(!x)v.reading=!1,n(q,v);return!v.ended&&(v.length<v.highWaterMark||v.length===0)}function s(q,X,C,x){if(X.flowing&&X.length===0&&!X.sync&&q.listenerCount("data")>0){if(X.multiAwaitDrain)X.awaitDrainWriters.clear();else X.awaitDrainWriters=null;X.dataEmitted=!0,q.emit("data",C)}else{if(X.length+=X.objectMode?1:C.length,x)X.buffer.unshift(C);else X.buffer.push(C);if(X.needReadable)Y(q,X)}n(q,X)}E.prototype.isPaused=function(){const q=this._readableState;return q.paused===!0||q.flowing===!1},E.prototype.setEncoding=function(q){const X=new aq(q);this._readableState.decoder=X,this._readableState.encoding=this._readableState.decoder.encoding;const C=this._readableState.buffer;let x="";for(let v=C.length;v>0;v--)x+=X.write(C.shift());if(x!=="")C.push(x);return this._readableState.length=x.length,this};var e=1073741824;function Hq(q){if(q>e)throw new J("size","<= 1GiB",q);else q--,q|=q>>>1,q|=q>>>2,q|=q>>>4,q|=q>>>8,q|=q>>>16,q++;return q}function $q(q,X){if(q<=0||X.length===0&&X.ended)return 0;if(X.objectMode)return 1;if(y(q)){if(X.flowing&&X.length)return X.buffer.first().length;return X.length}if(q<=X.length)return q;return X.ended?X.length:0}E.prototype.read=function(q){if(!G(q))q=A(q,10);const X=this._readableState,C=q;if(q>X.highWaterMark)X.highWaterMark=Hq(q);if(q!==0)X.emittedReadable=!1;if(q===0&&X.needReadable&&((X.highWaterMark!==0?X.length>=X.highWaterMark:X.length>0)||X.ended)){if(X.length===0&&X.ended)H(this);else Y(this,X);return null}if(q=$q(q,X),q===0&&X.ended){if(X.length===0)H(this);return null}let x=X.needReadable;if(X.length===0||X.length-q<X.highWaterMark)x=!0;if(X.ended||X.reading||X.destroyed||X.errored||!X.constructed)x=!1;else if(x){if(X.reading=!0,X.sync=!0,X.length===0)X.needReadable=!0;try{var v=this._read(X.highWaterMark);if(xq(v)){const Zq=Bun.peek(v);if(Zq!==v)v=Zq}if(xq(v)&&v?.then&&oq(v.then))v.then(W,function(Zq){b(this,Zq)})}catch(Zq){b(this,Zq)}if(X.sync=!1,!X.reading)q=$q(C,X)}let Jq;if(q>0)Jq=Q(q,X);else Jq=null;if(Jq===null)X.needReadable=X.length<=X.highWaterMark,q=0;else if(X.length-=q,X.multiAwaitDrain)X.awaitDrainWriters.clear();else X.awaitDrainWriters=null;if(X.length===0){if(!X.ended)X.needReadable=!0;if(C!==q&&X.ended)H(this)}if(Jq!==null&&!X.errorEmitted&&!X.closeEmitted)X.dataEmitted=!0,this.emit("data",Jq);return Jq},E.prototype._read=function(q){throw new u("_read()")},E.prototype.pipe=function(q,X){const C=this,x=this._readableState;if(x.pipes.length===1){if(!x.multiAwaitDrain)x.multiAwaitDrain=!0,x.awaitDrainWriters=new k(x.awaitDrainWriters?[x.awaitDrainWriters]:[])}x.pipes.push(q);const Jq=(!X||X.end!==!1)&&q!==process.stdout&&q!==process.stderr?Oq:Pq;if(x.endEmitted)Xq(Jq);else C.once("end",Jq);q.on("unpipe",Zq);function Zq(jq,Nq){if(jq===C){if(Nq&&Nq.hasUnpiped===!1)Nq.hasUnpiped=!0,nq()}}function Oq(){q.end()}let Lq,kq=!1;function nq(){if(q.removeListener("close",wq),q.removeListener("finish",vq),Lq)q.removeListener("drain",Lq);if(q.removeListener("error",Dq),q.removeListener("unpipe",Zq),C.removeListener("end",Oq),C.removeListener("end",Pq),C.removeListener("data",yq),kq=!0,Lq&&x.awaitDrainWriters&&(!q._writableState||q._writableState.needDrain))Lq()}function fq(){if(!kq){if(x.pipes.length===1&&x.pipes[0]===q)x.awaitDrainWriters=q,x.multiAwaitDrain=!1;else if(x.pipes.length>1&&x.pipes.includes(q))x.awaitDrainWriters.add(q);C.pause()}if(!Lq)Lq=qq(C,q),q.on("drain",Lq)}C.on("data",yq);function yq(jq){if(q.write(jq)===!1)fq()}function Dq(jq){if(Gq("onerror",jq),Pq(),q.removeListener("error",Dq),q.listenerCount("error")===0){const Nq=q._writableState||q._readableState;if(Nq&&!Nq.errorEmitted)b(q,jq);else q.emit("error",jq)}}p(q,"error",Dq);function wq(){q.removeListener("finish",vq),Pq()}q.once("close",wq);function vq(){Gq("onfinish"),q.removeListener("close",wq),Pq()}q.once("finish",vq);function Pq(){Gq("unpipe"),C.unpipe(q)}if(q.emit("pipe",C),q.writableNeedDrain===!0){if(x.flowing)fq()}else if(!x.flowing)Gq("pipe resume"),C.resume();return q};function qq(q,X){return function C(){const x=q._readableState;if(x.awaitDrainWriters===X)Gq("pipeOnDrain",1),x.awaitDrainWriters=null;else if(x.multiAwaitDrain)Gq("pipeOnDrain",x.awaitDrainWriters.size),x.awaitDrainWriters.delete(X);if((!x.awaitDrainWriters||x.awaitDrainWriters.size===0)&&q.listenerCount("data"))q.resume()}}E.prototype.unpipe=function(q){const X=this._readableState,C={hasUnpiped:!1};if(X.pipes.length===0)return this;if(!q){const v=X.pipes;X.pipes=[],this.pause();for(let Jq=0;Jq<v.length;Jq++)v[Jq].emit("unpipe",this,{hasUnpiped:!1});return this}const x=B(X.pipes,q);if(x===-1)return this;if(X.pipes.splice(x,1),X.pipes.length===0)this.pause();return q.emit("unpipe",this,C),this},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(q,X){const C=D.prototype.removeListener.call(this,q,X);if(q==="readable")Xq(Kq,this);return C},E.prototype.off=E.prototype.removeListener,E.prototype.removeAllListeners=function(q){const X=D.prototype.removeAllListeners.apply(this,arguments);if(q==="readable"||q===void 0)Xq(Kq,this);return X};function Kq(q){const X=q._readableState;if(X.readableListening=q.listenerCount("readable")>0,X.resumeScheduled&&X.paused===!1)X.flowing=!0;else if(q.listenerCount("data")>0)q.resume();else if(!X.readableListening)X.flowing=null}function Qq(q){q.read(0)}E.prototype.resume=function(){const q=this._readableState;if(!q.flowing)q.flowing=!q.readableListening,t(this,q);return q.paused=!1,this},E.prototype.pause=function(){if(this._readableState.flowing!==!1)this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this},E.prototype.wrap=function(q){let X=!1;q.on("data",(x)=>{if(!this.push(x)&&q.pause)X=!0,q.pause()}),q.on("end",()=>{this.push(null)}),q.on("error",(x)=>{b(this,x)}),q.on("close",()=>{this.destroy()}),q.on("destroy",()=>{this.destroy()}),this._read=()=>{if(X&&q.resume)X=!1,q.resume()};const C=R(q);for(let x=1;x<C.length;x++){const v=C[x];if(this[v]===void 0&&typeof q[v]==="function")this[v]=q[v].bind(q)}return this},E.prototype[c]=function(){return V(this)},E.prototype.iterator=function(q){if(q!==void 0)S(q,"options");return V(this,q)};function V(q,X){if(typeof q.read!=="function")q=E.wrap(q,{objectMode:!0});const C=h(q,X);return C.stream=q,C}async function*h(q,X){let C=W;function x(Zq){if(this===q)C(),C=W;else C=Zq}q.on("readable",x);let v;const Jq=I(q,{writable:!1},(Zq)=>{v=Zq?F(v,Zq):null,C(),C=W});try{while(!0){const Zq=q.destroyed?null:q.read();if(Zq!==null)yield Zq;else if(v)throw v;else if(v===null)return;else await new g(x)}}catch(Zq){throw v=F(v,Zq),v}finally{if((v||(X===null||X===void 0?void 0:X.destroyOnReturn)!==!1)&&(v===void 0||q._readableState.autoDestroy))K.destroyer(q,null);else q.off("readable",x),Jq()}}M(E.prototype,{readable:{get(){const q=this._readableState;return!!q&&q.readable!==!1&&!q.destroyed&&!q.errorEmitted&&!q.endEmitted},set(q){if(this._readableState)this._readableState.readable=!!q}},readableDidRead:{enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{enumerable:!1,get:function(){return this._readableState.flowing},set:function(q){if(this._readableState)this._readableState.flowing=q}},readableLength:{enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{get(){return this._readableState?this._readableState.closed:!1}},destroyed:{enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(q){if(!this._readableState)return;this._readableState.destroyed=q}},readableEnded:{enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),E._fromList=Q;function Q(q,X){if(X.length===0)return null;let C;if(X.objectMode)C=X.buffer.shift();else if(!q||q>=X.length){if(X.decoder)C=X.buffer.join("");else if(X.buffer.length===1)C=X.buffer.first();else C=X.buffer.concat(X.length);X.buffer.clear()}else C=X.buffer.consume(q,X.decoder);return C}function H(q){const X=q._readableState;if(!X.endEmitted)X.ended=!0,Xq(L,X,q)}function L(q,X){if(!q.errored&&!q.closeEmitted&&!q.endEmitted&&q.length===0){if(q.endEmitted=!0,X.emit("end"),X.writable&&X.allowHalfOpen===!1)Xq(d,X);else if(q.autoDestroy){const C=X._writableState;if(!C||C.autoDestroy&&(C.finished||C.writable===!1))X.destroy()}}}function d(q){if(q.writable&&!q.writableEnded&&!q.destroyed)q.end()}E.from=function(q,X){return N(E,q,X)};var f={newStreamReadableFromReadableStream:Z};function r(){if(f===void 0)f={};return f}E.fromWeb=function(q,X){return r().newStreamReadableFromReadableStream(q,X)},E.toWeb=function(q){return r().newReadableStreamFromStreamReadable(q)},E.wrap=function(q,X){var C,x;return new E({objectMode:(C=(x=q.readableObjectMode)!==null&&x!==void 0?x:q.objectMode)!==null&&C!==void 0?C:!0,...X,destroy(v,Jq){K.destroyer(q,v),Jq(v)}}).wrap(q)}}}),bq=Bq({"node_modules/readable-stream/lib/internal/streams/writable.js"(a,j){var{ArrayPrototypeSlice:B,Error:G,FunctionPrototypeSymbolHasInstance:y,ObjectDefineProperty:A,ObjectDefineProperties:M,ObjectSetPrototypeOf:R,StringPrototypeToLowerCase:T,Symbol:g,SymbolHasInstance:k}=Vq(),c=Rq().Stream,O=Tq(),{addAbortSignal:l}=Sq(),{getHighWaterMark:D,getDefaultHighWaterMark:p}=JQ(),{ERR_INVALID_ARG_TYPE:E,ERR_METHOD_NOT_IMPLEMENTED:P,ERR_MULTIPLE_CALLBACK:Z,ERR_STREAM_CANNOT_PIPE:U,ERR_STREAM_DESTROYED:I,ERR_STREAM_ALREADY_FINISHED:_,ERR_STREAM_NULL_VALUES:t,ERR_STREAM_WRITE_AFTER_END:i,ERR_UNKNOWN_ENCODING:$}=Wq().codes,{errorOrDestroy:n}=O;function Y(Q={}){const H=this instanceof Mq();if(!H&&!y(Y,this))return new Y(Q);if(this._writableState=new m(Q,this,H),Q){if(typeof Q.write==="function")this._write=Q.write;if(typeof Q.writev==="function")this._writev=Q.writev;if(typeof Q.destroy==="function")this._destroy=Q.destroy;if(typeof Q.final==="function")this._final=Q.final;if(typeof Q.construct==="function")this._construct=Q.construct;if(Q.signal)l(Q.signal,this)}c.call(this,Q),O.construct(this,()=>{const L=this._writableState;if(!L.writing)s(this,L);qq(this,L)})}R(Y.prototype,c.prototype),R(Y,c),j.exports=Y;function K(){}var F=g("kOnFinished");function m(Q,H,L){if(typeof L!=="boolean")L=H instanceof Mq();if(this.objectMode=!!(Q&&Q.objectMode),L)this.objectMode=this.objectMode||!!(Q&&Q.writableObjectMode);this.highWaterMark=Q?D(this,Q,"writableHighWaterMark",L):p(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const d=!!(Q&&Q.decodeStrings===!1);this.decodeStrings=!d,this.defaultEncoding=Q&&Q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=N.bind(void 0,H),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=!Q||Q.emitClose!==!1,this.autoDestroy=!Q||Q.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[F]=[]}function u(Q){Q.buffered=[],Q.bufferedIndex=0,Q.allBuffers=!0,Q.allNoop=!0}m.prototype.getBuffer=function Q(){return B(this.buffered,this.bufferedIndex)},A(m.prototype,"bufferedRequestCount",{get(){return this.buffered.length-this.bufferedIndex}}),A(Y,k,{value:function(Q){if(y(this,Q))return!0;if(this!==Y)return!1;return Q&&Q._writableState instanceof m}}),Y.prototype.pipe=function(){n(this,new U)};function J(Q,H,L,d){const f=Q._writableState;if(typeof L==="function")d=L,L=f.defaultEncoding;else{if(!L)L=f.defaultEncoding;else if(L!=="buffer"&&!Buffer.isEncoding(L))throw new $(L);if(typeof d!=="function")d=K}if(H===null)throw new t;else if(!f.objectMode)if(typeof H==="string"){if(f.decodeStrings!==!1)H=Buffer.from(H,L),L="buffer"}else if(H instanceof Buffer)L="buffer";else if(c._isUint8Array(H))H=c._uint8ArrayToBuffer(H),L="buffer";else throw new E("chunk",["string","Buffer","Uint8Array"],H);let r;if(f.ending)r=new i;else if(f.destroyed)r=new I("write");if(r)return Xq(d,r),n(Q,r,!0),r;return f.pendingcb++,z(Q,f,H,L,d)}Y.prototype.write=function(Q,H,L){return J(this,Q,H,L)===!0},Y.prototype.cork=function(){this._writableState.corked++},Y.prototype.uncork=function(){const Q=this._writableState;if(Q.corked){if(Q.corked--,!Q.writing)s(this,Q)}},Y.prototype.setDefaultEncoding=function Q(H){if(typeof H==="string")H=T(H);if(!Buffer.isEncoding(H))throw new $(H);return this._writableState.defaultEncoding=H,this};function z(Q,H,L,d,f){const r=H.objectMode?1:L.length;H.length+=r;const q=H.length<H.highWaterMark;if(!q)H.needDrain=!0;if(H.writing||H.corked||H.errored||!H.constructed){if(H.buffered.push({chunk:L,encoding:d,callback:f}),H.allBuffers&&d!=="buffer")H.allBuffers=!1;if(H.allNoop&&f!==K)H.allNoop=!1}else H.writelen=r,H.writecb=f,H.writing=!0,H.sync=!0,Q._write(L,d,H.onwrite),H.sync=!1;return q&&!H.errored&&!H.destroyed}function w(Q,H,L,d,f,r,q){if(H.writelen=d,H.writecb=q,H.writing=!0,H.sync=!0,H.destroyed)H.onwrite(new I("write"));else if(L)Q._writev(f,H.onwrite);else Q._write(f,r,H.onwrite);H.sync=!1}function S(Q,H,L,d){--H.pendingcb,d(L),o(H),n(Q,L)}function N(Q,H){const L=Q._writableState,d=L.sync,f=L.writecb;if(typeof f!=="function"){n(Q,new Z);return}if(L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0,H){if(Error.captureStackTrace(H),!L.errored)L.errored=H;if(Q._readableState&&!Q._readableState.errored)Q._readableState.errored=H;if(d)Xq(S,Q,L,H,f);else S(Q,L,H,f)}else{if(L.buffered.length>L.bufferedIndex)s(Q,L);if(d)if(L.afterWriteTickInfo!==null&&L.afterWriteTickInfo.cb===f)L.afterWriteTickInfo.count++;else L.afterWriteTickInfo={count:1,cb:f,stream:Q,state:L},Xq(W,L.afterWriteTickInfo);else b(Q,L,1,f)}}function W({stream:Q,state:H,count:L,cb:d}){return H.afterWriteTickInfo=null,b(Q,H,L,d)}function b(Q,H,L,d){if(!H.ending&&!Q.destroyed&&H.length===0&&H.needDrain)H.needDrain=!1,Q.emit("drain");while(L-- >0)H.pendingcb--,d();if(H.destroyed)o(H);qq(Q,H)}function o(Q){if(Q.writing)return;for(let f=Q.bufferedIndex;f<Q.buffered.length;++f){var H;const{chunk:r,callback:q}=Q.buffered[f],X=Q.objectMode?1:r.length;Q.length-=X,q((H=Q.errored)!==null&&H!==void 0?H:new I("write"))}const L=Q[F].splice(0);for(let f=0;f<L.length;f++){var d;L[f]((d=Q.errored)!==null&&d!==void 0?d:new I("end"))}u(Q)}function s(Q,H){if(H.corked||H.bufferProcessing||H.destroyed||!H.constructed)return;const{buffered:L,bufferedIndex:d,objectMode:f}=H,r=L.length-d;if(!r)return;let q=d;if(H.bufferProcessing=!0,r>1&&Q._writev){H.pendingcb-=r-1;const X=H.allNoop?K:(x)=>{for(let v=q;v<L.length;++v)L[v].callback(x)},C=H.allNoop&&q===0?L:B(L,q);C.allBuffers=H.allBuffers,w(Q,H,!0,H.length,C,"",X),u(H)}else{do{const{chunk:X,encoding:C,callback:x}=L[q];L[q++]=null;const v=f?1:X.length;w(Q,H,!1,v,X,C,x)}while(q<L.length&&!H.writing);if(q===L.length)u(H);else if(q>256)L.splice(0,q),H.bufferedIndex=0;else H.bufferedIndex=q}H.bufferProcessing=!1}Y.prototype._write=function(Q,H,L){if(this._writev)this._writev([{chunk:Q,encoding:H}],L);else throw new P("_write()")},Y.prototype._writev=null,Y.prototype.end=function(Q,H,L,d=!1){const f=this._writableState;if(typeof Q==="function")L=Q,Q=null,H=null;else if(typeof H==="function")L=H,H=null;let r;if(Q!==null&&Q!==void 0){let q;if(!d)q=J(this,Q,H);else q=this.write(Q,H);if(q instanceof G)r=q}if(f.corked)f.corked=1,this.uncork();if(r)this.emit("error",r);else if(!f.errored&&!f.ending)f.ending=!0,qq(this,f,!0),f.ended=!0;else if(f.finished)r=new _("end");else if(f.destroyed)r=new I("end");if(typeof L==="function")if(r||f.finished)Xq(L,r);else f[F].push(L);return this};function e(Q,H){var L=Q.ending&&!Q.destroyed&&Q.constructed&&Q.length===0&&!Q.errored&&Q.buffered.length===0&&!Q.finished&&!Q.writing&&!Q.errorEmitted&&!Q.closeEmitted;return Gq("needFinish",L,H),L}function Hq(Q,H){let L=!1;function d(f){if(L){n(Q,f!==null&&f!==void 0?f:Z());return}if(L=!0,H.pendingcb--,f){const r=H[F].splice(0);for(let q=0;q<r.length;q++)r[q](f);n(Q,f,H.sync)}else if(e(H))H.prefinished=!0,Q.emit("prefinish"),H.pendingcb++,Xq(Kq,Q,H)}H.sync=!0,H.pendingcb++;try{Q._final(d)}catch(f){d(f)}H.sync=!1}function $q(Q,H){if(!H.prefinished&&!H.finalCalled)if(typeof Q._final==="function"&&!H.destroyed)H.finalCalled=!0,Hq(Q,H);else H.prefinished=!0,Q.emit("prefinish")}function qq(Q,H,L){if(!e(H,Q.__id))return;if($q(Q,H),H.pendingcb===0){if(L)H.pendingcb++,Xq((d,f)=>{if(e(f))Kq(d,f);else f.pendingcb--},Q,H);else if(e(H))H.pendingcb++,Kq(Q,H)}}function Kq(Q,H){H.pendingcb--,H.finished=!0;const L=H[F].splice(0);for(let d=0;d<L.length;d++)L[d]();if(Q.emit("finish"),H.autoDestroy){const d=Q._readableState;if(!d||d.autoDestroy&&(d.endEmitted||d.readable===!1))Q.destroy()}}M(Y.prototype,{closed:{get(){return this._writableState?this._writableState.closed:!1}},destroyed:{get(){return this._writableState?this._writableState.destroyed:!1},set(Q){if(this._writableState)this._writableState.destroyed=Q}},writable:{get(){const Q=this._writableState;return!!Q&&Q.writable!==!1&&!Q.destroyed&&!Q.errored&&!Q.ending&&!Q.ended},set(Q){if(this._writableState)this._writableState.writable=!!Q}},writableFinished:{get(){return this._writableState?this._writableState.finished:!1}},writableObjectMode:{get(){return this._writableState?this._writableState.objectMode:!1}},writableBuffer:{get(){return this._writableState&&this._writableState.getBuffer()}},writableEnded:{get(){return this._writableState?this._writableState.ending:!1}},writableNeedDrain:{get(){const Q=this._writableState;if(!Q)return!1;return!Q.destroyed&&!Q.ending&&Q.needDrain}},writableHighWaterMark:{get(){return this._writableState&&this._writableState.highWaterMark}},writableCorked:{get(){return this._writableState?this._writableState.corked:0}},writableLength:{get(){return this._writableState&&this._writableState.length}},errored:{enumerable:!1,get(){return this._writableState?this._writableState.errored:null}},writableAborted:{enumerable:!1,get:function(){return!!(this._writableState.writable!==!1&&(this._writableState.destroyed||this._writableState.errored)&&!this._writableState.finished)}}});var Qq=O.destroy;Y.prototype.destroy=function(Q,H){const L=this._writableState;if(!L.destroyed&&(L.bufferedIndex<L.buffered.length||L[F].length))Xq(o,L);return Qq.call(this,Q,H),this},Y.prototype._undestroy=O.undestroy,Y.prototype._destroy=function(Q,H){H(Q)},Y.prototype[Iq.captureRejectionSymbol]=function(Q){this.destroy(Q)};var V;function h(){if(V===void 0)V={};return V}Y.fromWeb=function(Q,H){return h().newStreamWritableFromWritableStream(Q,H)},Y.toWeb=function(Q){return h().newWritableStreamFromStreamWritable(Q)}}}),HQ=Bq({"node_modules/readable-stream/lib/internal/streams/duplexify.js"(a,j){var{isReadable:B,isWritable:G,isIterable:y,isNodeStream:A,isReadableNodeStream:M,isWritableNodeStream:R,isDuplexNodeStream:T}=Eq(),g=Fq(),{AbortError:k,codes:{ERR_INVALID_ARG_TYPE:c,ERR_INVALID_RETURN_VALUE:O}}=Wq(),{destroyer:l}=Tq(),D=Mq(),p=_q(),{createDeferredPromise:E}=Aq(),P=hq(),Z=typeof Blob!=="undefined"?function i($){return $ instanceof Blob}:function i($){return!1},{FunctionPrototypeCall:U}=Vq();class I extends D{constructor(i){super(i);if((i===null||i===void 0?void 0:i.readable)===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if((i===null||i===void 0?void 0:i.writable)===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}}j.exports=function i($,n){if(T($))return $;if(M($))return t({readable:$});if(R($))return t({writable:$});if(A($))return t({writable:!1,readable:!1});if(typeof $==="function"){const{value:K,write:F,final:m,destroy:u}=_($);if(y(K))return P(I,K,{objectMode:!0,write:F,final:m,destroy:u});const J=K===null||K===void 0?void 0:K.then;if(typeof J==="function"){let z;const w=U(J,K,(S)=>{if(S!=null)throw new O("nully","body",S)},(S)=>{l(z,S)});return z=new I({objectMode:!0,readable:!1,write:F,final(S){m(async()=>{try{await w,Xq(S,null)}catch(N){Xq(S,N)}})},destroy:u})}throw new O("Iterable, AsyncIterable or AsyncFunction",n,K)}if(Z($))return i($.arrayBuffer());if(y($))return P(I,$,{objectMode:!0,writable:!1});if(typeof($===null||$===void 0?void 0:$.writable)==="object"||typeof($===null||$===void 0?void 0:$.readable)==="object"){const K=$!==null&&$!==void 0&&$.readable?M($===null||$===void 0?void 0:$.readable)?$===null||$===void 0?void 0:$.readable:i($.readable):void 0,F=$!==null&&$!==void 0&&$.writable?R($===null||$===void 0?void 0:$.writable)?$===null||$===void 0?void 0:$.writable:i($.writable):void 0;return t({readable:K,writable:F})}const Y=$===null||$===void 0?void 0:$.then;if(typeof Y==="function"){let K;return U(Y,$,(F)=>{if(F!=null)K.push(F);K.push(null)},(F)=>{l(K,F)}),K=new I({objectMode:!0,writable:!1,read(){}})}throw new c(n,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],$)};function _(i){let{promise:$,resolve:n}=E();const Y=new AbortController,K=Y.signal;return{value:i(async function*(){while(!0){const m=$;$=null;const{chunk:u,done:J,cb:z}=await m;if(Xq(z),J)return;if(K.aborted)throw new k(void 0,{cause:K.reason});({promise:$,resolve:n}=E()),yield u}}(),{signal:K}),write(m,u,J){const z=n;n=null,z({chunk:m,done:!1,cb:J})},final(m){const u=n;n=null,u({done:!0,cb:m})},destroy(m,u){Y.abort(),u(m)}}}function t(i){const $=i.readable&&typeof i.readable.read!=="function"?p.wrap(i.readable):i.readable,n=i.writable;let Y=!!B($),K=!!G(n),F,m,u,J,z;function w(S){const N=J;if(J=null,N)N(S);else if(S)z.destroy(S);else if(!Y&&!K)z.destroy()}if(z=new I({readableObjectMode:!!($!==null&&$!==void 0&&$.readableObjectMode),writableObjectMode:!!(n!==null&&n!==void 0&&n.writableObjectMode),readable:Y,writable:K}),K)g(n,(S)=>{if(K=!1,S)l($,S);w(S)}),z._write=function(S,N,W){if(n.write(S,N))W();else F=W},z._final=function(S){n.end(),m=S},n.on("drain",function(){if(F){const S=F;F=null,S()}}),n.on("finish",function(){if(m){const S=m;m=null,S()}});if(Y)g($,(S)=>{if(Y=!1,S)l($,S);w(S)}),$.on("readable",function(){if(u){const S=u;u=null,S()}}),$.on("end",function(){z.push(null)}),z._read=function(){while(!0){const S=$.read();if(S===null){u=z._read;return}if(!z.push(S))return}};return z._destroy=function(S,N){if(!S&&J!==null)S=new k;if(u=null,F=null,m=null,J===null)N(S);else J=N,l(n,S),l($,S)},z}}}),Mq=Bq({"node_modules/readable-stream/lib/internal/streams/duplex.js"(a,j){var{ObjectDefineProperties:B,ObjectGetOwnPropertyDescriptor:G,ObjectKeys:y,ObjectSetPrototypeOf:A}=Vq(),M=_q();function R(O){if(!(this instanceof R))return new R(O);if(M.call(this,O),Uq.call(this,O),O){if(this.allowHalfOpen=O.allowHalfOpen!==!1,O.readable===!1)this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0;if(O.writable===!1)this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0}else this.allowHalfOpen=!0}j.exports=R,A(R.prototype,M.prototype),A(R,M);for(var T in Uq.prototype)if(!R.prototype[T])R.prototype[T]=Uq.prototype[T];B(R.prototype,{writable:G(Uq.prototype,"writable"),writableHighWaterMark:G(Uq.prototype,"writableHighWaterMark"),writableObjectMode:G(Uq.prototype,"writableObjectMode"),writableBuffer:G(Uq.prototype,"writableBuffer"),writableLength:G(Uq.prototype,"writableLength"),writableFinished:G(Uq.prototype,"writableFinished"),writableCorked:G(Uq.prototype,"writableCorked"),writableEnded:G(Uq.prototype,"writableEnded"),writableNeedDrain:G(Uq.prototype,"writableNeedDrain"),destroyed:{get(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set(O){if(this._readableState&&this._writableState)this._readableState.destroyed=O,this._writableState.destroyed=O}}});var g;function k(){if(g===void 0)g={};return g}R.fromWeb=function(O,l){return k().newStreamDuplexFromReadableWritablePair(O,l)},R.toWeb=function(O){return k().newReadableWritablePairFromDuplex(O)};var c;R.from=function(O){if(!c)c=HQ();return c(O,"body")}}}),mq=Bq({"node_modules/readable-stream/lib/internal/streams/transform.js"(a,j){var{ObjectSetPrototypeOf:B,Symbol:G}=Vq(),{ERR_METHOD_NOT_IMPLEMENTED:y}=Wq().codes,A=Mq();function M(k){if(!(this instanceof M))return new M(k);if(A.call(this,k),this._readableState.sync=!1,this[R]=null,k){if(typeof k.transform==="function")this._transform=k.transform;if(typeof k.flush==="function")this._flush=k.flush}this.on("prefinish",g.bind(this))}B(M.prototype,A.prototype),B(M,A),j.exports=M;var R=G("kCallback");function T(k){if(typeof this._flush==="function"&&!this.destroyed)this._flush((c,O)=>{if(c){if(k)k(c);else this.destroy(c);return}if(O!=null)this.push(O);if(this.push(null),k)k()});else if(this.push(null),k)k()}function g(){if(this._final!==T)T.call(this)}M.prototype._final=T,M.prototype._transform=function(k,c,O){throw new y("_transform()")},M.prototype._write=function(k,c,O){const l=this._readableState,D=this._writableState,p=l.length;this._transform(k,c,(E,P)=>{if(E){O(E);return}if(P!=null)this.push(P);if(D.ended||p===l.length||l.length<l.highWaterMark||l.highWaterMark===0||l.length===0)O();else this[R]=O})},M.prototype._read=function(){if(this[R]){const k=this[R];this[R]=null,k()}}}}),cq=Bq({"node_modules/readable-stream/lib/internal/streams/passthrough.js"(a,j){var{ObjectSetPrototypeOf:B}=Vq(),G=mq();function y(A){if(!(this instanceof y))return new y(A);G.call(this,A)}B(y.prototype,G.prototype),B(y,G),y.prototype._transform=function(A,M,R){R(null,A)},j.exports=y}}),gq=Bq({"node_modules/readable-stream/lib/internal/streams/pipeline.js"(a,j){var{ArrayIsArray:B,Promise:G,SymbolAsyncIterator:y}=Vq(),A=Fq(),{once:M}=Aq(),R=Tq(),T=Mq(),{aggregateTwoErrors:g,codes:{ERR_INVALID_ARG_TYPE:k,ERR_INVALID_RETURN_VALUE:c,ERR_MISSING_ARGS:O,ERR_STREAM_DESTROYED:l},AbortError:D}=Wq(),{validateFunction:p,validateAbortSignal:E}=Cq(),{isIterable:P,isReadable:Z,isReadableNodeStream:U,isNodeStream:I}=Eq(),_,t;function i(J,z,w){let S=!1;J.on("close",()=>{S=!0});const N=A(J,{readable:z,writable:w},(W)=>{S=!W});return{destroy:(W)=>{if(S)return;S=!0,R.destroyer(J,W||new l("pipe"))},cleanup:N}}function $(J){return p(J[J.length-1],"streams[stream.length - 1]"),J.pop()}function n(J){if(P(J))return J;else if(U(J))return Y(J);throw new k("val",["Readable","Iterable","AsyncIterable"],J)}async function*Y(J){if(!t)t=_q();yield*t.prototype[y].call(J)}async function K(J,z,w,{end:S}){let N,W=null;const b=(e)=>{if(e)N=e;if(W){const Hq=W;W=null,Hq()}},o=()=>new G((e,Hq)=>{if(N)Hq(N);else W=()=>{if(N)Hq(N);else e()}});z.on("drain",b);const s=A(z,{readable:!1},b);try{if(z.writableNeedDrain)await o();for await(let e of J)if(!z.write(e))await o();if(S)z.end();await o(),w()}catch(e){w(N!==e?g(N,e):e)}finally{s(),z.off("drain",b)}}function F(...J){return m(J,M($(J)))}function m(J,z,w){if(J.length===1&&B(J[0]))J=J[0];if(J.length<2)throw new O("streams");const S=new AbortController,N=S.signal,W=w===null||w===void 0?void 0:w.signal,b=[];E(W,"options.signal");function o(){Kq(new D)}W===null||W===void 0||W.addEventListener("abort",o);let s,e;const Hq=[];let $q=0;function qq(h){Kq(h,--$q===0)}function Kq(h,Q){if(h&&(!s||s.code==="ERR_STREAM_PREMATURE_CLOSE"))s=h;if(!s&&!Q)return;while(Hq.length)Hq.shift()(s);if(W===null||W===void 0||W.removeEventListener("abort",o),S.abort(),Q){if(!s)b.forEach((H)=>H());Xq(z,s,e)}}let Qq;for(let h=0;h<J.length;h++){const Q=J[h],H=h<J.length-1,L=h>0,d=H||(w===null||w===void 0?void 0:w.end)!==!1,f=h===J.length-1;if(I(Q)){let r=function(q){if(q&&q.name!=="AbortError"&&q.code!=="ERR_STREAM_PREMATURE_CLOSE")qq(q)};if(d){const{destroy:q,cleanup:X}=i(Q,H,L);if(Hq.push(q),Z(Q)&&f)b.push(X)}if(Q.on("error",r),Z(Q)&&f)b.push(()=>{Q.removeListener("error",r)})}if(h===0)if(typeof Q==="function"){if(Qq=Q({signal:N}),!P(Qq))throw new c("Iterable, AsyncIterable or Stream","source",Qq)}else if(P(Q)||U(Q))Qq=Q;else Qq=T.from(Q);else if(typeof Q==="function")if(Qq=n(Qq),Qq=Q(Qq,{signal:N}),H){if(!P(Qq,!0))throw new c("AsyncIterable",`transform[${h-1}]`,Qq)}else{var V;if(!_)_=cq();const r=new _({objectMode:!0}),q=(V=Qq)===null||V===void 0?void 0:V.then;if(typeof q==="function")$q++,q.call(Qq,(x)=>{if(e=x,x!=null)r.write(x);if(d)r.end();Xq(qq)},(x)=>{r.destroy(x),Xq(qq,x)});else if(P(Qq,!0))$q++,K(Qq,r,qq,{end:d});else throw new c("AsyncIterable or Promise","destination",Qq);Qq=r;const{destroy:X,cleanup:C}=i(Qq,!1,!0);if(Hq.push(X),f)b.push(C)}else if(I(Q)){if(U(Qq)){$q+=2;const r=u(Qq,Q,qq,{end:d});if(Z(Q)&&f)b.push(r)}else if(P(Qq))$q++,K(Qq,Q,qq,{end:d});else throw new k("val",["Readable","Iterable","AsyncIterable"],Qq);Qq=Q}else Qq=T.from(Q)}if(N!==null&&N!==void 0&&N.aborted||W!==null&&W!==void 0&&W.aborted)Xq(o);return Qq}function u(J,z,w,{end:S}){if(J.pipe(z,{end:S}),S)J.once("end",()=>z.end());else w();return A(J,{readable:!0,writable:!1},(N)=>{const W=J._readableState;if(N&&N.code==="ERR_STREAM_PREMATURE_CLOSE"&&W&&W.ended&&!W.errored&&!W.errorEmitted)J.once("end",w).once("error",w);else w(N)}),A(z,{readable:!1,writable:!0},w)}j.exports={pipelineImpl:m,pipeline:F}}}),KQ=Bq({"node_modules/readable-stream/lib/internal/streams/compose.js"(a,j){var{pipeline:B}=gq(),G=Mq(),{destroyer:y}=Tq(),{isNodeStream:A,isReadable:M,isWritable:R}=Eq(),{AbortError:T,codes:{ERR_INVALID_ARG_VALUE:g,ERR_MISSING_ARGS:k}}=Wq();j.exports=function c(...O){if(O.length===0)throw new k("streams");if(O.length===1)return G.from(O[0]);const l=[...O];if(typeof O[0]==="function")O[0]=G.from(O[0]);if(typeof O[O.length-1]==="function"){const $=O.length-1;O[$]=G.from(O[$])}for(let $=0;$<O.length;++$){if(!A(O[$]))continue;if($<O.length-1&&!M(O[$]))throw new g(`streams[${$}]`,l[$],"must be readable");if($>0&&!R(O[$]))throw new g(`streams[${$}]`,l[$],"must be writable")}let D,p,E,P,Z;function U($){const n=P;if(P=null,n)n($);else if($)Z.destroy($);else if(!i&&!t)Z.destroy()}const I=O[0],_=B(O,U),t=!!R(I),i=!!M(_);if(Z=new G({writableObjectMode:!!(I!==null&&I!==void 0&&I.writableObjectMode),readableObjectMode:!!(_!==null&&_!==void 0&&_.writableObjectMode),writable:t,readable:i}),t)Z._write=function($,n,Y){if(I.write($,n))Y();else D=Y},Z._final=function($){I.end(),p=$},I.on("drain",function(){if(D){const $=D;D=null,$()}}),_.on("finish",function(){if(p){const $=p;p=null,$()}});if(i)_.on("readable",function(){if(E){const $=E;E=null,$()}}),_.on("end",function(){Z.push(null)}),Z._read=function(){while(!0){const $=_.read();if($===null){E=Z._read;return}if(!Z.push($))return}};return Z._destroy=function($,n){if(!$&&P!==null)$=new T;if(E=null,D=null,p=null,P===null)n($);else P=n,y(_,$)},Z}}}),dq=Bq({"node_modules/readable-stream/lib/stream/promises.js"(a,j){var{ArrayPrototypePop:B,Promise:G}=Vq(),{isIterable:y,isNodeStream:A}=Eq(),{pipelineImpl:M}=gq(),{finished:R}=Fq();function T(...g){return new G((k,c)=>{let O,l;const D=g[g.length-1];if(D&&typeof D==="object"&&!A(D)&&!y(D)){const p=B(g);O=p.signal,l=p.end}M(g,(p,E)=>{if(p)c(p);else k(E)},{signal:O,end:l})})}j.exports={finished:R,pipeline:T}}}),ZQ=Bq({"node_modules/readable-stream/lib/stream.js"(a,j){var{ObjectDefineProperty:B,ObjectKeys:G,ReflectApply:y}=Vq(),{promisify:{custom:A}}=Aq(),{streamReturningOperators:M,promiseReturningOperators:R}=XQ(),{codes:{ERR_ILLEGAL_CONSTRUCTOR:T}}=Wq(),g=KQ(),{pipeline:k}=gq(),{destroyer:c}=Tq(),O=Fq(),l=dq(),D=Eq(),p=j.exports=Rq().Stream;p.isDisturbed=D.isDisturbed,p.isErrored=D.isErrored,p.isWritable=D.isWritable,p.isReadable=D.isReadable,p.Readable=_q();for(let P of G(M)){let Z=function(...I){if(new.target)throw T();return p.Readable.from(y(U,this,I))};const U=M[P];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,P,{value:Z,enumerable:!1,configurable:!0,writable:!0})}for(let P of G(R)){let Z=function(...I){if(new.target)throw T();return y(U,this,I)};const U=R[P];B(Z,"name",{value:U.name}),B(Z,"length",{value:U.length}),B(p.Readable.prototype,P,{value:Z,enumerable:!1,configurable:!0,writable:!0})}p.Writable=bq(),p.Duplex=Mq(),p.Transform=mq(),p.PassThrough=cq(),p.pipeline=k;var{addAbortSignal:E}=Sq();p.addAbortSignal=E,p.finished=O,p.destroy=c,p.compose=g,B(p,"promises",{configurable:!0,enumerable:!0,get(){return l}}),B(k,A,{enumerable:!0,get(){return l.pipeline}}),B(O,A,{enumerable:!0,get(){return l.finished}}),p.Stream=p,p._isUint8Array=function P(Z){return Z instanceof Uint8Array},p._uint8ArrayToBuffer=function P(Z){return new Buffer(Z.buffer,Z.byteOffset,Z.byteLength)}}}),BQ=Bq({"node_modules/readable-stream/lib/ours/index.js"(a,j){const B=ZQ(),G=dq(),y=B.Readable.destroy;j.exports=B,j.exports._uint8ArrayToBuffer=B._uint8ArrayToBuffer,j.exports._isUint8Array=B._isUint8Array,j.exports.isDisturbed=B.isDisturbed,j.exports.isErrored=B.isErrored,j.exports.isWritable=B.isWritable,j.exports.isReadable=B.isReadable,j.exports.Readable=B.Readable,j.exports.Writable=B.Writable,j.exports.Duplex=B.Duplex,j.exports.Transform=B.Transform,j.exports.PassThrough=B.PassThrough,j.exports.addAbortSignal=B.addAbortSignal,j.exports.finished=B.finished,j.exports.destroy=B.destroy,j.exports.destroy=y,j.exports.pipeline=B.pipeline,j.exports.compose=B.compose,j.exports._getNativeReadableStreamPrototype=lq,j.exports.NativeWritable=iq,zq.defineProperty(B,"promises",{configurable:!0,enumerable:!0,get(){return G}}),j.exports.Stream=B.Stream,j.exports.default=j.exports}}),$Q={0:void 0,1:void 0,2:void 0,3:void 0,4:void 0,5:void 0},Uq=bq(),iq=class a extends Uq{#q;#Q;#X=!0;_construct;_destroy;_final;constructor(j,B={}){super(B);this._construct=this.#H,this._destroy=this.#K,this._final=this.#Z,this.#q=j}#H(j){this._writableState.constructed=!0,this.constructed=!0,j()}#J(){if(typeof this.#q==="object")if(typeof this.#q.write==="function")this.#Q=this.#q;else throw new Error("Invalid FileSink");else this.#Q=Bun.file(this.#q).writer()}write(j,B,G,y=this.#X){if(!y)return this.#X=!1,super.write(j,B,G);if(!this.#Q)this.#J();var A=this.#Q,M=A.write(j);if(xq(M))return M.then(()=>{this.emit("drain"),A.flush(!0)}),!1;if(A.flush(!0),G)G(null,j.byteLength);return!0}end(j,B,G,y=this.#X){return super.end(j,B,G,y)}#K(j,B){if(this._writableState.destroyed=!0,B)B(j)}#Z(j){if(this.#Q)this.#Q.end();if(j)j()}ref(){if(!this.#Q)this.#J();this.#Q.ref()}unref(){if(!this.#Q)return;this.#Q.unref()}},Yq=BQ();Yq[Symbol.for("CommonJS")]=0;Yq[Symbol.for("::bunternal::")]={_ReadableFromWeb:pq,_ReadableFromWebForUndici:uq};var cQ=Yq,EQ=Yq._uint8ArrayToBuffer,IQ=Yq._isUint8Array,TQ=Yq.isDisturbed,PQ=Yq.isErrored,xQ=Yq.isWritable,OQ=Yq.isReadable,CQ=Yq.Readable,Uq=Yq.Writable,_Q=Yq.Duplex,DQ=Yq.Transform,wQ=Yq.PassThrough,vQ=Yq.addAbortSignal,RQ=Yq.finished,SQ=Yq.destroy,gQ=Yq.pipeline,kQ=Yq.compose,VQ=Yq.Stream,fQ=Yq.eos=Fq,yQ=Yq._getNativeReadableStreamPrototype,iq=Yq.NativeWritable,hQ=VQ.promises;export{hQ as promises,gQ as pipeline,xQ as isWritable,OQ as isReadable,PQ as isErrored,TQ as isDisturbed,RQ as finished,fQ as eos,SQ as destroy,cQ as default,kQ as compose,vQ as addAbortSignal,EQ as _uint8ArrayToBuffer,IQ as _isUint8Array,yQ as _getNativeReadableStreamPrototype,Uq as Writable,DQ as Transform,VQ as Stream,CQ as Readable,wQ as PassThrough,iq as NativeWritable,_Q as Duplex}; |