varrue=Object.create;varZm=Object.defineProperty;variue=Object.getOwnPropertyDescriptor;varsue=Object.getOwnPropertyNames;varnue=Object.getPrototypeOf,aue=Object.prototype.hasOwnProperty;vardA=(A,e)=>()=>(A&&(e=A(A=0)),e);varE=(A,e)=>()=>(e||A((e={exports:{}}).exports,e),e.exports),_b=(A,e)=>{for(vartine)Zm(A,t,{get:e[t],enumerable:!0})},E7=(A,e,t,r)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofsue(e))!aue.call(A,i)&&i!==t&&Zm(A,i,{get:()=>e[i],enumerable:!(r=iue(e,i))||r.enumerable});returnA};varSi=(A,e,t)=>(t=A!=null?rue(nue(A)):{},E7(e||!A||!A.__esModule?Zm(t,"default",{value:A,enumerable:!0}):t,A)),cc=A=>E7(Zm({},"__esModule",{value:!0}),A);varKm=E(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});Ip.toCommandProperties=Ip.toCommandValue=void0;functionoue(A){returnA==null?"":typeofA=="string"||AinstanceofString?A:JSON.stringify(A)}Ip.toCommandValue=oue;functioncue(A){returnObject.keys(A).length?{title:A.title,file:A.file,line:A.startLine,endLine:A.endLine,col:A.startColumn,endColumn:A.endColumn}:{}}Ip.toCommandProperties=cue});varB7=E(Ws=>{"use strict";varlue=Ws&&Ws.__createBinding||(Object.create?function(A,e,t,r){r===void0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){returne[t]}})}:function(A,e,t,r){r===void0&&(r=t),A[r]=e[t]}),due=Ws&&Ws.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}:function(A,e){A.default=e}),pue=Ws&&Ws.__importStar||function(A){if(A&&A.__esModule)returnA;vare={};if(A!=null)for(vartinA)t!=="default"&&Object.hasOwnProperty.call(A,t)&&lue(e,A,t);returndue(e,A),e};Object.defineProperty(Ws,"__esModule",{value:!0});Ws.issue=Ws.issueCommand=void0;varuue=pue(require("os")),Q7=Km();functionm7(A,e,t){letr=newJb(A,e,t);process.stdout.write(r.toString()+uue.EOL)}Ws.issueCommand=m7;functiongue(A,e=""){m7(A,{},e)}Ws.issue=gue;varC7="::",Jb=class{constructor(e,t,r){e||(e="missing.command"),this.command=e,this.properties=t,this.message=r}toString(){lete=C7+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";lett=!0;for(letrinthis.properties)if(this.properties.hasOwnProperty(r)){leti=this.properties[r];i&&(t?t=!1:e+=",",e+=`${r}=${Eue(i)}`)}}returne+=`${C7}${hue(this.message)}`,e}};functionhue(A){returnQ7.toCommandValue(A).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}functionEue(A){returnQ7.toCommandValue(A).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}});functionaE(){return$m>eB.length-16&&(I7.default.randomFillSync(eB),$m=0),eB.slice($m,$m+=16)}varI7,eB,$m,Vb=dA(()=>{I7=Si(require("crypto")),eB=newUint8Array(256),$m=eB.length});varf7,y7=dA(()=>{f7=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});functionCue(A){returntypeofA=="string"&&f7.test(A)}varlc,oE=dA(()=>{y7();lc=Cue});functionQue(A,e=0){lett=(Dr[A[e+0]]+Dr[A[e+1]]+Dr[A[e+2]]+Dr[A[e+3]]+"-"+Dr[A[e+4]]+Dr[A[e+5]]+"-"+Dr[A[e+6]]+Dr[A[e+7]]+"-"+Dr[A[e+8]]+Dr[A[e+9]]+"-"+Dr[A[e+10]]+Dr[A[e+11]]+Dr[A[e+12]]+Dr[A[e+13]]+Dr[A[e+14]]+Dr[A[e+15]]).toLowerCase();if(!lc(t))throwTypeError("Stringified UUID is invalid");returnt}varDr,dc,cE=dA(()=>{oE();Dr=[];for(letA=0;A<256;++A)Dr.push((A+256).toString(16).substr(1));dc=Que});functionmue(A,e,t){letr=e&&t||0,i=e||newArray(16);A=A||{};lets=A.node||w7,n=A.clockseq!==void0?A.clockseq:Wb;if(s==null||n==null){letp=A.random||(A.rng||aE)();s==null&&(s=w7=[p[0]|1,p[1],p[2],p[3],p[4],p[5]]),n==null&&(n=Wb=(p[6]<<8|p[7])&16383)}leta=A.msecs!==void0?A.msecs:Date.now(),o=A.nsecs!==void0?A.nsecs:jb+1,c=a-zb+(o-jb)/1e4;if(c<0&&A.clockseq===void0&&(n=n+1&16383),(c<0||a>zb)&&A.nsecs===void0&&(o=0),o>=1e4)thrownewError("uuid.v1(): Can't create more than 10M uuids/sec");zb=a,jb=o,Wb=n,a+=122192928e5;letl=((a&268435455)*1e4+o)%4294967296;i[r++]=l>>>24&255,i[r++]=l>>>16&255,i[r++]=l>>>8&255,i[r++]=l&255;letd=a/4294967296*1e4&268435455;i[r++]=d>>>8&255,i[r++]=d&255,i[r++]=d>
`),Lge=function(){};function Sn(A){if(!(this instanceof Sn))return new Sn(A);if(wN.call(this,A),!A||!A.headerFirst&&typeof A.boundary!="string")throw new TypeError("Boundary required");typeof A.boundary=="string"?this.setBoundary(A.boundary):this._bparser=void 0,this._headerFirst=A.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:A.partHwm},this._pause=!1;let e=this;this._hparser=new Sge(A),this._hparser.on("header",function(t){e._inHeader=!1,e._part.emit("header",t)})}Rge(Sn,wN);Sn.prototype.emit=function(A){if(A==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else wN.prototype.emit.apply(this,arguments)};Sn.prototype._write=function(A,e,t){if(!this._hparser&&!this._bparser)return t();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new DL(this._partOpts),this._events.preamble?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(A);if(!this._inHeader&&r!==void 0&&r<A.length)A=A.slice(r);else return t()}this._firstWrite&&(this._bparser.push(Fge),this._firstWrite=!1),this._bparser.push(A),this._pause?this._cb=t:t()};Sn.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Sn.prototype.setBoundary=function(A){let e=this;this._bparser=new xge(`\r
`),A.replace(/\r?\n/g,e)}function NEe(A){return lU&&A instanceof lU||A instanceof EE||A&&(typeof A.stream=="function"||typeof A.arrayBuffer=="function")&&A[Symbol.toStringTag]==="File"}gU.exports={File:EE,FileLike:ON,isFileLike:NEe}});var mB=E((DeA,mU)=>{"use strict";var{isBlobLike:QB,toUSVString:DEe,makeIterator:YN}=js(),{kState:Vr}=io(),{File:QU,FileLike:hU,isFileLike:REe}=CB(),{webidl:DA}=oi(),{Blob:xEe,File:qN}=require("buffer"),EU=qN??QU,kp=class A{constructor(e){if(e!==void 0)throw DA.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[Vr]=[]}append(e,t,r=void 0){if(DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!QB(t))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=DA.converters.USVString(e),t=QB(t)?DA.converters.Blob(t,{strict:!1}):DA.converters.USVString(t),r=arguments.length===3?DA.converters.USVString(r):void 0;let i=CU(e,t,r);this[Vr].push(i)}delete(e){DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=DA.converters.USVString(e),this[Vr]=this[Vr].filter(t=>t.name!==e)}get(e){DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=DA.converters.USVString(e);let t=this[Vr].findIndex(r=>r.name===e);return t===-1?null:this[Vr][t].value}getAll(e){return DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=DA.converters.USVString(e),this[Vr].filter(t=>t.name===e).map(t=>t.value)}has(e){return DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=DA.converters.USVString(e),this[Vr].findIndex(t=>t.name===e)!==-1}set(e,t,r=void 0){if(DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!QB(t))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=DA.converters.USVString(e),t=QB(t)?DA.converters.Blob(t,{strict:!1}):DA.converters.USVString(t),r=arguments.length===3?DEe(r):void 0;let i=CU(e,t,r),s=this[Vr].findIndex(n=>n.name===e);s!==-1?this[Vr]=[...this[Vr].slice(0,s),i,...this[Vr].slice(s+1).filter(n=>n.name!==e)]:this[Vr].push(i)}entries(){return DA.brandCheck(this,A),YN(()=>this[Vr].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return DA.brandCheck(this,A),YN(()=>this[Vr].map(e=>[e.name,e.value]),"FormData","key")}values(){return DA.brandCheck(this,A),YN(()=>this[Vr].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,t=globalThis){if(DA.brandCheck(this,A),DA.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(t,[i,r,this])}};kp.prototype[Symbol.iterator]=kp.prototype.entries;Object.defineProperties(kp.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function CU(A,e,t){if(A=Buffer.from(A).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(REe(e)||(e=e instanceof xEe?new EU([e],"blob",{type:e.type}):new hU(e,"blob",{type:e.type})),t!==void 0){let r={type:e.type,lastModified:e.lastModified};e=qN&&e instanceof qN||e instanceof QU?new EU([e],t,r):new hU(e,t,r)}return{name:A,value:e}}mU.exports={FormData:kp}});var CE=E((ReA,RU)=>{"use strict";var SEe=VL(),Fp=iA(),{ReadableStreamFrom:vEe,isBlobLike:BU,isReadableStreamLike:kEe,readableStreamClose:FEe,createDeferredPromise:LEe,fullyReadBody:UEe}=js(),{FormData:IU}=mB(),{kState:no}=io(),{webidl:PN}=oi(),{DOMException:wU,structuredClone:MEe}=hc(),{Blob:TEe,File:OEe}=require("buffer"),{kBodyUsed:YEe}=nt(),HN=require("assert"),{isErrored:qEe}=iA(),{isUint8Array:bU,isArrayBuffer:PEe}=require("util/types"),{File:HEe}=CB(),{parseMIMEType:GEe,serializeAMimeType:_Ee}=vn(),so=globalThis.ReadableStream,fU=OEe??HEe;function NU(A,e=!1){so||(so=require("stream/web").ReadableStream);let t=null;A instanceof so?t=A:BU(A)?t=A.stream():t=new so({async pull(o){o.enqueue(typeof i=="string"?new T
`);u.push(I,w,g),typeof w.size=="number"?s+=I.byteLength+w.size+g.byteLength:h=!0}let Q=p.encode(`--${o}--`);u.push(Q),s+=Q.byteLength,h&&(s=null),i=A,r=async function*(){for(let B of u)B.stream?yield*B.stream():yield B},n="multipart/form-data; boundary="+o}else if(BU(A))i=A,s=A.size,A.type&&(n=A.type);else if(typeof A[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Fp.isDisturbed(A)||A.locked)throw new TypeError("Response body object should not be disturbed or locked");t=A instanceof so?A:vEe(A)}if((typeof i=="string"||Fp.isBuffer(i))&&(s=Buffer.byteLength(i)),r!=null){let o;t=new so({async start(){o=r(A)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:d}=await o.next();return d?queueMicrotask(()=>{c.close()}):qEe(t)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await o.return()},type:void 0})}return[{stream:t,source:i,length:s},n]}function JEe(A,e=!1){return so||(so=require("stream/web").ReadableStream),A instanceof so&&(HN(!Fp.isDisturbed(A),"The body has already been consumed."),HN(!A.locked,"The stream is locked.")),NU(A,e)}function VEe(A){let[e,t]=A.stream.tee(),r=MEe(t,{transfer:[t]}),[,i]=r.tee();return A.stream=e,{stream:i,length:A.length,source:A.source}}async function*yU(A){if(A)if(bU(A))yield A;else{let e=A.stream;if(Fp.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[YEe]=!0,yield*e}}function GN(A){if(A.aborted)throw new wU("The operation was aborted.","AbortError")}function WEe(A){return{blob(){return BB(this,t=>{let r=ZEe(this);return r==="failure"?r="":r&&(r=_Ee(r)),new TEe([t],{type:r})},A)},arrayBuffer(){return BB(this,t=>new Uint8Array(t).buffer,A)},text(){return BB(this,DU,A)},json(){return BB(this,XEe,A)},async formData(){PN.brandCheck(this,A),GN(this[no]);let t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){let r={};for(let[a,o]of this.headers)r[a.toLowerCase()]=o;let i=new IU,s;try{s=new SEe({headers:r,preservePath:!0})}catch(a){throw new wU(`${a}`,"AbortError")}s.on("field",(a,o)=>{i.append(a,o)}),s.on("file",(a,o,c,l,d)=>{let p=[];if(l==="base64"||l.toLowerCase()==="base64"){let u="";o.on("data",g=>{u+=g.toString().replace(/[\r\n]/gm,"");let h=u.length-u.length%4;p.push(Buffer.from(u.slice(0,h),"base64")),u=u.slice(h)}),o.on("end",()=>{p.push(Buffer.from(u,"base64")),i.append(a,new fU(p,c,{type:d}))})}else o.on("data",u=>{p.push(u)}),o.on("end",()=>{i.append(a,new fU(p,c,{type:d}))})});let n=new Promise((a,o)=>{s.on("finish",a),s.on("error",c=>o(new TypeError(c)))});if(this.body!==null)for await(let a of yU(this[no].body))s.write(a);return s.end(),await n,i}else if(/application\/x-www-form-urlencoded/.test(t)){let r;try{let s="",n=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of yU(this[no].body)){if(!bU(a))throw new TypeError("Expected Uint8Array chunk");s+=n.decode(a,{stream:!0})}s+=n.decode(),r=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new IU;for(let[s,n]of r)i.append(s,n);return i}else throw await Promise.resolve(),GN(this[no]),PN.errors.exception({header:`${A.name}.formData`,message:"Could not parse content as FormData."})}}}function zEe(A){Object.assign(A.prototype,WEe(A))}async function BB(A,e,t){if(PN.brandCheck(A,t),GN(A[no]),jEe(A[no].body))throw new TypeError("Body is unusable");let r=LEe(),i=n=>r.reject(n),s=n=>{try{r.resolve(e(n))}catch(a){i(a)}};return A[no].body==null?(s(new Uint8Array),r.promise):(await UEe(A[no].body,s,i),r.promise)}function jEe(A){return A!=null&&(A.stream.locked||Fp.isDisturbed(A.stream))}function DU(A){return A.length===0?"":(A[0]===239&&A[1]===187&&A[2]===191&&(A=A.subarray(3)),new TextDecoder().decode(A))}function XEe(A){return JSON.parse(DU(A))}function ZEe(A){let{headersList:e}=A[no],t=e.get("content-type");return t===null?"failure":GEe(t)}RU.exports={extractBody:NU,safelyExtractBody:JEe,cloneBody:VEe,mixinBody:zEe}});var kU=E((xeA,vU)=>{"use strict";var{InvalidArgumentError:PA,NotSupportedError:KEe}=qA(),ao=require("assert"),{kHTTP2BuildRequest:$Ee,
`);ns.validateHandler(h,r,c),this.servername=ns.getServerName(this.host),this[oo]=h,_t.create.hasSubscribers&&_t.create.publish({request:this})}onBodySent(e){if(this[oo].onBodySent)try{this[oo].onBodySent(e)}catch(t){this.onError(t)}}onRequestSent(){_t.bodySent.hasSubscribers&&_t.bodySent.publish({request:this})}onConnect(e){return ao(!this.aborted),ao(!this.completed),this[oo].onConnect(e)}onHeaders(e,t,r,i){return ao(!this.aborted),ao(!this.completed),_t.headers.hasSubscribers&&_t.headers.publish({request:this,response:{statusCode:e,headers:t,statusText:i}}),this[oo].onHeaders(e,t,r,i)}onData(e){return ao(!this.aborted),ao(!this.completed),this[oo].onData(e)}onUpgrade(e,t,r){return ao(!this.aborted),ao(!this.completed),this[oo].onUpgrade(e,t,r)}onComplete(e){return ao(!this.aborted),this.completed=!0,_t.trailers.hasSubscribers&&_t.trailers.publish({request:this,trailers:e}),this[oo].onComplete(e)}onError(e){if(_t.error.hasSubscribers&&_t.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[oo].onError(e)}addHeader(e,t){return QE(this,e,t),this}static[ACe](e,t,r){return new A(e,t,r)}static[$Ee](e,t,r){let i=t.headers;t={...t,headers:null};let s=new A(e,t,r);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new PA("headers array must be even");for(let n=0;n<i.length;n+=2)QE(s,i[n],i[n+1],!0)}else if(i&&typeof i=="object"){let n=Object.keys(i);for(let a=0;a<n.length;a++){let o=n[a];QE(s,o,i[o],!0)}}else if(i!=null)throw new PA("headers must be an object or an array");return s}static[eCe](e){let t=e.split(`\r
`),r={};for(let i of t){let[s,n]=i.split(": ");n==null||n.length===0||(r[s]?r[s]+=`,${n}`:r[s]=n)}return r}};function Ol(A,e,t){if(e&&typeof e=="object")throw new PA(`invalid${A}header`);if(e=e!=null?`${e}`:"",SU.exec(e)!==null)throw new PA(`invalid${A}header`);return t?e:`${A}:${e}\r
`}function QE(A,e,t,r=!1){if(t&&typeof t=="object"&&!Array.isArray(t))throw new PA(`invalid${e}header`);if(t===void 0)return;if(A.host===null&&e.length===4&&e.toLowerCase()==="host"){if(SU.exec(t)!==null)throw new PA(`invalid${e}header`);A.host=t}else if(A.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(A.contentLength=parseInt(t,10),!Number.isFinite(A.contentLength))throw new PA("invalid content-length header")}else if(A.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")A.contentType=t,r?A.headers[e]=Ol(e,t,r):A.headers+=Ol(e,t);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new PA("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof t=="string"?t.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new PA("invalid connection header");i==="close"&&(A.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new PA("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new PA("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new KEe("expect header not supported");if(xU.exec(e)===null)throw new PA("invalid header key");if(Array.isArray(t))for(let i=0;i<t.length;i++)r?A.headers[e]?A.headers[e]+=`,${Ol(e,t[i],r)}`:A.headers[e]=Ol(e,t[i],r):A.headers+=Ol(e,t[i]);else r?A.headers[e]=Ol(e,t,r):A.headers+=Ol(e,t)}}}vU.exports=JN});var IB=E((SeA,FU)=>{"use strict";var rCe=require("events"),VN=class extends rCe{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};FU.exports=VN});var BE=E((veA,LU)=>{"use strict";var iCe=IB(),{ClientDestroyedError:WN,ClientClosedError:sCe,InvalidArgumentError:Lp}=qA(),{kDestroy:nCe,kClose:aCe,kDispatch:zN,kInterceptors:Yl}=nt(),Up=Symbol("destroyed"),mE=Symbol("closed"),co=Symbol("onDestroyed"),Mp=Symbol("onClosed"),fB=Symbol("Intercepted Dispatch"),jN=class extends iCe{constructor(){super(),this[Up]=!1,this[co]=null,this[mE]=!1,this[Mp]=[]}get destroyed(){return this[Up]}get closed(){return this[mE]}get interceptors(){return this[Yl]}set interceptors(e){if(e){for(let t=e.length-1;t>=0;t--)if(typeof this[Yl][t]!="function")throw new Lp("interceptor must be an function")}this[Yl]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((s,n)=>s?i(s):r(n))});if(typeof e!="function")throw new Lp("invalid callback");if(this[Up]){queueMicrotask(()=>e(new WN,null));return}if(this[mE]){this[Mp]?this[Mp].push(e):queueMicrotask(()=>e(null,null));return}this[mE]=!0,this[Mp].push(e);let t=()=>{let r=this[Mp];this[Mp]=null;for(let i=0;i<r.length;i++)r[i](null,null)};this[aCe]().then(()=>this.destroy()).then(()=>{queueMicrotask(t)})}destroy(e,t){if(typeof e=="function"&&(t=e,e=null),t===void 0)return new Promise((i,s)=>{this.destroy(e,(n,a)=>n?s(n):i(a))});if(typeof t!="function")throw new Lp("invalid callback");if(this[Up]){this[co]?this[co].push(t):queueMicrotask(()=>t(null,null));return}e||(e=new WN),this[Up]=!0,this[co]=this[co]||[],this[co].push(t);let r=()=>{let i=this[co];this[co]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[nCe](e).then(()=>{queueMicrotask(r)})}[fB](e,t){if(!this[Yl]||this[Yl].length===0)return this[fB]=this[zN],this[zN](e,t);let r=this[zN].bind(this);for(let i=this[Yl].length-1;i>=0;i--)r=this[Yl][i](r);return this[fB]=r,r(e,t)}dispatch(e,t){if(!t||typeof t!="object")throw new Lp("handler must be an object");try{if(!e||typeof e!="object")throw new Lp("opts must be an object.");if(this[Up]||this[co])throw new WN;if(this[mE])throw new sCe;return this[fB](e,t)}catch(r){if(typeof t.onError!="function")throw new Lp("invalid onError method");return t.onError(r),!1}}};LU.exports=jN});var IE=E((LeA,TU)=>{"use strict";var oCe=require("net"),UU=require("assert"),MU=iA(),{InvalidArgumentError:cCe,ConnectTimeoutError:lCe}=qA(),XN,ZN;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?ZN=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(
`,a&&(u+=a),Wr.sendHeaders.hasSubscribers&&Wr.sendHeaders.publish({request:e,headers:u,socket:p}),t?de.isBuffer(t)?(ee(d===t.byteLength,"buffer body must have content length"),p.cork(),p.write(`${u}content-length:${d}\r
`,"latin1")),e.onRequestSent()),!0}function pQe(A,e,t){let{body:r,method:i,path:s,host:n,upgrade:a,expectContinue:o,signal:c,headers:l}=t,d;if(typeof l=="string"?d=iD[WCe](l.trim()):d=l,a)return vr(A,t,new Error("Upgrade not supported for H2")),!1;try{t.onConnect(w=>{t.aborted||t.completed||vr(A,t,w||new pD)})}catch(w){vr(A,t,w)}if(t.aborted)return!1;let p,u=A[SB];if(d[jCe]=n||A[rM],d[XCe]=i,i==="CONNECT")return e.ref(),p=e.request(d,{endStream:!1,signal:c}),p.id&&!p.pending?(t.onUpgrade(null,null,p),++u.openStreams):p.once("ready",()=>{t.onUpgrade(null,null,p),++u.openStreams}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),!0;d[ZCe]=s,d[KCe]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let h=de.bodyLength(r);if(h==null&&(h=t.contentLength),(h===0||!g)&&(h=null),t.contentLength!=null&&t.contentLength!==h){if(A[DE])return vr(A,t,new lo),!1;process.emitWarning(new lo)}h!=null&&(ee(r,"no body must not have content length"),d[$Ce]=`${h}`),e.ref();let Q=i==="GET"||i==="HEAD";return o?(d[eQe]="100-continue",p=e.request(d,{endStream:Q,signal:c}),p.once("continue",B)):(p=e.request(d,{endStream:Q,signal:c}),B()),++u.openStreams,p.once("response",w=>{t.onHeaders(Number(w[AQe]),w,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{t.onComplete([])}),p.on("data",w=>{t.onData(w)===!1&&p.pause()}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),p.once("error",function(w){A[os]&&!A[os].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,de.destroy(p,w))}),p.once("frameError",(w,I)=>{let C=new aa(`HTTP/2:"frameError"received-type${w},code${I}`);vr(A,t,C),A[os]&&!A[os].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,de.destroy(p,C))}),!0;function B(){r?de.isBuffer(r)?(ee(h===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),t.onBodySent(r),t.onRequestSent()):de.isBlobLike(r)?typeof r.stream=="function"?kB({client:A,request:t,contentLength:h,h2stream:p,expectsPayload:g,body:r.stream(),socket:A[Qt],header:""}):cM({body:r,client:A,request:t,contentLength:h,expectsPayload:g,h2stream:p,header:"",socket:A[Qt]}):de.isStream(r)?oM({body:r,client:A,request:t,contentLength:h,expectsPayload:g,socket:A[Qt],h2stream:p,header:""}):de.isIterable(r)?kB({body:r,client:A,request:t,contentLength:h,expectsPayload:g,header:"",h2stream:p,socket:A[Qt]}):ee(!1):t.onRequestSent()}}function oM({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){if(ee(s!==0||t[pt]===0,"stream body cannot be pipelined"),t[ca]==="h2"){let h=function(Q){r.onBodySent(Q)},g=xCe(e,A,Q=>{Q?(de.destroy(e,Q),de.destroy(A,Q)):r.onRequestSent()});g.on("data",h),g.once("end",()=>{g.removeListener("data",h),de.destroy(g)});return}let o=!1,c=new FB({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n}),l=function(g){if(!o)try{!c.write(g)&&this.pause&&this.pause()}catch(h){de.destroy(this,h)}},d=function(){o||e.resume&&e.resume()},p=function(){u(new pD)},u=function(g){if(!o){if(o=!0,ee(i.destroyed||i[po]&&t[pt]<=1),i.off("drain",d).off("error",u),e.removeListener("data",l).removeListener("end",u).removeListener("error",u).removeListener("close",p),!g)try{c.end()}catch(h){g=h}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?de.destroy(e,g):de.destroy(e)}};e.on("data",l).on("end",u).on("error",u).on("close",p),e.resume&&e.resume(),i.on("drain",d).on("error",u)}async function cM({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){ee(s===e.size,"blob body must have content length");let o=t[ca]==="h2";try{if(s!=null&&s!==e.size)throw new lo;let c=Buffer.from(await e.arrayBuffer());o?(A.cork(),A.write(c),A.uncork()):(i.cork(),i.write(`${n}content-length:${s}\r
`,"latin1"),i.write(c),i.uncork()),r.onBodySent(c),r.onRequestSent(),a||(i[ci]=!0),cs(t)}catch(c){de.destroy(o?A:i,c)}}async function kB({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){ee(s!==0||t[pt]===0,"iterator body cannot be pipelined");let o=null;function c(){if(o){let p=o;o=null,p()}}let l=()=>new Promise((p,u)=>{ee(o===null),i[Sr]?u(i[Sr]):o=p});if(t[ca]==="h2"){A.on("close",c).on("drain",c);try{for await(let p of e){if(i[Sr])throw i[Sr];let u=A.write(p);r.onBodySent(p),u||await l()}}catch(p){A.destroy(p)}finally{r.onRequestSent(),A.end(),A.off("close",c).off("drain",c)}return}i.on("close",c).on("drain",c);let d=new FB({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n});try{for await(let p of e){if(i[Sr])throw i[Sr];d.write(p)||await l()}d.end()}catch(p){d.destroy(p)}finally{i.off("close",c).off("drain",c)}}var FB=class{constructor({socket:e,request:t,contentLength:r,client:i,expectsPayload:s,header:n}){this.socket=e,this.request=t,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=s,this.header=n,e[po]=!0}write(e){let{socket:t,request:r,contentLength:i,client:s,bytesWritten:n,expectsPayload:a,header:o}=this;if(t[Sr])throw t[Sr];if(t.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(i!==null&&n+c>i){if(s[DE])throw new lo;process.emitWarning(new lo)}t.cork(),n===0&&(a||(t[ci]=!0),i===null?t.write(`${o}transfer-encoding:chunked\r
globstarwhile`,A,l,e,d,p),this.matchOne(A.slice(l),e.slice(d),t))return this.debug("globstar found match!",l,n,p),!0;if(p==="."||p===".."||!r.dot&&p.charAt(0)==="."){this.debug("dot detected!",A,l,e,d);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(t&&(this.debug(`
>>>nomatch,partial?`,A,l,e,d),l===n))}var u;if(typeof o=="string"?(u=c===o,this.debug("string match",o,c,u)):(u=c.match(o),this.debug("pattern match",o,c,u)),!u)return!1}if(i===n&&s===a)return!0;if(i===n)return t;if(s===a)return i===n-1&&A[i]==="";throw new Error("wtf?")};function N2e(A){return A.replace(/\\(.)/g,"$1")}function D2e(A){return A.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var fP=E(rn=>{"use strict";var R2e=rn&&rn.__createBinding||(Object.create?function(A,e,t,r){r===void 0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){return e[t]}})}:function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]}),x2e=rn&&rn.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}:function(A,e){A.default=e}),IP=rn&&rn.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.hasOwnProperty.call(A,t)&&R2e(e,A,t);return x2e(e,A),e},S2e=rn&&rn.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(rn,"__esModule",{value:!0});rn.Path=void 0;var tC=IP(require("path")),xc=IP(zI()),rC=S2e(require("assert")),v2e=process.platform==="win32",IR=class{constructor(e){if(this.segments=[],typeof e=="string")if(rC.default(e,"Parameter 'itemPath' must not be empty"),e=xc.safeTrimTrailingSeparator(e),!xc.hasRoot(e))this.segments=e.split(tC.sep);else{let t=e,r=xc.dirname(t);for(;r!==t;){let i=tC.basename(t);this.segments.unshift(i),t=r,r=xc.dirname(t)}this.segments.unshift(t)}else{rC.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let t=0;t<e.length;t++){let r=e[t];rC.default(r,"Parameter 'itemPath' must not contain any empty segments"),r=xc.normalizeSeparators(e[t]),t===0&&xc.hasRoot(r)?(r=xc.safeTrimTrailingSeparator(r),rC.default(r===xc.dirname(r),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(r)):(rC.default(!r.includes(tC.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(r))}}}toString(){let e=this.segments[0],t=e.endsWith(tC.sep)||v2e&&/^[A-Z]:$/i.test(e);for(let r=1;r<this.segments.length;r++)t?t=!1:e+=tC.sep,e+=this.segments[r];return e}};rn.Path=IR});var yP=E(sn=>{"use strict";var k2e=sn&&sn.__createBinding||(Object.create?function(A,e,t,r){r===void 0&&(r=t),Object.defineProperty(A,r,{enumerable:!0,get:function(){return e[t]}})}:function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]}),F2e=sn&&sn.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}:function(A,e){A.default=e}),wR=sn&&sn.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.hasOwnProperty.call(A,t)&&k2e(e,A,t);return F2e(e,A),e},L2e=sn&&sn.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(sn,"__esModule",{value:!0});sn.Pattern=void 0;var U2e=wR(require("os")),iC=wR(require("path")),Gi=wR(zI()),id=L2e(require("assert")),M2e=BP(),fR=jI(),KI=fP(),Co=process.platform==="win32",yR=class A{constructor(e,t=!1,r,i){this.negate=!1;let s;if(typeof e=="string")s=e.trim();else{r=r||[],id.default(r.length,"Parameter 'segments' must not empty");let c=A.getLiteral(r[0]);id.default(c&&Gi.hasAbsoluteRoot(c),"Parameter 'segments' first element must be a root path"),s=new KI.Path(r).toString().trim(),e&&(s=`!${s}`)}for(;s.startsWith("!");)this.negate=!this.negate,s=s.substr(1).trim();s=A.fixupPattern(s,i),this.segments=new KI.Path(s).segments,this.trailingSeparator=Gi.normalizeSeparators(s).endsWith(iC.sep),s=Gi.safeTrimTrailingSeparator(s);let n=!1,a=this.segments.map(c=>A.getLiteral(c)).filter(c=>!n&&!(n=c===""));this.searchPath=new KI.Path(a).toString(),this.rootRegExp=new RegExp(A.regExpEscape(a[0]),Co?"i":""),this.isImplicitPattern=t;let o={dot:!0,nobrace:!0,nocase:Co,nocomment:!0,noext:!0,nonegate:!0};s=Co?s.replace(/\\/g,"/"):s,this.minimatch=new M2e.Minimatch(s,o)}match(e){return this.segments[this.segments.length-1]==="**"?(e=Gi.normalizeSeparators(e),!e.endsWith(iC.sep)&&this.isImplici
`),zbe=function(){};function Un(A){if(!(this instanceof Un))return new Un(A);if(g6.call(this,A),!A||!A.headerFirst&&typeof A.boundary!="string")throw new TypeError("Boundary required");typeof A.boundary=="string"?this.setBoundary(A.boundary):this._bparser=void 0,this._headerFirst=A.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:A.partHwm},this._pause=!1;let e=this;this._hparser=new _be(A),this._hparser.on("header",function(t){e._inHeader=!1,e._part.emit("header",t)})}Hbe(Un,g6);Un.prototype.emit=function(A){if(A==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else g6.prototype.emit.apply(this,arguments)};Un.prototype._write=function(A,e,t){if(!this._hparser&&!this._bparser)return t();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new wH(this._partOpts),this.listenerCount("preamble")!==0?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(A);if(!this._inHeader&&r!==void 0&&r<A.length)A=A.slice(r);else return t()}this._firstWrite&&(this._bparser.push(Wbe),this._firstWrite=!1),this._bparser.push(A),this._pause?this._cb=t:t()};Un.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Un.prototype.setBoundary=function(A){let e=this;this._bparser=new Gbe(`\r
`),A.replace(/\r?\n/g,e)}function GDe(A){return CG&&A instanceof CG||A instanceof BC||A&&(typeof A.stream=="function"||typeof A.arrayBuffer=="function")&&A[Symbol.toStringTag]==="File"}IG.exports={File:BC,FileLike:v6,isFileLike:GDe}});var yf=E((VtA,NG)=>{"use strict";var{isBlobLike:ff,toUSVString:_De,makeIterator:k6}=an(),{kState:jr}=Bo(),{File:bG,FileLike:fG,isFileLike:JDe}=If(),{webidl:RA}=hi(),{Blob:VDe,File:F6}=require("buffer"),yG=F6??bG,Su=class A{constructor(e){if(e!==void 0)throw RA.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[jr]=[]}append(e,t,r=void 0){if(RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!ff(t))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=RA.converters.USVString(e),t=ff(t)?RA.converters.Blob(t,{strict:!1}):RA.converters.USVString(t),r=arguments.length===3?RA.converters.USVString(r):void 0;let i=wG(e,t,r);this[jr].push(i)}delete(e){RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=RA.converters.USVString(e),this[jr]=this[jr].filter(t=>t.name!==e)}get(e){RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=RA.converters.USVString(e);let t=this[jr].findIndex(r=>r.name===e);return t===-1?null:this[jr][t].value}getAll(e){return RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=RA.converters.USVString(e),this[jr].filter(t=>t.name===e).map(t=>t.value)}has(e){return RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=RA.converters.USVString(e),this[jr].findIndex(t=>t.name===e)!==-1}set(e,t,r=void 0){if(RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!ff(t))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=RA.converters.USVString(e),t=ff(t)?RA.converters.Blob(t,{strict:!1}):RA.converters.USVString(t),r=arguments.length===3?_De(r):void 0;let i=wG(e,t,r),s=this[jr].findIndex(n=>n.name===e);s!==-1?this[jr]=[...this[jr].slice(0,s),i,...this[jr].slice(s+1).filter(n=>n.name!==e)]:this[jr].push(i)}entries(){return RA.brandCheck(this,A),k6(()=>this[jr].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return RA.brandCheck(this,A),k6(()=>this[jr].map(e=>[e.name,e.value]),"FormData","key")}values(){return RA.brandCheck(this,A),k6(()=>this[jr].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,t=globalThis){if(RA.brandCheck(this,A),RA.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(t,[i,r,this])}};Su.prototype[Symbol.iterator]=Su.prototype.entries;Object.defineProperties(Su.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function wG(A,e,t){if(A=Buffer.from(A).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(JDe(e)||(e=e instanceof VDe?new yG([e],"blob",{type:e.type}):new fG(e,"blob",{type:e.type})),t!==void 0){let r={type:e.type,lastModified:e.lastModified};e=F6&&e instanceof F6||e instanceof bG?new yG([e],t,r):new fG(e,t,r)}return{name:A,value:e}}NG.exports={FormData:Su}});var IC=E((WtA,UG)=>{"use strict";var WDe=VH(),vu=rA(),{ReadableStreamFrom:zDe,isBlobLike:DG,isReadableStreamLike:jDe,readableStreamClose:XDe,createDeferredPromise:ZDe,fullyReadBody:KDe}=an(),{FormData:RG}=yf(),{kState:fo}=Bo(),{webidl:L6}=hi(),{DOMException:vG,structuredClone:$De}=Lc(),{Blob:e4e,File:A4e}=require("buffer"),{kBodyUsed:t4e}=GA(),U6=require("assert"),{isErrored:r4e}=rA(),{isUint8Array:kG,isArrayBuffer:i4e}=require("util/types"),{File:s4e}=If(),{parseMIMEType:n4e,serializeAMimeType:a4e}=Mn(),Io=globalThis.ReadableStream,xG=A4e??s4e,wf=new TextEncoder,o4e=new TextDecoder;function FG(A,e=!1){Io||(Io=require("stream/web").ReadableStream);let t=null;A instanceof Io?t=A:DG(A)?t=A.stream():t=new Io({async pul
`);p.push(w,B,u),typeof B.size=="number"?s+=w.byteLength+B.size+u.byteLength:g=!0}let h=wf.encode(`--${o}--`);p.push(h),s+=h.byteLength,g&&(s=null),i=A,r=async function*(){for(let Q of p)Q.stream?yield*Q.stream():yield Q},n="multipart/form-data; boundary="+o}else if(DG(A))i=A,s=A.size,A.type&&(n=A.type);else if(typeof A[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(vu.isDisturbed(A)||A.locked)throw new TypeError("Response body object should not be disturbed or locked");t=A instanceof Io?A:zDe(A)}if((typeof i=="string"||vu.isBuffer(i))&&(s=Buffer.byteLength(i)),r!=null){let o;t=new Io({async start(){o=r(A)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:d}=await o.next();return d?queueMicrotask(()=>{c.close()}):r4e(t)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await o.return()},type:void 0})}return[{stream:t,source:i,length:s},n]}function c4e(A,e=!1){return Io||(Io=require("stream/web").ReadableStream),A instanceof Io&&(U6(!vu.isDisturbed(A),"The body has already been consumed."),U6(!A.locked,"The stream is locked.")),FG(A,e)}function l4e(A){let[e,t]=A.stream.tee(),r=$De(t,{transfer:[t]}),[,i]=r.tee();return A.stream=e,{stream:i,length:A.length,source:A.source}}async function*SG(A){if(A)if(kG(A))yield A;else{let e=A.stream;if(vu.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[t4e]=!0,yield*e}}function M6(A){if(A.aborted)throw new vG("The operation was aborted.","AbortError")}function d4e(A){return{blob(){return bf(this,t=>{let r=h4e(this);return r==="failure"?r="":r&&(r=a4e(r)),new e4e([t],{type:r})},A)},arrayBuffer(){return bf(this,t=>new Uint8Array(t).buffer,A)},text(){return bf(this,LG,A)},json(){return bf(this,g4e,A)},async formData(){L6.brandCheck(this,A),M6(this[fo]);let t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){let r={};for(let[a,o]of this.headers)r[a.toLowerCase()]=o;let i=new RG,s;try{s=new WDe({headers:r,preservePath:!0})}catch(a){throw new vG(`${a}`,"AbortError")}s.on("field",(a,o)=>{i.append(a,o)}),s.on("file",(a,o,c,l,d)=>{let p=[];if(l==="base64"||l.toLowerCase()==="base64"){let u="";o.on("data",g=>{u+=g.toString().replace(/[\r\n]/gm,"");let h=u.length-u.length%4;p.push(Buffer.from(u.slice(0,h),"base64")),u=u.slice(h)}),o.on("end",()=>{p.push(Buffer.from(u,"base64")),i.append(a,new xG(p,c,{type:d}))})}else o.on("data",u=>{p.push(u)}),o.on("end",()=>{i.append(a,new xG(p,c,{type:d}))})});let n=new Promise((a,o)=>{s.on("finish",a),s.on("error",c=>o(new TypeError(c)))});if(this.body!==null)for await(let a of SG(this[fo].body))s.write(a);return s.end(),await n,i}else if(/application\/x-www-form-urlencoded/.test(t)){let r;try{let s="",n=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of SG(this[fo].body)){if(!kG(a))throw new TypeError("Expected Uint8Array chunk");s+=n.decode(a,{stream:!0})}s+=n.decode(),r=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new RG;for(let[s,n]of r)i.append(s,n);return i}else throw await Promise.resolve(),M6(this[fo]),L6.errors.exception({header:`${A.name}.formData`,message:"Could not parse content as FormData."})}}}function p4e(A){Object.assign(A.prototype,d4e(A))}async function bf(A,e,t){if(L6.brandCheck(A,t),M6(A[fo]),u4e(A[fo].body))throw new TypeError("Body is unusable");let r=ZDe(),i=n=>r.reject(n),s=n=>{try{r.resolve(e(n))}catch(a){i(a)}};return A[fo].body==null?(s(new Uint8Array),r.promise):(await KDe(A[fo].body,s,i),r.promise)}function u4e(A){return A!=null&&(A.stream.locked||vu.isDisturbed(A.stream))}function LG(A){return A.length===0?"":(A[0]===239&&A[1]===187&&A[2]===191&&(A=A.subarray(3)),o4e.decode(A))}function g4e(A){return JSON.parse(LG(A))}function h4e(A){let{headersList:e}=A[fo],t=e.get("content-type");return t===null?"failure":n4e(t)}UG.exports={extractBody:FG,safelyExtractBody:c4e,cloneBody:l4e,mixinBody:p4e}});var YG=E((ztA,OG)=>{"use strict";var{InvalidArgumentError:_A,NotSupportedError:E4e}=UA(),yo=require("assert"),{kHTTP2BuildRequest:C4e,kHTTP2CopyHea
`);_i.validateHandler(h,r,c),this.servername=_i.getServerName(this.host),this[Tn]=h,Vt.create.hasSubscribers&&Vt.create.publish({request:this})}onBodySent(e){if(this[Tn].onBodySent)try{return this[Tn].onBodySent(e)}catch(t){this.abort(t)}}onRequestSent(){if(Vt.bodySent.hasSubscribers&&Vt.bodySent.publish({request:this}),this[Tn].onRequestSent)try{return this[Tn].onRequestSent()}catch(e){this.abort(e)}}onConnect(e){if(yo(!this.aborted),yo(!this.completed),this.error)e(this.error);else return this.abort=e,this[Tn].onConnect(e)}onHeaders(e,t,r,i){yo(!this.aborted),yo(!this.completed),Vt.headers.hasSubscribers&&Vt.headers.publish({request:this,response:{statusCode:e,headers:t,statusText:i}});try{return this[Tn].onHeaders(e,t,r,i)}catch(s){this.abort(s)}}onData(e){yo(!this.aborted),yo(!this.completed);try{return this[Tn].onData(e)}catch(t){return this.abort(t),!1}}onUpgrade(e,t,r){return yo(!this.aborted),yo(!this.completed),this[Tn].onUpgrade(e,t,r)}onComplete(e){this.onFinally(),yo(!this.aborted),this.completed=!0,Vt.trailers.hasSubscribers&&Vt.trailers.publish({request:this,trailers:e});try{return this[Tn].onComplete(e)}catch(t){this.onError(t)}}onError(e){if(this.onFinally(),Vt.error.hasSubscribers&&Vt.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[Tn].onError(e)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(e,t){return fC(this,e,t),this}static[m4e](e,t,r){return new A(e,t,r)}static[C4e](e,t,r){let i=t.headers;t={...t,headers:null};let s=new A(e,t,r);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new _A("headers array must be even");for(let n=0;n<i.length;n+=2)fC(s,i[n],i[n+1],!0)}else if(i&&typeof i=="object"){let n=Object.keys(i);for(let a=0;a<n.length;a++){let o=n[a];fC(s,o,i[o],!0)}}else if(i!=null)throw new _A("headers must be an object or an array");return s}static[Q4e](e){let t=e.split(`\r
`),r={};for(let i of t){let[s,n]=i.split(": ");n==null||n.length===0||(r[s]?r[s]+=`,${n}`:r[s]=n)}return r}};function ld(A,e,t){if(e&&typeof e=="object")throw new _A(`invalid${A}header`);if(e=e!=null?`${e}`:"",TG.exec(e)!==null)throw new _A(`invalid${A}header`);return t?e:`${A}:${e}\r
`}function fC(A,e,t,r=!1){if(t&&typeof t=="object"&&!Array.isArray(t))throw new _A(`invalid${e}header`);if(t===void 0)return;if(A.host===null&&e.length===4&&e.toLowerCase()==="host"){if(TG.exec(t)!==null)throw new _A(`invalid${e}header`);A.host=t}else if(A.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(A.contentLength=parseInt(t,10),!Number.isFinite(A.contentLength))throw new _A("invalid content-length header")}else if(A.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")A.contentType=t,r?A.headers[e]=ld(e,t,r):A.headers+=ld(e,t);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new _A("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof t=="string"?t.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new _A("invalid connection header");i==="close"&&(A.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new _A("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new _A("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new E4e("expect header not supported");if(MG.exec(e)===null)throw new _A("invalid header key");if(Array.isArray(t))for(let i=0;i<t.length;i++)r?A.headers[e]?A.headers[e]+=`,${ld(e,t[i],r)}`:A.headers[e]=ld(e,t[i],r):A.headers+=ld(e,t[i]);else r?A.headers[e]=ld(e,t,r):A.headers+=ld(e,t)}}}OG.exports=O6});var Nf=E((jtA,qG)=>{"use strict";var I4e=require("events"),Y6=class extends I4e{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};qG.exports=Y6});var wC=E((XtA,PG)=>{"use strict";var f4e=Nf(),{ClientDestroyedError:q6,ClientClosedError:y4e,InvalidArgumentError:ku}=UA(),{kDestroy:w4e,kClose:b4e,kDispatch:P6,kInterceptors:dd}=GA(),Fu=Symbol("destroyed"),yC=Symbol("closed"),wo=Symbol("onDestroyed"),Lu=Symbol("onClosed"),Df=Symbol("Intercepted Dispatch"),H6=class extends f4e{constructor(){super(),this[Fu]=!1,this[wo]=null,this[yC]=!1,this[Lu]=[]}get destroyed(){return this[Fu]}get closed(){return this[yC]}get interceptors(){return this[dd]}set interceptors(e){if(e){for(let t=e.length-1;t>=0;t--)if(typeof this[dd][t]!="function")throw new ku("interceptor must be an function")}this[dd]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((s,n)=>s?i(s):r(n))});if(typeof e!="function")throw new ku("invalid callback");if(this[Fu]){queueMicrotask(()=>e(new q6,null));return}if(this[yC]){this[Lu]?this[Lu].push(e):queueMicrotask(()=>e(null,null));return}this[yC]=!0,this[Lu].push(e);let t=()=>{let r=this[Lu];this[Lu]=null;for(let i=0;i<r.length;i++)r[i](null,null)};this[b4e]().then(()=>this.destroy()).then(()=>{queueMicrotask(t)})}destroy(e,t){if(typeof e=="function"&&(t=e,e=null),t===void 0)return new Promise((i,s)=>{this.destroy(e,(n,a)=>n?s(n):i(a))});if(typeof t!="function")throw new ku("invalid callback");if(this[Fu]){this[wo]?this[wo].push(t):queueMicrotask(()=>t(null,null));return}e||(e=new q6),this[Fu]=!0,this[wo]=this[wo]||[],this[wo].push(t);let r=()=>{let i=this[wo];this[wo]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[w4e](e).then(()=>{queueMicrotask(r)})}[Df](e,t){if(!this[dd]||this[dd].length===0)return this[Df]=this[P6],this[P6](e,t);let r=this[P6].bind(this);for(let i=this[dd].length-1;i>=0;i--)r=this[dd][i](r);return this[Df]=r,r(e,t)}dispatch(e,t){if(!t||typeof t!="object")throw new ku("handler must be an object");try{if(!e||typeof e!="object")throw new ku("opts must be an object.");if(this[Fu]||this[wo])throw new q6;if(this[yC])throw new y4e;return this[Df](e,t)}catch(r){if(typeof t.onError!="function")throw new ku("invalid onError method");return t.onError(r),!1}}};PG.exports=H6});var bC=E(($tA,_G)=>{"use strict";var N4e=require("net"),HG=require("assert"),GG=rA(),{InvalidArgumentError:D4e,ConnectTimeoutError:R4e}=UA(),G6,_6;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?_6=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.FinalizationRegistry(
`,"latin1"):(te(p===null,"no body must not have content length"),u.write(`${g}\r
`,"latin1")),e.onRequestSent()):he.isBuffer(t)?(te(p===t.byteLength,"buffer body must have content length"),u.cork(),u.write(`${g}content-length:${p}\r
`,"latin1"),u.write(t),u.uncork(),e.onBodySent(t),e.onRequestSent(),l||(u[Ei]=!0)):he.isBlobLike(t)?typeof t.stream=="function"?Tf({body:t.stream(),client:A,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):C_({body:t,client:A,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):he.isStream(t)?E_({body:t,client:A,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):he.isIterable(t)?Tf({body:t,client:A,request:e,socket:u,contentLength:p,header:g,expectsPayload:l}):te(!1),!0}function SRe(A,e,t){let{body:r,method:i,path:s,host:n,upgrade:a,expectContinue:o,signal:c,headers:l}=t,d;if(typeof l=="string"?d=Z6[dRe](l.trim()):d=l,a)return Ci(A,t,new Error("Upgrade not supported for H2")),!1;try{t.onConnect(w=>{t.aborted||t.completed||Ci(A,t,w||new s9)})}catch(w){Ci(A,t,w)}if(t.aborted)return!1;let p,u=A[Uf];if(d[uRe]=n||A[l_],d[gRe]=i,i==="CONNECT")return e.ref(),p=e.request(d,{endStream:!1,signal:c}),p.id&&!p.pending?(t.onUpgrade(null,null,p),++u.openStreams):p.once("ready",()=>{t.onUpgrade(null,null,p),++u.openStreams}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),!0;d[hRe]=s,d[ERe]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let h=he.bodyLength(r);if(h==null&&(h=t.contentLength),(h===0||!g)&&(h=null),h_(i)&&h>0&&t.contentLength!=null&&t.contentLength!==h){if(A[vC])return Ci(A,t,new bo),!1;process.emitWarning(new bo)}h!=null&&(te(r,"no body must not have content length"),d[CRe]=`${h}`),e.ref();let Q=i==="GET"||i==="HEAD";return o?(d[QRe]="100-continue",p=e.request(d,{endStream:Q,signal:c}),p.once("continue",B)):(p=e.request(d,{endStream:Q,signal:c}),B()),++u.openStreams,p.once("response",w=>{let{[mRe]:I,...C}=w;t.onHeaders(Number(I),C,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{t.onComplete([])}),p.on("data",w=>{t.onData(w)===!1&&p.pause()}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),p.once("error",function(w){A[ms]&&!A[ms].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,he.destroy(p,w))}),p.once("frameError",(w,I)=>{let C=new fa(`HTTP/2:"frameError"received-type${w},code${I}`);Ci(A,t,C),A[ms]&&!A[ms].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,he.destroy(p,C))}),!0;function B(){r?he.isBuffer(r)?(te(h===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),t.onBodySent(r),t.onRequestSent()):he.isBlobLike(r)?typeof r.stream=="function"?Tf({client:A,request:t,contentLength:h,h2stream:p,expectsPayload:g,body:r.stream(),socket:A[yt],header:""}):C_({body:r,client:A,request:t,contentLength:h,expectsPayload:g,h2stream:p,header:"",socket:A[yt]}):he.isStream(r)?E_({body:r,client:A,request:t,contentLength:h,expectsPayload:g,socket:A[yt],h2stream:p,header:""}):he.isIterable(r)?Tf({body:r,client:A,request:t,contentLength:h,expectsPayload:g,header:"",h2stream:p,socket:A[yt]}):te(!1):t.onRequestSent()}}function E_({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){if(te(s!==0||t[gt]===0,"stream body cannot be pipelined"),t[wa]==="h2"){let h=function(Q){r.onBodySent(Q)},g=W4e(e,A,Q=>{Q?(he.destroy(e,Q),he.destroy(A,Q)):r.onRequestSent()});g.on("data",h),g.once("end",()=>{g.removeListener("data",h),he.destroy(g)});return}let o=!1,c=new Of({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n}),l=function(g){if(!o)try{!c.write(g)&&this.pause&&this.pause()}catch(h){he.destroy(this,h)}},d=function(){o||e.resume&&e.resume()},p=function(){if(o)return;let g=new s9;queueMicrotask(()=>u(g))},u=function(g){if(!o){if(o=!0,te(i.destroyed||i[No]&&t[gt]<=1),i.off("drain",d).off("error",u),e.removeListener("data",l).removeListener("end",u).removeListener("error",u).removeListener("close",p),!g)try{c.end()}catch(h){g=h}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?he.destroy(e,g):he.destroy(e)}};e.on("data",l).on("end",u).on("error",u).on("close",p),e.resume&&e.resume(),i.on("drain",d).on("error",u)}async function C_({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,heade
`,"latin1"),i.write(c),i.uncork()),r.onBodySent(c),r.onRequestSent(),a||(i[Ei]=!0),Bs(t)}catch(c){he.destroy(o?A:i,c)}}async function Tf({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){te(s!==0||t[gt]===0,"iterator body cannot be pipelined");let o=null;function c(){if(o){let p=o;o=null,p()}}let l=()=>new Promise((p,u)=>{te(o===null),i[Ur]?u(i[Ur]):o=p});if(t[wa]==="h2"){A.on("close",c).on("drain",c);try{for await(let p of e){if(i[Ur])throw i[Ur];let u=A.write(p);r.onBodySent(p),u||await l()}}catch(p){A.destroy(p)}finally{r.onRequestSent(),A.end(),A.off("close",c).off("drain",c)}return}i.on("close",c).on("drain",c);let d=new Of({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n});try{for await(let p of e){if(i[Ur])throw i[Ur];d.write(p)||await l()}d.end()}catch(p){d.destroy(p)}finally{i.off("close",c).off("drain",c)}}var Of=class{constructor({socket:e,request:t,contentLength:r,client:i,expectsPayload:s,header:n}){this.socket=e,this.request=t,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=s,this.header=n,e[No]=!0}write(e){let{socket:t,request:r,contentLength:i,client:s,bytesWritten:n,expectsPayload:a,header:o}=this;if(t[Ur])throw t[Ur];if(t.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(i!==null&&n+c>i){if(s[vC])throw new bo;process.emitWarning(new bo)}t.cork(),n===0&&(a||(t[Ei]=!0),i===null?t.write(`${o}transfer-encoding:chunked\r
`.trim())}};gV.exports=A8});var IV=E((MrA,BV)=>{"use strict";var{kProxy:e8e,kClose:A8e,kDestroy:t8e,kInterceptors:r8e}=GA(),{URL:EV}=require("url"),CV=TC(),i8e=Pu(),s8e=wC(),{InvalidArgumentError:HC,RequestAbortedError:n8e}=UA(),QV=bC(),qC=Symbol("proxy agent"),a1=Symbol("proxy client"),PC=Symbol("proxy headers"),t8=Symbol("request tls settings"),a8e=Symbol("proxy tls settings"),mV=Symbol("connect endpoint function");function o8e(A){return A==="https:"?443:80}function c8e(A){if(typeof A=="string"&&(A={uri:A}),!A||!A.uri)throw new HC("Proxy opts.uri is mandatory");return{uri:A.uri,protocol:A.protocol||"https"}}function l8e(A,e){return new i8e(A,e)}var r8=class extends s8e{constructor(e){if(super(e),this[e8e]=c8e(e),this[qC]=new CV(e),this[r8e]=e.interceptors&&e.interceptors.ProxyAgent&&Array.isArray(e.interceptors.ProxyAgent)?e.interceptors.ProxyAgent:[],typeof e=="string"&&(e={uri:e}),!e||!e.uri)throw new HC("Proxy opts.uri is mandatory");let{clientFactory:t=l8e}=e;if(typeof t!="function")throw new HC("Proxy opts.clientFactory must be a function.");this[t8]=e.requestTls,this[a8e]=e.proxyTls,this[PC]=e.headers||{};let r=new EV(e.uri),{origin:i,port:s,host:n,username:a,password:o}=r;if(e.auth&&e.token)throw new HC("opts.auth cannot be used in combination with opts.token");e.auth?this[PC]["proxy-authorization"]=`Basic${e.auth}`:e.token?this[PC]["proxy-authorization"]=e.token:a&&o&&(this[PC]["proxy-authorization"]=`Basic${Buffer.from(`${decodeURIComponent(a)}:${decodeURIComponent(o)}`).toString("base64")}`);let c=QV({...e.proxyTls});this[mV]=QV({...e.requestTls}),this[a1]=t(r,{connect:c}),this[qC]=new CV({...e,connect:async(l,d)=>{let p=l.host;l.port||(p+=`:${o8e(l.protocol)}`);try{let{socket:u,statusCode:g}=await this[a1].connect({origin:i,port:s,path:p,signal:l.signal,headers:{...this[PC],host:n}});if(g!==200&&(u.on("error",()=>{}).destroy(),d(new n8e(`Proxyresponse(${g})!==200whenHTTPTunneling`))),l.protocol!=="https:"){d(null,u);return}let h;this[t8]?h=this[t8].servername:h=l.servername,this[mV]({...l,servername:h,httpSocket:u},d)}catch(u){d(u)}}})}dispatch(e,t){let{host:r}=new EV(e.origin),i=d8e(e.headers);return p8e(i),this[qC].dispatch({...e,headers:{...i,host:r}},t)}async[A8e](){await this[qC].close(),await this[a1].close()}async[t8e](){await this[qC].destroy(),await this[a1].destroy()}};function d8e(A){if(Array.isArray(A)){let e={};for(let t=0;t<A.length;t+=2)e[A[t]]=A[t+1];return e}return A}function p8e(A){if(A&&Object.keys(A).find(t=>t.toLowerCase()==="proxy-authorization"))throw new HC("Proxy-Authorization should be sent in ProxyAgent constructor")}BV.exports=r8});var NV=E((TrA,bV)=>{var Id=require("assert"),{kRetryHandlerDefaultRetry:fV}=GA(),{RequestRetryError:o1}=UA(),{isDisturbed:yV,parseHeaders:u8e,parseRangeHeader:wV}=rA();function g8e(A){let e=Date.now();return new Date(A).getTime()-e}var i8=class A{constructor(e,t){let{retryOptions:r,...i}=e,{retry:s,maxRetries:n,maxTimeout:a,minTimeout:o,timeoutFactor:c,methods:l,errorCodes:d,retryAfter:p,statusCodes:u}=r??{};this.dispatch=t.dispatch,this.handler=t.handler,this.opts=i,this.abort=null,this.aborted=!1,this.retryOpts={retry:s??A[fV],retryAfter:p??!0,maxTimeout:a??30*1e3,timeout:o??500,timeoutFactor:c??2,maxRetries:n??5,methods:l??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:u??[500,502,503,504,429],errorCodes:d??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE"]},this.retryCount=0,this.start=0,this.end=null,this.etag=null,this.resume=null,this.handler.onConnect(g=>{this.aborted=!0,this.abort?this.abort(g):this.reason=g})}onRequestSent(){this.handler.onRequestSent&&this.handler.onRequestSent()}onUpgrade(e,t,r){this.handler.onUpgrade&&this.handler.onUpgrade(e,t,r)}onConnect(e){this.aborted?e(this.reason):this.abort=e}onBodySent(e){if(this.handler.onBodySent)return this.handler.onBodySent(e)}static[fV](e,{state:t,opts:r},i){let{statusCode:s,code:n,headers:a}=e,{method:o,retryOptions:c}=r,{maxRetries:l,timeout:d,maxTimeout:p,timeoutFactor:u,statusCodes:g,errorCodes:h,methods:Q}=c,{count
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(Ax)});var va=E((Nj,Wc)=>{(function(){var A,e,t,r,i,s,n,a=[].slice,o={}.hasOwnProperty;A=function(){var c,l,d,p,u,g;if(g=arguments[0],u=2<=arguments.length?a.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(c=0,d=u.length;c<d;c++)if(p=u[c],p!=null)for(l in p)o.call(p,l)&&(g[l]=p[l]);return g},i=function(c){return!!c&&Object.prototype.toString.call(c)==="[object Function]"},s=function(c){var l;return!!c&&((l=typeof c)=="function"||l==="object")},t=function(c){return i(Array.isArray)?Array.isArray(c):Object.prototype.toString.call(c)==="[object Array]"},r=function(c){var l;if(t(c))return!c.length;for(l in c)if(o.call(c,l))return!1;return!0},n=function(c){var l,d;return s(c)&&(d=Object.getPrototypeOf(c))&&(l=d.constructor)&&typeof l=="function"&&l instanceof l&&Function.prototype.toString.call(l)===Function.prototype.toString.call(Object)},e=function(c){return i(c.valueOf)?c.valueOf():c},Wc.exports.assign=A,Wc.exports.isFunction=i,Wc.exports.isObject=s,Wc.exports.isArray=t,Wc.exports.isEmpty=r,Wc.exports.isPlainObject=n,Wc.exports.getValue=e}).call(Nj)});var tx=E((Dj,Rj)=>{(function(){var A;Rj.exports=A=function(){function e(){}return e.prototype.hasFeature=function(t,r){return!0},e.prototype.createDocumentType=function(t,r,i){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(t,r,i){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(t){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(t,r){throw new Error("This DOM method is not implemented.")},e}()}).call(Dj)});var vj=E((xj,Sj)=>{(function(){var A;Sj.exports=A=function(){function e(){}return e.prototype.handleError=function(t){throw new Error(t)},e}()}).call(xj)});var Lj=E((kj,Fj)=>{(function(){var A;Fj.exports=A=function(){function e(t){this.arr=t||[]}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(t){return this.arr[t]||null},e.prototype.contains=function(t){return this.arr.indexOf(t)!==-1},e}()}).call(kj)});var Tj=E((Uj,Mj)=>{(function(){var A,e,t;e=vj(),t=Lj(),Mj.exports=A=function(){function r(){var i;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=i=Object.create(this.defaultParams)}return Object.defineProperty(r.prototype,"parameterNames",{get:function(){return new t(Object.keys(this.defaultParams))}}),r.prototype.getParameter=function(i){return this.params.hasOwnProperty(i)?this.params[i]:null},r.prototype.canSetParameter=function(i,s){return!0},r.prototype.setParameter=function(i,s){return s!=null?this.params[i]=s:delete this.params[i]},r}()}).call(Uj)});var Yt=E((Oj,Yj)=>{(function(){Yj.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(Oj)});var rx=E((qj,Pj)=>{(function(){var A,e,t;A=Yt(),t=Ds(),Pj.exports=e=function(){function r(i,s,n){if(this.parent=i,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),s==null)throw new Error("Missing attribute name. "+this.debugInfo(s));this.name=this.stringify.name(s),this.value=this.stringify.attValue(n),this.type=A.Attribute,this.isId=!1,this.schemaTypeInfo=null}return Object.defineProperty(r.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(r.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(r.prototype,"textContent",{get:function(){return this.value},set:function(i){return this.value=i||""}}),Object.defin
`?(f.line++,f.column=0):f.column++);f.textNode+=N.substring(NA,M-1)}k==="<"&&!(f.sawRoot&&f.closedRoot&&!f.strict)?(f.state=y.OPEN_WAKA,f.startTagPosition=f.position):(!I(k)&&(!f.sawRoot||f.closedRoot)&&T(f,"Text data outside of root node."),k==="&"?f.state=y.TEXT_ENTITY:f.textNode+=k);continue;case y.SCRIPT:k==="<"?f.state=y.SCRIPT_ENDING:f.script+=k;continue;case y.SCRIPT_ENDING:k==="/"?f.state=y.CLOSE_TAG:(f.script+="<"+k,f.state=y.SCRIPT);continue;case y.OPEN_WAKA:if(k==="!")f.state=y.SGML_DECL,f.sgmlDecl="";else if(!I(k))if(b(h,k))f.state=y.OPEN_TAG,f.tagName=k;else if(k==="/")f.state=y.CLOSE_TAG,f.tagName="";else if(k==="?")f.state=y.PROC_INST,f.procInstName=f.procInstBody="";else{if(T(f,"Unencoded <"),f.startTagPosition+1<f.position){var $t=f.position-f.startTagPosition;k=new Array($t).join(" ")+k}f.textNode+="<"+k,f.state=y.TEXT}continue;case y.SGML_DECL:(f.sgmlDecl+k).toUpperCase()===l?(S(f,"onopencdata"),f.state=y.CDATA,f.sgmlDecl="",f.cdata=""):f.sgmlDecl+k==="--"?(f.state=y.COMMENT,f.comment="",f.sgmlDecl=""):(f.sgmlDecl+k).toUpperCase()===d?(f.state=y.DOCTYPE,(f.doctype||f.sawRoot)&&T(f,"Inappropriately located doctype declaration"),f.doctype="",f.sgmlDecl=""):k===">"?(S(f,"onsgmldeclaration",f.sgmlDecl),f.sgmlDecl="",f.state=y.TEXT):(C(k)&&(f.state=y.SGML_DECL_QUOTED),f.sgmlDecl+=k);continue;case y.SGML_DECL_QUOTED:k===f.q&&(f.state=y.SGML_DECL,f.q=""),f.sgmlDecl+=k;continue;case y.DOCTYPE:k===">"?(f.state=y.TEXT,S(f,"ondoctype",f.doctype),f.doctype=!0):(f.doctype+=k,k==="["?f.state=y.DOCTYPE_DTD:C(k)&&(f.state=y.DOCTYPE_QUOTED,f.q=k));continue;case y.DOCTYPE_QUOTED:f.doctype+=k,k===f.q&&(f.q="",f.state=y.DOCTYPE);continue;case y.DOCTYPE_DTD:f.doctype+=k,k==="]"?f.state=y.DOCTYPE:C(k)&&(f.state=y.DOCTYPE_DTD_QUOTED,f.q=k);continue;case y.DOCTYPE_DTD_QUOTED:f.doctype+=k,k===f.q&&(f.state=y.DOCTYPE_DTD,f.q="");continue;case y.COMMENT:k==="-"?f.state=y.COMMENT_ENDING:f.comment+=k;continue;case y.COMMENT_ENDING:k==="-"?(f.state=y.COMMENT_ENDED,f.comment=F(f.opt,f.comment),f.comment&&S(f,"oncomment",f.comment),f.comment=""):(f.comment+="-"+k,f.state=y.COMMENT);continue;case y.COMMENT_ENDED:k!==">"?(T(f,"Malformed comment"),f.comment+="--"+k,f.state=y.COMMENT):f.state=y.TEXT;continue;case y.CDATA:k==="]"?f.state=y.CDATA_ENDING:f.cdata+=k;continue;case y.CDATA_ENDING:k==="]"?f.state=y.CDATA_ENDING_2:(f.cdata+="]"+k,f.state=y.CDATA);continue;case y.CDATA_ENDING_2:k===">"?(f.cdata&&S(f,"oncdata",f.cdata),S(f,"onclosecdata"),f.cdata="",f.state=y.TEXT):k==="]"?f.cdata+="]":(f.cdata+="]]"+k,f.state=y.CDATA);continue;case y.PROC_INST:k==="?"?f.state=y.PROC_INST_ENDING:I(k)?f.state=y.PROC_INST_BODY:f.procInstName+=k;continue;case y.PROC_INST_BODY:if(!f.procInstBody&&I(k))continue;k==="?"?f.state=y.PROC_INST_ENDING:f.procInstBody+=k;continue;case y.PROC_INST_ENDING:k===">"?(S(f,"onprocessinginstruction",{name:f.procInstName,body:f.procInstBody}),f.procInstName=f.procInstBody="",f.state=y.TEXT):(f.procInstBody+="?"+k,f.state=y.PROC_INST_BODY);continue;case y.OPEN_TAG:b(Q,k)?f.tagName+=k:(Ze(f),k===">"?oA(f):k==="/"?f.state=y.OPEN_TAG_SLASH:(I(k)||T(f,"Invalid character in tag name"),f.state=y.ATTRIB));continue;case y.OPEN_TAG_SLASH:k===">"?(oA(f,!0),cr(f)):(T(f,"Forward-slash in opening tag not followed by >"),f.state=y.ATTRIB);continue;case y.ATTRIB:if(I(k))continue;k===">"?oA(f):k==="/"?f.state=y.OPEN_TAG_SLASH:b(h,k)?(f.attribName=k,f.attribValue="",f.state=y.ATTRIB_NAME):T(f,"Invalid attribute name");continue;case y.ATTRIB_NAME:k==="="?f.state=y.ATTRIB_VALUE:k===">"?(T(f,"Attribute without value"),f.attribValue=f.attribName,bA(f),oA(f)):I(k)?f.state=y.ATTRIB_NAME_SAW_WHITE:b(Q,k)?f.attribName+=k:T(f,"Invalid attribute name");continue;case y.ATTRIB_NAME_SAW_WHITE:if(k==="=")f.state=y.ATTRIB_VALUE;else{if(I(k))continue;T(f,"Attribute without value"),f.tag.attributes[f.attribName]="",f.attribValue="",S(f,"onattribute",{name:f.attribName,value:""}),f.attribName="",k===">"?oA(f):b(h,k)?(f.attribName=k,f.state=y.ATTRIB_NAME):(T(f,"Invalid attribute name"),f.state=y.ATTRIB)}continue;case y.ATTRIB_VALUE:if(I(k))continue;C(k)?
`;sA.DEFAULT_CONTENT_TYPE="application/octet-stream";sA.prototype.append=function(A,e,t){t=t||{},typeof t=="string"&&(t={filename:t});var r=Mx.prototype.append.bind(this);if(typeof e=="number"&&(e=""+e),pK.isArray(e)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(A,e,t),s=this._multiPartFooter();r(i),r(e),r(s),this._trackLength(i,e,t)};sA.prototype._trackLength=function(A,e,t){var r=0;t.knownLength!=null?r+=+t.knownLength:Buffer.isBuffer(e)?r=e.length:typeof e=="string"&&(r=Buffer.byteLength(e)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(A)+sA.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&e.hasOwnProperty("httpVersion"))&&!(e instanceof $ve))&&(t.knownLength||this._valuesToMeasure.push(e))};sA.prototype._lengthRetriever=function(A,e){A.hasOwnProperty("fd")?A.end!=null&&A.end!=1/0&&A.start!=null?e(null,A.end+1-(A.start?A.start:0)):Kve.stat(A.path,function(t,r){var i;if(t){e(t);return}i=r.size-(A.start?A.start:0),e(null,i)}):A.hasOwnProperty("httpVersion")?e(null,+A.headers["content-length"]):A.hasOwnProperty("httpModule")?(A.on("response",function(t){A.pause(),e(null,+t.headers["content-length"])}),A.resume()):e("Unknown stream")};sA.prototype._multiPartHeader=function(A,e,t){if(typeof t.header=="string")return t.header;var r=this._getContentDisposition(e,t),i=this._getContentType(e,t),s="",n={"Content-Disposition":["form-data",'name="'+A+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof t.header=="object"&&Ux(n,t.header);var a;for(var o in n)n.hasOwnProperty(o)&&(a=n[o],a!=null&&(Array.isArray(a)||(a=[a]),a.length&&(s+=o+": "+a.join("; ")+sA.LINE_BREAK)));return"--"+this.getBoundary()+sA.LINE_BREAK+s+sA.LINE_BREAK};sA.prototype._getContentDisposition=function(A,e){var t,r;return typeof e.filepath=="string"?t=Fx.normalize(e.filepath).replace(/\\/g,"/"):e.filename||A.name||A.path?t=Fx.basename(e.filename||A.name||A.path):A.readable&&A.hasOwnProperty("httpVersion")&&(t=Fx.basename(A.client._httpMessage.path||"")),t&&(r='filename="'+t+'"'),r};sA.prototype._getContentType=function(A,e){var t=e.contentType;return!t&&A.name&&(t=Lx.lookup(A.name)),!t&&A.path&&(t=Lx.lookup(A.path)),!t&&A.readable&&A.hasOwnProperty("httpVersion")&&(t=A.headers["content-type"]),!t&&(e.filepath||e.filename)&&(t=Lx.lookup(e.filepath||e.filename)),!t&&typeof A=="object"&&(t=sA.DEFAULT_CONTENT_TYPE),t};sA.prototype._multiPartFooter=function(){return function(A){var e=sA.LINE_BREAK,t=this._streams.length===0;t&&(e+=this._lastBoundary()),A(e)}.bind(this)};sA.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+sA.LINE_BREAK};sA.prototype.getHeaders=function(A){var e,t={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in A)A.hasOwnProperty(e)&&(t[e.toLowerCase()]=A[e]);return t};sA.prototype.setBoundary=function(A){this._boundary=A};sA.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};sA.prototype.getBuffer=function(){for(var A=new Buffer.alloc(0),e=this.getBoundary(),t=0,r=this._streams.length;t<r;t++)typeof this._streams[t]!="function"&&(Buffer.isBuffer(this._streams[t])?A=Buffer.concat([A,this._streams[t]]):A=Buffer.concat([A,Buffer.from(this._streams[t])]),(typeof this._streams[t]!="string"||this._streams[t].substring(2,e.length+2)!==e)&&(A=Buffer.concat([A,Buffer.from(sA.LINE_BREAK)])));return Buffer.concat([A,Buffer.from(this._lastBoundary())])};sA.prototype._generateBoundary=function(){for(var A="--------------------------",e=0;e<24;e++)A+=Math.floor(Math.random()*10).toString(16);this._boundary=A};sA.prototype.getLengthSync=function(){var A=this._overheadLength+this._valueLength;return this._streams.length&&(A+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),A};sA.prototype.hasKnownLength=function(){var A=!0;return this._valuesToMeasure.length&&(A=!1),A};sA.prototype.getLength=function(A){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure
${WLe.sanitize(this)}`}};Ss.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";Ss.PARSE_ERROR="PARSE_ERROR";var Vn=J7e.createClientLogger("core-http");function uee(A,e){return A?e.httpsAgent:e.httpAgent}var Hy=class extends X7e.Transform{constructor(e){super(),this.progressCallback=e,this.loadedBytes=0}_transform(e,t,r){this.push(e),this.loadedBytes+=e.length,this.progressCallback({loadedBytes:this.loadedBytes}),r(void 0)}};function Uy(A){return A&&typeof A.pipe=="function"}function gee(A,e){return new Promise(t=>{A.once("close",()=>{e?.abort(),t()}),A.once("end",t),A.once("error",t)})}function zLe(A){let e=new tl;return A.forEach((t,r)=>{e.set(r,t)}),e}var Gy=class{constructor(){this.proxyAgentMap=new Map,this.keepAliveAgents={}}async sendRequest(e){var t;if(!e&&typeof e!="object")throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.");let r=new My.AbortController,i;if(e.abortSignal){if(e.abortSignal.aborted)throw new My.AbortError("The operation was aborted.");i=c=>{c.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",i)}if(e.timeout&&setTimeout(()=>{r.abort()},e.timeout),e.formData){let c=e.formData,l=new $7e.default,d=(u,g)=>{typeof g=="function"&&(g=g()),g&&Object.prototype.hasOwnProperty.call(g,"value")&&Object.prototype.hasOwnProperty.call(g,"options")?l.append(u,g.value,g.options):l.append(u,g)};for(let u of Object.keys(c)){let g=c[u];if(Array.isArray(g))for(let h=0;h<g.length;h++)d(u,g[h]);else d(u,g)}e.body=l,e.formData=void 0;let p=e.headers.get("Content-Type");p&&p.indexOf("multipart/form-data")!==-1&&(typeof l.getBoundary=="function"?e.headers.set("Content-Type",`multipart/form-data;boundary=${l.getBoundary()}`):e.headers.remove("Content-Type"))}let s=e.body?typeof e.body=="function"?e.body():e.body:void 0;if(e.onUploadProgress&&e.body){let c=e.onUploadProgress,l=new Hy(c);Uy(s)?s.pipe(l):l.end(s),s=l}let n=await this.prepareRequest(e),a=Object.assign({body:s,headers:e.headers.rawHeaders(),method:e.method,signal:r.signal,redirect:"manual"},n),o;try{let c=await this.fetch(e.url,a),l=zLe(c.headers),d=((t=e.streamResponseStatusCodes)===null||t===void 0?void 0:t.has(c.status))||e.streamResponseBody;o={headers:l,request:e,status:c.status,readableStreamBody:d?c.body:void 0,bodyAsText:d?void 0:await c.text()};let p=e.onDownloadProgress;if(p){let u=c.body||void 0;if(Uy(u)){let g=new Hy(p);u.pipe(g),o.readableStreamBody=g}else{let g=parseInt(l.get("Content-Length"))||void 0;g&&p({loadedBytes:g})}}return await this.processRequest(o),o}catch(c){let l=c;throw l.code==="ENOTFOUND"?new Ss(l.message,Ss.REQUEST_SEND_ERROR,void 0,e):l.type==="aborted"?new My.AbortError("The operation was aborted."):l}finally{if(e.abortSignal&&i){let c=Promise.resolve();Uy(s)&&(c=gee(s));let l=Promise.resolve();Uy(o?.readableStreamBody)&&(l=gee(o.readableStreamBody,r)),Promise.all([c,l]).then(()=>{var d;(d=e.abortSignal)===null||d===void 0||d.removeEventListener("abort",i)}).catch(d=>{Vn.warning("Error when cleaning up abortListener on httpRequest",d)})}}}getOrCreateAgent(e){var t;let r=JS(e.url);if(e.proxySettings){let{host:i,port:s,username:n,password:a}=e.proxySettings,o=`${i}:${s}:${n}:${a}`,c=(t=this.proxyAgentMap.get(o))!==null&&t!==void 0?t:{},l=uee(r,c);if(l)return l;let d=GLe(e.url,e.proxySettings,e.headers);return l=d.agent,d.isHttps?c.httpsAgent=d.agent:c.httpAgent=d.agent,this.proxyAgentMap.set(o,c),l}else if(e.keepAlive){let i=uee(r,this.keepAliveAgents);if(i)return i;let s={keepAlive:e.keepAlive};return r?i=this.keepAliveAgents.httpsAgent=new oee.Agent(s):i=this.keepAliveAgents.httpAgent=new aee.Agent(s),i}else return r?oee.globalAgent:aee.globalAgent}async fetch(e,t){return eLe.default(e,t)}async prepareRequest(e){let t={};return t.agent=this.getOrCreateAgent(e),t.compress=e.decompressResponse,t}async processRequest(e){}};X.HttpPipelineLogLevel=void 0;(function(A){A[A.OFF=0]="OFF",A[A.ERROR=1]="ERROR",A[A.WARNING=2]="WARNING",A[A.INFO=3]="INFO"})(X.HttpPipelineLogLevel||(X.HttpPipelineLogLevel={}));function jLe(A){let{requestOptions:e,tracingOptions:t}=A,i=G7e.__rest(A,[
Pollingstatus:${lAe.terminalStates.includes(l)?"Stopped":"Running"}`),l==="succeeded"){let d=n(c,t);if(d!==void 0)return{response:await e(d).catch(cAe({state:t,stateProxy:r,isOperationError:a})),status:l}}return{response:c,status:l}}async function _Ue(A){let{poll:e,state:t,stateProxy:r,options:i,getOperationStatus:s,getResourceLocation:n,getOperationLocation:a,isOperationError:o,withOperationLocation:c,getPollingInterval:l,processResult:d,getError:p,updateState:u,setDelay:g,isDone:h,setErrorAsResult:Q}=A,{operationLocation:B}=t.config;if(B!==void 0){let{response:w,status:I}=await GUe({poll:e,getOperationStatus:s,state:t,stateProxy:r,operationLocation:B,getResourceLocation:n,isOperationError:o,options:i});if(dAe({status:I,response:w,state:t,stateProxy:r,isDone:h,processResult:d,getError:p,setErrorAsResult:Q}),!lAe.terminalStates.includes(I)){let C=l?.(w);C&&g(C);let m=a?.(w,t);if(m!==void 0){let b=B!==m;t.config.operationLocation=m,c?.(m,b)}else c?.(B,!1)}u?.(t,w)}}sl.pollOperation=_Ue});var k3=E(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.pollHttpOperation=Rt.isOperationError=Rt.getResourceLocation=Rt.getOperationStatus=Rt.getOperationLocation=Rt.initHttpOperation=Rt.getStatusFromInitialResponse=Rt.getErrorFromResponse=Rt.parseRetryAfter=Rt.inferLroMode=void 0;var pAe=t2(),x3=e2();function uAe(A){let{azureAsyncOperation:e,operationLocation:t}=A;return t??e}function gAe(A){return A.headers.location}function hAe(A){return A.headers["operation-location"]}function EAe(A){return A.headers["azure-asyncoperation"]}function JUe(A){let{location:e,requestMethod:t,requestPath:r,resourceLocationConfig:i}=A;switch(t){case"PUT":return r;case"DELETE":return;case"PATCH":return s()??r;default:return s()}function s(){switch(i){case"azure-async-operation":return;case"original-uri":return r;case"location":default:return e}}}function CAe(A){let{rawResponse:e,requestMethod:t,requestPath:r,resourceLocationConfig:i}=A,s=hAe(e),n=EAe(e),a=uAe({operationLocation:s,azureAsyncOperation:n}),o=gAe(e),c=t?.toLocaleUpperCase();return a!==void 0?{mode:"OperationLocation",operationLocation:a,resourceLocation:JUe({requestMethod:c,location:o,requestPath:r,resourceLocationConfig:i})}:o!==void 0?{mode:"ResourceLocation",operationLocation:o}:c==="PUT"&&r?{mode:"Body",operationLocation:r}:void 0}Rt.inferLroMode=CAe;function QAe(A){let{status:e,statusCode:t}=A;if(typeof e!="string"&&e!==void 0)throw new Error(`Pollingwasunsuccessful.Expectedstatustohaveastringvalueornovaluebutithasinstead:${e}.Thisdoesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return S3(t);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return x3.logger.verbose(`LRO: unrecognized operation status: ${e}`),e}}function VUe(A){let{status:e}=A.body??{};return QAe({status:e,statusCode:A.statusCode})}function WUe(A){let{properties:e,provisioningState:t}=A.body??{},r=e?.provisioningState??t;return QAe({status:r,statusCode:A.statusCode})}function S3(A){return A===202?"running":A<300?"succeeded":"failed"}function mAe({rawResponse:A}){let e=A.headers["retry-after"];if(e!==void 0){let t=parseInt(e);return isNaN(t)?zUe(new Date(e)):t*1e3}}Rt.parseRetryAfter=mAe;function BAe(A){let e=yAe(A,"error");if(!e){x3.logger.warning("The long-running operation failed but there is no error property in the response'sbody");return}if(!e.code||!e.message){x3.logger.warning("Thelong-runningoperationfailedbuttheerrorpropertyintheresponse's body doesn'tcontaincodeormessage");return}return e}Rt.getErrorFromResponse=BAe;function zUe(A){let e=Math.floor(new Date().getTime()),t=A.getTime();if(e<t)return t-e}function IAe(A){let{response:e,state:t,operationLocation:r}=A;function i(){switch(t.config.metadata?.mode){case void 0:return S3(e.rawResponse.statusCode);case"Body":returnv3(e,t)
`,Fse="HTTP/1.1",kYe="AES256",FYe="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",LYe=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-if-tags","x-ms-source-if-tags"],UYe=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],MYe="BlobUsesCustomerSpecifiedEncryption",TYe="BlobDoesNotUseCustomerSpecifiedEncryption",OYe=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function YYe(A){let e=O.URLBuilder.parse(A),t=e.getPath();return t=t||"/",t=PYe(t),e.setPath(t),e.toString()}function qYe(A){let e="";if(A.search("DevelopmentStorageProxyUri=")!==-1){let t=A.split(";");for(let r of t)r.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=r.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}function Hd(A,e){let t=A.split(";");for(let r of t)if(r.trim().startsWith(e))return r.trim().match(e+"=(.*)")[1];return""}function nh(A){let e="";A.startsWith("UseDevelopmentStorage=true")&&(e=qYe(A),A=FYe);let t=Hd(A,"BlobEndpoint");if(t=t.endsWith("/")?t.slice(0,-1):t,A.search("DefaultEndpointsProtocol=")!==-1&&A.search("AccountKey=")!==-1){let r="",i="",s=Buffer.from("accountKey","base64"),n="";if(i=Hd(A,"AccountName"),s=Buffer.from(Hd(A,"AccountKey"),"base64"),!t){r=Hd(A,"DefaultEndpointsProtocol");let a=r.toLowerCase();if(a!=="https"&&a!=="http")throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(n=Hd(A,"EndpointSuffix"),!n)throw new Error("Invalid EndpointSuffix in the provided Connection String");t=`${r}://${i}.blob.${n}`}if(i){if(s.length===0)throw new Error("Invalid AccountKey in the provided Connection St
`}),r}getCanonicalizedResourceString(e){let t=W5(e.url)||"/",r="";r+=`/${this.factory.accountName}${t}`;let i=JYe(e.url),s={};if(i){let n=[];for(let a in i)if(Object.prototype.hasOwnProperty.call(i,a)){let o=a.toLowerCase();s[o]=i[a],n.push(o)}n.sort();for(let a of n)r+=`
${a}:${decodeURIComponent(s[a])}`}return r}},St=class extends PQ{constructor(e,t){super(),this.accountName=e,this.accountKey=Buffer.from(t,"base64")}create(e,t){return new x2(e,t,this)}computeHMACSHA256(e){return pte.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},nqe="azure-storage-blob",aqe="12.17.0",GQ=class extends V.ServiceClient{constructor(e,t){if(e===void 0)throw new Error("'url' cannot be null");if(t||(t={}),!t.userAgent){let r=V.getDefaultUserAgentValue();t.userAgent=`${nqe}/${aqe}${r}`}super(void 0,t),this.requestContentType="application/json; charset=utf-8",this.baseUri=t.endpoint||"{url}",this.url=e,this.version=t.version||"2023-11-03"}},_Q=class{constructor(e,t){this.url=YYe(e),this.accountName=Use(e),this.pipeline=t,this.storageClientContext=new GQ(this.url,t.toServiceClientOptions()),this.isHttps=Lse(GYe(this.url)||"","https"),this.credential=new kA;for(let i of this.pipeline.factories)O.isNode&&i instanceof St||i instanceof kA?this.credential=i:O.isTokenCredential(i.credential)&&(this.credential=i.credential);let r=this.storageClientContext;r.requestContentType=void 0}},_=Y.createSpanFunction({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function re(A){var e,t;return{spanOptions:(e=A?.tracingOptions)===null||e===void 0?void 0:e.spanOptions,tracingContext:(t=A?.tracingOptions)===null||t===void 0?void 0:t.tracingContext}}var Ho=class A{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){let t=new A;for(let r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"x":t.deleteVersion=!0;break;case"t":t.tag=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;default:throw new RangeError(`Invalidpermission:${r}`)}return t}static from(e){let t=new A;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),t}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}},Go=class A{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){let t=new A;for(let r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"l":t.list=!0;break;case"t":t.tag=!0;break;case"x":t.deleteVersion=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;case"f":t.filterByTags=!0;break;default:throw new RangeError(`Invalidpermission${r}`)}return t}static from(e){let t=new A;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.list&&(t.list=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),e.filterByTags&&(t.filterByTags=!0),t}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),
`),s=e.computeHMACSHA256(i);return new qa(A.version,s,r,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType)}function cqe(A,e){if(A=oh(A),!A.identifier&&!(A.permissions&&A.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let t="c",r=A.snapshotTime;A.blobName&&(t="b",A.snapshotTime?t="bs":A.versionId&&(t="bv",r=A.versionId));let i;A.permissions&&(A.blobName?i=Ho.parse(A.permissions.toString()).toString():i=Go.parse(A.permissions.toString()).toString());let s=[i||"",A.startsOn?IA(A.startsOn,!1):"",A.expiresOn?IA(A.expiresOn,!1):"",ah(e.accountName,A.containerName,A.blobName),A.identifier,A.ipRange?_o(A.ipRange):"",A.protocol?A.protocol:"",A.version,t,r,A.cacheControl?A.cacheControl:"",A.contentDisposition?A.contentDisposition:"",A.contentEncoding?A.contentEncoding:"",A.contentLanguage?A.contentLanguage:"",A.contentType?A.contentType:""].join(`
`),n=e.computeHMACSHA256(s);return new qa(A.version,n,i,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType)}function lqe(A,e){if(A=oh(A),!A.identifier&&!(A.permissions&&A.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let t="c",r=A.snapshotTime;A.blobName&&(t="b",A.snapshotTime?t="bs":A.versionId&&(t="bv",r=A.versionId));let i;A.permissions&&(A.blobName?i=Ho.parse(A.permissions.toString()).toString():i=Go.parse(A.permissions.toString()).toString());let s=[i||"",A.startsOn?IA(A.startsOn,!1):"",A.expiresOn?IA(A.expiresOn,!1):"",ah(e.accountName,A.containerName,A.blobName),A.identifier,A.ipRange?_o(A.ipRange):"",A.protocol?A.protocol:"",A.version,t,r,A.encryptionScope,A.cacheControl?A.cacheControl:"",A.contentDisposition?A.contentDisposition:"",A.contentEncoding?A.contentEncoding:"",A.contentLanguage?A.contentLanguage:"",A.contentType?A.contentType:""].join(`
`),n=e.computeHMACSHA256(s);return new qa(A.version,n,i,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType,void 0,void 0,void 0,A.encryptionScope)}function dqe(A,e){if(A=oh(A),!A.permissions||!A.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let t="c",r=A.snapshotTime;A.blobName&&(t="b",A.snapshotTime?t="bs":A.versionId&&(t="bv",r=A.versionId));let i;A.permissions&&(A.blobName?i=Ho.parse(A.permissions.toString()).toString():i=Go.parse(A.permissions.toString()).toString());let s=[i||"",A.startsOn?IA(A.startsOn,!1):"",A.expiresOn?IA(A.expiresOn,!1):"",ah(e.accountName,A.containerName,A.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?IA(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?IA(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,A.ipRange?_o(A.ipRange):"",A.protocol?A.protocol:"",A.version,t,r,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType].join(`
`),n=e.computeHMACSHA256(s);return new qa(A.version,n,i,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType,e.userDelegationKey)}function pqe(A,e){if(A=oh(A),!A.permissions||!A.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let t="c",r=A.snapshotTime;A.blobName&&(t="b",A.snapshotTime?t="bs":A.versionId&&(t="bv",r=A.versionId));let i;A.permissions&&(A.blobName?i=Ho.parse(A.permissions.toString()).toString():i=Go.parse(A.permissions.toString()).toString());let s=[i||"",A.startsOn?IA(A.startsOn,!1):"",A.expiresOn?IA(A.expiresOn,!1):"",ah(e.accountName,A.containerName,A.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?IA(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?IA(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,A.preauthorizedAgentObjectId,void 0,A.correlationId,A.ipRange?_o(A.ipRange):"",A.protocol?A.protocol:"",A.version,t,r,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType].join(`
`),n=e.computeHMACSHA256(s);return new qa(A.version,n,i,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType,e.userDelegationKey,A.preauthorizedAgentObjectId,A.correlationId)}function uqe(A,e){if(A=oh(A),!A.permissions||!A.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let t="c",r=A.snapshotTime;A.blobName&&(t="b",A.snapshotTime?t="bs":A.versionId&&(t="bv",r=A.versionId));let i;A.permissions&&(A.blobName?i=Ho.parse(A.permissions.toString()).toString():i=Go.parse(A.permissions.toString()).toString());let s=[i||"",A.startsOn?IA(A.startsOn,!1):"",A.expiresOn?IA(A.expiresOn,!1):"",ah(e.accountName,A.containerName,A.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?IA(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?IA(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,A.preauthorizedAgentObjectId,void 0,A.correlationId,A.ipRange?_o(A.ipRange):"",A.protocol?A.protocol:"",A.version,t,r,A.encryptionScope,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType].join(`
`),n=e.computeHMACSHA256(s);return new qa(A.version,n,i,void 0,void 0,A.protocol,A.startsOn,A.expiresOn,A.ipRange,A.identifier,t,A.cacheControl,A.contentDisposition,A.contentEncoding,A.contentLanguage,A.contentType,e.userDelegationKey,A.preauthorizedAgentObjectId,A.correlationId,A.encryptionScope)}function ah(A,e,t){let r=[`/blob/${A}/${e}`];return t&&r.push(`/${t}`),r.join("")}function oh(A){let e=A.version?A.version:J5;if(A.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(A.blobName===void 0&&A.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(A.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(A.blobName===void 0&&A.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(A.permissions&&A.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(A.permissions&&A.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(A.permissions&&A.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(A.permissions&&A.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&A.permissions&&(A.permissions.move||A.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&A.permissions&&A.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(A.preauthorizedAgentObjectId||A.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(A.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return A.version=e,A}var JQ=class{constructor(e,t){let r=new GQ(e.url,e.pipeline.toServiceClientOptions());this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=new Vd(r)):(this._isContainer=!1,this._containerOrBlobOperation=new OQ(r)),t||(t=O.generateUuid()),this._leaseId=t}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,t={}){var r,i,s,n,a,o;let{span:c,updatedOptions:l}=_("BlobLeaseClient-acquireLease",t);if(this._isContainer&&(!((r=t.conditions)===null||r===void 0)&&r.ifMatch&&((i=t.conditions)===null||i===void 0?void 0:i.ifMatch)!==Ya||!((s=t.conditions)===null||s===void 0)&&s.ifNoneMatch&&((n=t.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==Ya||!((a=t.conditions)===null||a===void 0)&&a.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:(o=t.conditions)===null||o===void 0?void 0:o.tagConditions}),proposedLeaseId:this._leaseId},re(l)))}catch(d){throw c.setStatus({code:Y.SpanStatusCode.ERROR,message:d.message}),d}finally{c.end()}}async changeLease(e,t={}){var r,i,s,n,a,o;let{span:c,updatedOptions:l}=_("BlobLeaseClient-changeLease",t);if(this._isContainer&&(!((r=t.conditions)===null||r===void 0)&&r.ifMatch&&((i=t.conditions)===null||i===void 0?void 0:i.ifMatch)!==Ya||!((s=t.conditions)===null||s===void 0)&&s.ifNoneMatch&&((n=t.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==Ya||!((a=t.conditions)===null||a===void 0)&&a.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{let d=await this._containerOrBlobOperati
`));let r=yield sv(t,"create");yield nv(r,A)})}ri.createTar=wPe});var ine=E(jt=>{"use strict";var bPe=jt&&jt.__createBinding||(Object.create?function(A,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(A,r,i)}:function(A,e,t,r){r===void 0&&(r=t),A[r]=e[t]}),NPe=jt&&jt.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:!0,value:e})}:function(A,e){A.default=e}),z2=jt&&jt.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)t!=="default"&&Object.prototype.hasOwnProperty.call(A,t)&&bPe(e,A,t);return NPe(e,A),e},ene=jt&&jt.__awaiter||function(A,e,t,r){function i(s){return s instanceof t?s:new t(function(n){n(s)})}return new(t||(t=Promise))(function(s,n){function a(l){try{c(r.next(l))}catch(d){n(d)}}function o(l){try{c(r.throw(l))}catch(d){n(d)}}function c(l){l.done?s(l.value):i(l.value).then(a,o)}c((r=r.apply(A,e||[])).next())})};Object.defineProperty(jt,"__esModule",{value:!0});jt.saveCache=jt.restoreCache=jt.isFeatureAvailable=jt.ReserveCacheError=jt.ValidationError=void 0;var ar=z2(ur()),Ane=z2(require("path")),Bn=z2(uC()),V2=z2(Xse()),W2=$se(),zo=class A extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,A.prototype)}};jt.ValidationError=zo;var sm=class A extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,A.prototype)}};jt.ReserveCacheError=sm;function tne(A){if(!A||A.length===0)throw new zo("Path Validation Error: At least one directory or file path is required")}function rne(A){if(A.length>512)throw new zo(`KeyValidationError:${A}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(A))throw new zo(`KeyValidationError:${A}cannotcontaincommas.`)}function DPe(){return!!process.env.ACTIONS_CACHE_URL}jt.isFeatureAvailable=DPe;function RPe(A,e,t,r,i=!1){return ene(this,void 0,void 0,function*(){tne(A),t=t||[];let s=[e,...t];if(ar.debug("Resolved Keys:"),ar.debug(JSON.stringify(s)),s.length>10)throw new zo("Key Validation Error: Keys are limited to a maximum of 10.");for(let o of s)rne(o);let n=yield Bn.getCompressionMethod(),a="";try{let o=yield V2.getCacheEntry(s,A,{compressionMethod:n,enableCrossOsArchive:i});if(!o?.archiveLocation)return;if(r?.lookupOnly)return ar.info("Lookup only - skipping download"),o.cacheKey;a=Ane.join(yield Bn.createTempDirectory(),Bn.getCacheFileName(n)),ar.debug(`ArchivePath:${a}`),yield V2.downloadCache(o.archiveLocation,a,r),ar.isDebug()&&(yield(0,W2.listTar)(a,n));let c=Bn.getArchiveFileSizeInBytes(a);return ar.info(`CacheSize:~${Math.round(c/(1024*1024))}MB(${c}B)`),yield(0,W2.extractTar)(a,n),ar.info("Cache restored successfully"),o.cacheKey}catch(o){if(o.name===zo.name)throw o;ar.warning(`Failedtorestore:${o.message}`)}finally{try{yield Bn.unlinkFile(a)}catch(o){ar.debug(`Failedtodeletearchive:${o}`)}}})}jt.restoreCache=RPe;function xPe(A,e,t,r=!1){var i,s,n,a,o;return ene(this,void 0,void 0,function*(){tne(A),rne(e);let c=yield Bn.getCompressionMethod(),l=-1,d=yield Bn.resolvePaths(A);if(ar.debug("Cache Paths:"),ar.debug(`${JSON.stringify(d)}`),d.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let p=yield Bn.createTempDirectory(),u=Ane.join(p,Bn.getCacheFileName(c));ar.debug(`ArchivePath:${u}`);try{yield(0,W2.createTar)(p,d,c),ar.isDebug()&&(yield(0,W2.listTar)(u,c));let g=10*1024*1024*1024,h=Bn.getArchiveFileSizeInBytes(u);if(ar.debug(`FileSize:${h}`),h>g&&!Bn.isGhes())throw new Error(`Cachesizeof~${Math.round(h/(1024*1024))}MB(${h}B)isoverthe10GBlimit,notsavingcache.`);ar.debug("Reserving Cache");let Q=yield V2.reserveCache(e,A,{compressionMethod:c,enableCrossOsArchive:r,cacheSize:h});if(!((i=Q?.result)===null||i===void 0)&&i.cacheId)l=(s=Q?.result)===null||s===void 0?void 0:s.cacheId;else throw Q?.statusCode===400?new Error((a=(n=Q?.er
`),SHe=function(){};function Zn(A){if(!(this instanceof Zn))return new Zn(A);if(kv.call(this,A),!A||!A.headerFirst&&typeof A.boundary!="string")throw new TypeError("Boundary required");typeof A.boundary=="string"?this.setBoundary(A.boundary):this._bparser=void 0,this._headerFirst=A.headerFirst,this._dashes=0,this._parts=0,this._finished=!1,this._realFinish=!1,this._isPreamble=!0,this._justMatched=!1,this._firstWrite=!0,this._inHeader=!0,this._part=void 0,this._cb=void 0,this._ignoreData=!1,this._partOpts={highWaterMark:A.partHwm},this._pause=!1;let e=this;this._hparser=new NHe(A),this._hparser.on("header",function(t){e._inHeader=!1,e._part.emit("header",t)})}wHe(Zn,kv);Zn.prototype.emit=function(A){if(A==="finish"&&!this._realFinish){if(!this._finished){let e=this;process.nextTick(function(){if(e.emit("error",new Error("Unexpected end of multipart data")),e._part&&!e._ignoreData){let t=e._isPreamble?"Preamble":"Part";e._part.emit("error",new Error(t+" terminated early due to unexpected end of multipart data")),e._part.push(null),process.nextTick(function(){e._realFinish=!0,e.emit("finish"),e._realFinish=!1});return}e._realFinish=!0,e.emit("finish"),e._realFinish=!1})}}else kv.prototype.emit.apply(this,arguments)};Zn.prototype._write=function(A,e,t){if(!this._hparser&&!this._bparser)return t();if(this._headerFirst&&this._isPreamble){this._part||(this._part=new Une(this._partOpts),this._events.preamble?this.emit("preamble",this._part):this._ignore());let r=this._hparser.push(A);if(!this._inHeader&&r!==void 0&&r<A.length)A=A.slice(r);else return t()}this._firstWrite&&(this._bparser.push(xHe),this._firstWrite=!1),this._bparser.push(A),this._pause?this._cb=t:t()};Zn.prototype.reset=function(){this._part=void 0,this._bparser=void 0,this._hparser=void 0};Zn.prototype.setBoundary=function(A){let e=this;this._bparser=new bHe(`\r
`),A.replace(/\r?\n/g,e)}function f_e(A){return Qae&&A instanceof Qae||A instanceof dm||A&&(typeof A.stream=="function"||typeof A.arrayBuffer=="function")&&A[Symbol.toStringTag]==="File"}fae.exports={File:dm,FileLike:Vv,isFileLike:f_e}});var pw=E((toA,Dae)=>{"use strict";var{isBlobLike:dw,toUSVString:y_e,makeIterator:Wv}=In(),{kState:si}=Xo(),{File:Nae,FileLike:yae,isFileLike:w_e}=lw(),{webidl:xA}=fi(),{Blob:b_e,File:zv}=require("buffer"),wae=zv??Nae,Bh=class A{constructor(e){if(e!==void 0)throw xA.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]});this[si]=[]}append(e,t,r=void 0){if(xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,2,{header:"FormData.append"}),arguments.length===3&&!dw(t))throw new TypeError("Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'");e=xA.converters.USVString(e),t=dw(t)?xA.converters.Blob(t,{strict:!1}):xA.converters.USVString(t),r=arguments.length===3?xA.converters.USVString(r):void 0;let i=bae(e,t,r);this[si].push(i)}delete(e){xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,1,{header:"FormData.delete"}),e=xA.converters.USVString(e),this[si]=this[si].filter(t=>t.name!==e)}get(e){xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,1,{header:"FormData.get"}),e=xA.converters.USVString(e);let t=this[si].findIndex(r=>r.name===e);return t===-1?null:this[si][t].value}getAll(e){return xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,1,{header:"FormData.getAll"}),e=xA.converters.USVString(e),this[si].filter(t=>t.name===e).map(t=>t.value)}has(e){return xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,1,{header:"FormData.has"}),e=xA.converters.USVString(e),this[si].findIndex(t=>t.name===e)!==-1}set(e,t,r=void 0){if(xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,2,{header:"FormData.set"}),arguments.length===3&&!dw(t))throw new TypeError("Failed to execute 'set' on 'FormData': parameter 2 is not of type 'Blob'");e=xA.converters.USVString(e),t=dw(t)?xA.converters.Blob(t,{strict:!1}):xA.converters.USVString(t),r=arguments.length===3?y_e(r):void 0;let i=bae(e,t,r),s=this[si].findIndex(n=>n.name===e);s!==-1?this[si]=[...this[si].slice(0,s),i,...this[si].slice(s+1).filter(n=>n.name!==e)]:this[si].push(i)}entries(){return xA.brandCheck(this,A),Wv(()=>this[si].map(e=>[e.name,e.value]),"FormData","key+value")}keys(){return xA.brandCheck(this,A),Wv(()=>this[si].map(e=>[e.name,e.value]),"FormData","key")}values(){return xA.brandCheck(this,A),Wv(()=>this[si].map(e=>[e.name,e.value]),"FormData","value")}forEach(e,t=globalThis){if(xA.brandCheck(this,A),xA.argumentLengthCheck(arguments,1,{header:"FormData.forEach"}),typeof e!="function")throw new TypeError("Failed to execute 'forEach' on 'FormData': parameter 1 is not of type 'Function'.");for(let[r,i]of this)e.apply(t,[i,r,this])}};Bh.prototype[Symbol.iterator]=Bh.prototype.entries;Object.defineProperties(Bh.prototype,{[Symbol.toStringTag]:{value:"FormData",configurable:!0}});function bae(A,e,t){if(A=Buffer.from(A).toString("utf8"),typeof e=="string")e=Buffer.from(e).toString("utf8");else if(w_e(e)||(e=e instanceof b_e?new wae([e],"blob",{type:e.type}):new yae(e,"blob",{type:e.type})),t!==void 0){let r={type:e.type,lastModified:e.lastModified};e=zv&&e instanceof zv||e instanceof Nae?new wae([e],t,r):new yae(e,t,r)}return{name:A,value:e}}Dae.exports={FormData:Bh}});var pm=E((roA,Mae)=>{"use strict";var N_e=eae(),Ih=aA(),{ReadableStreamFrom:D_e,isBlobLike:Rae,isReadableStreamLike:R_e,readableStreamClose:x_e,createDeferredPromise:S_e,fullyReadBody:v_e}=In(),{FormData:xae}=pw(),{kState:Ko}=Xo(),{webidl:jv}=fi(),{DOMException:kae,structuredClone:k_e}=yl(),{Blob:F_e,File:L_e}=require("buffer"),{kBodyUsed:U_e}=lt(),Xv=require("assert"),{isErrored:M_e}=aA(),{isUint8Array:Fae,isArrayBuffer:T_e}=require("util/types"),{File:O_e}=lw(),{parseMIMEType:Y_e,serializeAMimeType:q_e}=Kn(),Zo=globalThis.ReadableStream,Sae=L_e??O_e;function Lae(A,e=!1){Zo||(Zo=require("stream/web").ReadableStream);let t=null;A instanceof Zo?t=A:Rae(A)?t=A.stream():t=new Zo({async pull(o){o.enqueu
`);u.push(I,w,g),typeof w.size=="number"?s+=I.byteLength+w.size+g.byteLength:h=!0}let Q=p.encode(`--${o}--`);u.push(Q),s+=Q.byteLength,h&&(s=null),i=A,r=async function*(){for(let B of u)B.stream?yield*B.stream():yield B},n="multipart/form-data; boundary="+o}else if(Rae(A))i=A,s=A.size,A.type&&(n=A.type);else if(typeof A[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Ih.isDisturbed(A)||A.locked)throw new TypeError("Response body object should not be disturbed or locked");t=A instanceof Zo?A:D_e(A)}if((typeof i=="string"||Ih.isBuffer(i))&&(s=Buffer.byteLength(i)),r!=null){let o;t=new Zo({async start(){o=r(A)[Symbol.asyncIterator]()},async pull(c){let{value:l,done:d}=await o.next();return d?queueMicrotask(()=>{c.close()}):M_e(t)||c.enqueue(new Uint8Array(l)),c.desiredSize>0},async cancel(c){await o.return()},type:void 0})}return[{stream:t,source:i,length:s},n]}function P_e(A,e=!1){return Zo||(Zo=require("stream/web").ReadableStream),A instanceof Zo&&(Xv(!Ih.isDisturbed(A),"The body has already been consumed."),Xv(!A.locked,"The stream is locked.")),Lae(A,e)}function H_e(A){let[e,t]=A.stream.tee(),r=k_e(t,{transfer:[t]}),[,i]=r.tee();return A.stream=e,{stream:i,length:A.length,source:A.source}}async function*vae(A){if(A)if(Fae(A))yield A;else{let e=A.stream;if(Ih.isDisturbed(e))throw new TypeError("The body has already been consumed.");if(e.locked)throw new TypeError("The stream is locked.");e[U_e]=!0,yield*e}}function Zv(A){if(A.aborted)throw new kae("The operation was aborted.","AbortError")}function G_e(A){return{blob(){return uw(this,t=>{let r=W_e(this);return r==="failure"?r="":r&&(r=q_e(r)),new F_e([t],{type:r})},A)},arrayBuffer(){return uw(this,t=>new Uint8Array(t).buffer,A)},text(){return uw(this,Uae,A)},json(){return uw(this,V_e,A)},async formData(){jv.brandCheck(this,A),Zv(this[Ko]);let t=this.headers.get("Content-Type");if(/multipart\/form-data/.test(t)){let r={};for(let[a,o]of this.headers)r[a.toLowerCase()]=o;let i=new xae,s;try{s=new N_e({headers:r,preservePath:!0})}catch(a){throw new kae(`${a}`,"AbortError")}s.on("field",(a,o)=>{i.append(a,o)}),s.on("file",(a,o,c,l,d)=>{let p=[];if(l==="base64"||l.toLowerCase()==="base64"){let u="";o.on("data",g=>{u+=g.toString().replace(/[\r\n]/gm,"");let h=u.length-u.length%4;p.push(Buffer.from(u.slice(0,h),"base64")),u=u.slice(h)}),o.on("end",()=>{p.push(Buffer.from(u,"base64")),i.append(a,new Sae(p,c,{type:d}))})}else o.on("data",u=>{p.push(u)}),o.on("end",()=>{i.append(a,new Sae(p,c,{type:d}))})});let n=new Promise((a,o)=>{s.on("finish",a),s.on("error",c=>o(new TypeError(c)))});if(this.body!==null)for await(let a of vae(this[Ko].body))s.write(a);return s.end(),await n,i}else if(/application\/x-www-form-urlencoded/.test(t)){let r;try{let s="",n=new TextDecoder("utf-8",{ignoreBOM:!0});for await(let a of vae(this[Ko].body)){if(!Fae(a))throw new TypeError("Expected Uint8Array chunk");s+=n.decode(a,{stream:!0})}s+=n.decode(),r=new URLSearchParams(s)}catch(s){throw Object.assign(new TypeError,{cause:s})}let i=new xae;for(let[s,n]of r)i.append(s,n);return i}else throw await Promise.resolve(),Zv(this[Ko]),jv.errors.exception({header:`${A.name}.formData`,message:"Could not parse content as FormData."})}}}function __e(A){Object.assign(A.prototype,G_e(A))}async function uw(A,e,t){if(jv.brandCheck(A,t),Zv(A[Ko]),J_e(A[Ko].body))throw new TypeError("Body is unusable");let r=S_e(),i=n=>r.reject(n),s=n=>{try{r.resolve(e(n))}catch(a){i(a)}};return A[Ko].body==null?(s(new Uint8Array),r.promise):(await v_e(A[Ko].body,s,i),r.promise)}function J_e(A){return A!=null&&(A.stream.locked||Ih.isDisturbed(A.stream))}function Uae(A){return A.length===0?"":(A[0]===239&&A[1]===187&&A[2]===191&&(A=A.subarray(3)),new TextDecoder().decode(A))}function V_e(A){return JSON.parse(Uae(A))}function W_e(A){let{headersList:e}=A[Ko],t=e.get("content-type");return t===null?"failure":Y_e(t)}Mae.exports={extractBody:Lae,safelyExtractBody:P_e,cloneBody:H_e,mixinBody:__e}});var qae=E((ioA,Yae)=>{"use strict";var{InvalidArgumentError:zA,NotSupportedError:z_e}=WA(),$o=require("assert"),{kHT
`);Us.validateHandler(h,r,c),this.servername=Us.getServerName(this.host),this[ec]=h,Zt.create.hasSubscribers&&Zt.create.publish({request:this})}onBodySent(e){if(this[ec].onBodySent)try{this[ec].onBodySent(e)}catch(t){this.onError(t)}}onRequestSent(){Zt.bodySent.hasSubscribers&&Zt.bodySent.publish({request:this})}onConnect(e){return $o(!this.aborted),$o(!this.completed),this[ec].onConnect(e)}onHeaders(e,t,r,i){return $o(!this.aborted),$o(!this.completed),Zt.headers.hasSubscribers&&Zt.headers.publish({request:this,response:{statusCode:e,headers:t,statusText:i}}),this[ec].onHeaders(e,t,r,i)}onData(e){return $o(!this.aborted),$o(!this.completed),this[ec].onData(e)}onUpgrade(e,t,r){return $o(!this.aborted),$o(!this.completed),this[ec].onUpgrade(e,t,r)}onComplete(e){return $o(!this.aborted),this.completed=!0,Zt.trailers.hasSubscribers&&Zt.trailers.publish({request:this,trailers:e}),this[ec].onComplete(e)}onError(e){if(Zt.error.hasSubscribers&&Zt.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[ec].onError(e)}addHeader(e,t){return um(this,e,t),this}static[Z_e](e,t,r){return new A(e,t,r)}static[j_e](e,t,r){let i=t.headers;t={...t,headers:null};let s=new A(e,t,r);if(s.headers={},Array.isArray(i)){if(i.length%2!==0)throw new zA("headers array must be even");for(let n=0;n<i.length;n+=2)um(s,i[n],i[n+1],!0)}else if(i&&typeof i=="object"){let n=Object.keys(i);for(let a=0;a<n.length;a++){let o=n[a];um(s,o,i[o],!0)}}else if(i!=null)throw new zA("headers must be an object or an array");return s}static[X_e](e){let t=e.split(`\r
`),r={};for(let i of t){let[s,n]=i.split(": ");n==null||n.length===0||(r[s]?r[s]+=`,${n}`:r[s]=n)}return r}};function Ap(A,e,t){if(e&&typeof e=="object")throw new zA(`invalid${A}header`);if(e=e!=null?`${e}`:"",Oae.exec(e)!==null)throw new zA(`invalid${A}header`);return t?e:`${A}:${e}\r
`}function um(A,e,t,r=!1){if(t&&typeof t=="object"&&!Array.isArray(t))throw new zA(`invalid${e}header`);if(t===void 0)return;if(A.host===null&&e.length===4&&e.toLowerCase()==="host"){if(Oae.exec(t)!==null)throw new zA(`invalid${e}header`);A.host=t}else if(A.contentLength===null&&e.length===14&&e.toLowerCase()==="content-length"){if(A.contentLength=parseInt(t,10),!Number.isFinite(A.contentLength))throw new zA("invalid content-length header")}else if(A.contentType===null&&e.length===12&&e.toLowerCase()==="content-type")A.contentType=t,r?A.headers[e]=Ap(e,t,r):A.headers+=Ap(e,t);else{if(e.length===17&&e.toLowerCase()==="transfer-encoding")throw new zA("invalid transfer-encoding header");if(e.length===10&&e.toLowerCase()==="connection"){let i=typeof t=="string"?t.toLowerCase():null;if(i!=="close"&&i!=="keep-alive")throw new zA("invalid connection header");i==="close"&&(A.reset=!0)}else{if(e.length===10&&e.toLowerCase()==="keep-alive")throw new zA("invalid keep-alive header");if(e.length===7&&e.toLowerCase()==="upgrade")throw new zA("invalid upgrade header");if(e.length===6&&e.toLowerCase()==="expect")throw new z_e("expect header not supported");if(Tae.exec(e)===null)throw new zA("invalid header key");if(Array.isArray(t))for(let i=0;i<t.length;i++)r?A.headers[e]?A.headers[e]+=`,${Ap(e,t[i],r)}`:A.headers[e]=Ap(e,t[i],r):A.headers+=Ap(e,t[i]);else r?A.headers[e]=Ap(e,t,r):A.headers+=Ap(e,t)}}}Yae.exports=$v});var gw=E((soA,Pae)=>{"use strict";var $_e=require("events"),ek=class extends $_e{dispatch(){throw new Error("not implemented")}close(){throw new Error("not implemented")}destroy(){throw new Error("not implemented")}};Pae.exports=ek});var hm=E((noA,Hae)=>{"use strict";var eJe=gw(),{ClientDestroyedError:Ak,ClientClosedError:AJe,InvalidArgumentError:fh}=WA(),{kDestroy:tJe,kClose:rJe,kDispatch:tk,kInterceptors:tp}=lt(),yh=Symbol("destroyed"),gm=Symbol("closed"),Ac=Symbol("onDestroyed"),wh=Symbol("onClosed"),hw=Symbol("Intercepted Dispatch"),rk=class extends eJe{constructor(){super(),this[yh]=!1,this[Ac]=null,this[gm]=!1,this[wh]=[]}get destroyed(){return this[yh]}get closed(){return this[gm]}get interceptors(){return this[tp]}set interceptors(e){if(e){for(let t=e.length-1;t>=0;t--)if(typeof this[tp][t]!="function")throw new fh("interceptor must be an function")}this[tp]=e}close(e){if(e===void 0)return new Promise((r,i)=>{this.close((s,n)=>s?i(s):r(n))});if(typeof e!="function")throw new fh("invalid callback");if(this[yh]){queueMicrotask(()=>e(new Ak,null));return}if(this[gm]){this[wh]?this[wh].push(e):queueMicrotask(()=>e(null,null));return}this[gm]=!0,this[wh].push(e);let t=()=>{let r=this[wh];this[wh]=null;for(let i=0;i<r.length;i++)r[i](null,null)};this[rJe]().then(()=>this.destroy()).then(()=>{queueMicrotask(t)})}destroy(e,t){if(typeof e=="function"&&(t=e,e=null),t===void 0)return new Promise((i,s)=>{this.destroy(e,(n,a)=>n?s(n):i(a))});if(typeof t!="function")throw new fh("invalid callback");if(this[yh]){this[Ac]?this[Ac].push(t):queueMicrotask(()=>t(null,null));return}e||(e=new Ak),this[yh]=!0,this[Ac]=this[Ac]||[],this[Ac].push(t);let r=()=>{let i=this[Ac];this[Ac]=null;for(let s=0;s<i.length;s++)i[s](null,null)};this[tJe](e).then(()=>{queueMicrotask(r)})}[hw](e,t){if(!this[tp]||this[tp].length===0)return this[hw]=this[tk],this[tk](e,t);let r=this[tk].bind(this);for(let i=this[tp].length-1;i>=0;i--)r=this[tp][i](r);return this[hw]=r,r(e,t)}dispatch(e,t){if(!t||typeof t!="object")throw new fh("handler must be an object");try{if(!e||typeof e!="object")throw new fh("opts must be an object.");if(this[yh]||this[Ac])throw new Ak;if(this[gm])throw new AJe;return this[hw](e,t)}catch(r){if(typeof t.onError!="function")throw new fh("invalid onError method");return t.onError(r),!1}}};Hae.exports=rk});var Em=E((coA,Jae)=>{"use strict";var iJe=require("net"),Gae=require("assert"),_ae=aA(),{InvalidArgumentError:sJe,ConnectTimeoutError:nJe}=WA(),ik,sk;global.FinalizationRegistry&&!process.env.NODE_V8_COVERAGE?sk=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new global.Finalizatio
`,a&&(u+=a),ni.sendHeaders.hasSubscribers&&ni.sendHeaders.publish({request:e,headers:u,socket:p}),t?ge.isBuffer(t)?(Ae(d===t.byteLength,"buffer body must have content length"),p.cork(),p.write(`${u}content-length:${d}\r
`,"latin1")),e.onRequestSent()),!0}function oVe(A,e,t){let{body:r,method:i,path:s,host:n,upgrade:a,expectContinue:o,signal:c,headers:l}=t,d;if(typeof l=="string"?d=pk[GJe](l.trim()):d=l,a)return _r(A,t,new Error("Upgrade not supported for H2")),!1;try{t.onConnect(w=>{t.aborted||t.completed||_r(A,t,w||new Bk)})}catch(w){_r(A,t,w)}if(t.aborted)return!1;let p,u=A[yw];if(d[JJe]=n||A[doe],d[VJe]=i,i==="CONNECT")return e.ref(),p=e.request(d,{endStream:!1,signal:c}),p.id&&!p.pending?(t.onUpgrade(null,null,p),++u.openStreams):p.once("ready",()=>{t.onUpgrade(null,null,p),++u.openStreams}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),!0;d[WJe]=s,d[zJe]="https";let g=i==="PUT"||i==="POST"||i==="PATCH";r&&typeof r.read=="function"&&r.read(0);let h=ge.bodyLength(r);if(h==null&&(h=t.contentLength),(h===0||!g)&&(h=null),t.contentLength!=null&&t.contentLength!==h){if(A[fm])return _r(A,t,new tc),!1;process.emitWarning(new tc)}h!=null&&(Ae(r,"no body must not have content length"),d[jJe]=`${h}`),e.ref();let Q=i==="GET"||i==="HEAD";return o?(d[XJe]="100-continue",p=e.request(d,{endStream:Q,signal:c}),p.once("continue",B)):(p=e.request(d,{endStream:Q,signal:c}),B()),++u.openStreams,p.once("response",w=>{t.onHeaders(Number(w[ZJe]),w,p.resume.bind(p),"")===!1&&p.pause()}),p.once("end",()=>{t.onComplete([])}),p.on("data",w=>{t.onData(w)===!1&&p.pause()}),p.once("close",()=>{u.openStreams-=1,u.openStreams===0&&e.unref()}),p.once("error",function(w){A[Ts]&&!A[Ts].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,ge.destroy(p,w))}),p.once("frameError",(w,I)=>{let C=new Va(`HTTP/2:"frameError"received-type${w},code${I}`);_r(A,t,C),A[Ts]&&!A[Ts].destroyed&&!this.closed&&!this.destroyed&&(u.streams-=1,ge.destroy(p,C))}),!0;function B(){r?ge.isBuffer(r)?(Ae(h===r.byteLength,"buffer body must have content length"),p.cork(),p.write(r),p.uncork(),p.end(),t.onBodySent(r),t.onRequestSent()):ge.isBlobLike(r)?typeof r.stream=="function"?bw({client:A,request:t,contentLength:h,h2stream:p,expectsPayload:g,body:r.stream(),socket:A[Ft],header:""}):Coe({body:r,client:A,request:t,contentLength:h,expectsPayload:g,h2stream:p,header:"",socket:A[Ft]}):ge.isStream(r)?Eoe({body:r,client:A,request:t,contentLength:h,expectsPayload:g,socket:A[Ft],h2stream:p,header:""}):ge.isIterable(r)?bw({body:r,client:A,request:t,contentLength:h,expectsPayload:g,header:"",h2stream:p,socket:A[Ft]}):Ae(!1):t.onRequestSent()}}function Eoe({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){if(Ae(s!==0||t[Et]===0,"stream body cannot be pipelined"),t[za]==="h2"){let h=function(Q){r.onBodySent(Q)},g=bJe(e,A,Q=>{Q?(ge.destroy(e,Q),ge.destroy(A,Q)):r.onRequestSent()});g.on("data",h),g.once("end",()=>{g.removeListener("data",h),ge.destroy(g)});return}let o=!1,c=new Nw({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n}),l=function(g){if(!o)try{!c.write(g)&&this.pause&&this.pause()}catch(h){ge.destroy(this,h)}},d=function(){o||e.resume&&e.resume()},p=function(){u(new Bk)},u=function(g){if(!o){if(o=!0,Ae(i.destroyed||i[rc]&&t[Et]<=1),i.off("drain",d).off("error",u),e.removeListener("data",l).removeListener("end",u).removeListener("error",u).removeListener("close",p),!g)try{c.end()}catch(h){g=h}c.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?ge.destroy(e,g):ge.destroy(e)}};e.on("data",l).on("end",u).on("error",u).on("close",p),e.resume&&e.resume(),i.on("drain",d).on("error",u)}async function Coe({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){Ae(s===e.size,"blob body must have content length");let o=t[za]==="h2";try{if(s!=null&&s!==e.size)throw new tc;let c=Buffer.from(await e.arrayBuffer());o?(A.cork(),A.write(c),A.uncork()):(i.cork(),i.write(`${n}content-length:${s}\r
`,"latin1"),i.write(c),i.uncork()),r.onBodySent(c),r.onRequestSent(),a||(i[yi]=!0),Os(t)}catch(c){ge.destroy(o?A:i,c)}}async function bw({h2stream:A,body:e,client:t,request:r,socket:i,contentLength:s,header:n,expectsPayload:a}){Ae(s!==0||t[Et]===0,"iterator body cannot be pipelined");let o=null;function c(){if(o){let p=o;o=null,p()}}let l=()=>new Promise((p,u)=>{Ae(o===null),i[Gr]?u(i[Gr]):o=p});if(t[za]==="h2"){A.on("close",c).on("drain",c);try{for await(let p of e){if(i[Gr])throw i[Gr];let u=A.write(p);r.onBodySent(p),u||await l()}}catch(p){A.destroy(p)}finally{r.onRequestSent(),A.end(),A.off("close",c).off("drain",c)}return}i.on("close",c).on("drain",c);let d=new Nw({socket:i,request:r,contentLength:s,client:t,expectsPayload:a,header:n});try{for await(let p of e){if(i[Gr])throw i[Gr];d.write(p)||await l()}d.end()}catch(p){d.destroy(p)}finally{i.off("close",c).off("drain",c)}}var Nw=class{constructor({socket:e,request:t,contentLength:r,client:i,expectsPayload:s,header:n}){this.socket=e,this.request=t,this.contentLength=r,this.client=i,this.bytesWritten=0,this.expectsPayload=s,this.header=n,e[rc]=!0}write(e){let{socket:t,request:r,contentLength:i,client:s,bytesWritten:n,expectsPayload:a,header:o}=this;if(t[Gr])throw t[Gr];if(t.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(i!==null&&n+c>i){if(s[fm])throw new tc;process.emitWarning(new tc)}t.cork(),n===0&&(a||(t[yi]=!0),i===null?t.write(`${o}transfer-encoding:chunked\r