module.exports=[37702,(e,t,r)=>{t.exports=e.x("worker_threads",()=>require("worker_threads"))},418352,(e,t,r)=>{t.exports=e.x("node:stream/web",()=>require("node:stream/web"))},894528,e=>{"use strict";e.i(713775);var t=e.i(280101),r=e.i(904300);let a=0,n={START_BOUNDARY:a++,HEADER_FIELD_START:a++,HEADER_FIELD:a++,HEADER_VALUE_START:a++,HEADER_VALUE:a++,HEADER_VALUE_ALMOST_DONE:a++,HEADERS_ALMOST_DONE:a++,PART_DATA_START:a++,PART_DATA:a++,END:a++},i=1,o=2,s=e=>32|e,E=()=>{};class d{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=E,this.onHeaderField=E,this.onHeadersEnd=E,this.onHeaderValue=E,this.onPartBegin=E,this.onPartData=E,this.onPartEnd=E,this.boundaryChars={};const t=new Uint8Array((e="\r\n--"+e).length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r),this.boundaryChars[t[r]]=!0;this.boundary=t,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=n.START_BOUNDARY}write(e){let t,r,a=0,E=e.length,d=this.index,{lookbehind:A,boundary:h,boundaryChars:l,index:D,state:_,flags:T}=this,f=this.boundary.length,R=f-1,u=e.length,c=e=>{this[e+"Mark"]=a},H=e=>{delete this[e+"Mark"]},b=(e,t,r,a)=>{(void 0===t||t!==r)&&this[e](a&&a.subarray(t,r))},L=(t,r)=>{let n=t+"Mark";n in this&&(r?(b(t,this[n],a,e),delete this[n]):(b(t,this[n],e.length,e),this[n]=0))};for(a=0;a<E;a++)switch(t=e[a],_){case n.START_BOUNDARY:if(D===h.length-2){if(45===t)T|=o;else if(13!==t)return;D++;break}if(D-1==h.length-2){if(T&o&&45===t)_=n.END,T=0;else{if(T&o||10!==t)return;D=0,b("onPartBegin"),_=n.HEADER_FIELD_START}break}t!==h[D+2]&&(D=-2),t===h[D+2]&&D++;break;case n.HEADER_FIELD_START:_=n.HEADER_FIELD,c("onHeaderField"),D=0;case n.HEADER_FIELD:if(13===t){H("onHeaderField"),_=n.HEADERS_ALMOST_DONE;break}if(D++,45===t)break;if(58===t){if(1===D)return;L("onHeaderField",!0),_=n.HEADER_VALUE_START;break}if((r=s(t))<97||r>122)return;break;case n.HEADER_VALUE_START:if(32===t)break;c("onHeaderValue"),_=n.HEADER_VALUE;case n.HEADER_VALUE:13===t&&(L("onHeaderValue",!0),b("onHeaderEnd"),_=n.HEADER_VALUE_ALMOST_DONE);break;case n.HEADER_VALUE_ALMOST_DONE:if(10!==t)return;_=n.HEADER_FIELD_START;break;case n.HEADERS_ALMOST_DONE:if(10!==t)return;b("onHeadersEnd"),_=n.PART_DATA_START;break;case n.PART_DATA_START:_=n.PART_DATA,c("onPartData");case n.PART_DATA:if(d=D,0===D){for(a+=R;a<u&&!(e[a]in l);)a+=f;a-=R,t=e[a]}if(D<h.length)h[D]===t?(0===D&&L("onPartData",!0),D++):D=0;else if(D===h.length)D++,13===t?T|=i:45===t?T|=o:D=0;else if(D-1===h.length)if(T&i){if(D=0,10===t){T&=~i,b("onPartEnd"),b("onPartBegin"),_=n.HEADER_FIELD_START;break}}else T&o&&45===t?(b("onPartEnd"),_=n.END,T=0):D=0;D>0?A[D-1]=t:d>0&&(b("onPartData",0,d,new Uint8Array(A.buffer,A.byteOffset,A.byteLength)),d=0,c("onPartData"),a--);break;case n.END:break;default:throw Error(`Unexpected state entered: ${_}`)}L("onHeaderField"),L("onHeaderValue"),L("onPartData"),this.index=D,this.state=_,this.flags=T}end(){if(this.state===n.HEADER_FIELD_START&&0===this.index||this.state===n.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==n.END)throw Error("MultipartParser.end(): stream ended unexpectedly")}}async function A(e,a){let n,i,o,s,E,A;if(!/multipart/i.test(a))throw TypeError("Failed to fetch");let h=a.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!h)throw TypeError("no or bad content-type header, no multipart boundary");let l=new d(h[1]||h[2]),D=[],_=new r.FormData,T=e=>{o+=c.decode(e,{stream:!0})},f=e=>{D.push(e)},R=()=>{let e=new t.File(D,A,{type:E});_.append(s,e)},u=()=>{_.append(s,o)},c=new TextDecoder("utf-8");for await(let t of(c.decode(),l.onPartBegin=function(){l.onPartData=T,l.onPartEnd=u,n="",i="",o="",s="",E="",A=null,D.length=0},l.onHeaderField=function(e){n+=c.decode(e,{stream:!0})},l.onHeaderValue=function(e){i+=c.decode(e,{stream:!0})},l.onHeaderEnd=function(){if(i+=c.decode(),"content-disposition"===(n=n.toLowerCase())){let e=i.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);e&&(s=e[2]||e[3]||""),(A=function(e){let t=e.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!t)return;let r=t[2]||t[3]||"",a=r.slice(r.lastIndexOf("\\")+1);return(a=a.replace(/%22/g,'"')).replace(/&#(\d{4});/g,(e,t)=>String.fromCharCode(t))}(i))&&(l.onPartData=f,l.onPartEnd=R)}else"content-type"===n&&(E=i);i="",n=""},e))l.write(t);return l.end(),_}e.s(["toFormData",0,A])}];

//# sourceMappingURL=%5Broot-of-the-server%5D__0nre5cw._.js.map