varCIe=Object.create;varbz=Object.defineProperty;varyIe=Object.getOwnPropertyDescriptor;varBIe=Object.getOwnPropertyNames;varqIe=Object.getPrototypeOf,DIe=Object.prototype.hasOwnProperty;vars=(t,e)=>bz(t,"name",{value:e,configurable:!0});varm=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),IIe=(t,e)=>{for(varrine)bz(t,r,{get:e[r],enumerable:!0})},RIe=(t,e,r,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letoofBIe(e))!DIe.call(t,o)&&o!==r&&bz(t,o,{get:()=>e[o],enumerable:!(n=yIe(e,o))||n.enumerable});returnt};varw=(t,e,r)=>(r=t!=null?CIe(qIe(t)):{},RIe(e||!t||!t.__esModule?bz(r,"default",{value:t,enumerable:!0}):r,t));varZ9=m(lA=>{"use strict";varlB0=require("net"),xIe=require("tls"),rI=require("http"),$9=require("https"),TIe=require("events"),dB0=require("assert"),vIe=require("util");lA.httpOverHttp=LIe;lA.httpsOverHttp=_Ie;lA.httpOverHttps=QIe;lA.httpsOverHttps=PIe;functionLIe(t){vare=newgs(t);returne.request=rI.request,e}s(LIe,"httpOverHttp");function_Ie(t){vare=newgs(t);returne.request=rI.request,e.createSocket=j9,e.defaultPort=443,e}s(_Ie,"httpsOverHttp");functionQIe(t){vare=newgs(t);returne.request=$9.request,e}s(QIe,"httpOverHttps");functionPIe(t){vare=newgs(t);returne.request=$9.request,e.createSocket=j9,e.defaultPort=443,e}s(PIe,"httpsOverHttps");functiongs(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||rI.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",s(function(n,o,i,a){for(varc=K9(o,i,a),u=0,p=e.requests.length;u<p;++u){varA=e.requests[u];if(A.host===c.host&&A.port===c.port){e.requests.splice(u,1),A.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)},"onFree"))}s(gs,"TunnelingAgent");vIe.inherits(gs,TIe.EventEmitter);gs.prototype.addRequest=s(function(e,r,n,o){vari=this,a=nI({request:e},i.options,K9(r,n,o));if(i.sockets.length>=this.maxSockets){i.requests.push(a);return}i.createSocket(a,function(c){c.on("free",u),c.on("close",p),c.on("agentRemove",p),e.onSocket(c);functionu(){i.emit("free",c,a)}s(u,"onFree");functionp(A){i.removeSocket(c),c.removeListener("free",u),c.removeListener("close",p),c.removeListener("agentRemove",p)}s(p,"onCloseOrRemove")})},"addRequest");gs.prototype.createSocket=s(function(e,r){varn=this,o={};n.sockets.push(o);vari=nI({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+newBuffer(i.proxyAuth).toString("base64")),wa("making CONNECT request");vara=n.request(i);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",u),a.once("connect",p),a.once("error",A),a.end();functionc(l){l.upgrade=!0}s(c,"onResponse");functionu(l,b,M){process.nextTick(function(){p(l,b,M)})}s(u,"onUpgrade");functionp(l,b,M){if(a.removeAllListeners(),b.removeAllListeners(),l.statusCode!==200){wa("tunneling socket could not be established, statusCode=%d",l.statusCode),b.destroy();varz=newError("tunneling socket could not be established, statusCode="+l.statusCode);z.code="ECONNRESET",e.request.emit("error",z),n.removeSocket(o);return}if(M.length>0){wa("got illegal response body from proxy"),b.destroy();varz=newError("got illegal response body from proxy");z.code="ECONNRESET",e.request.emit("error",z),n.removeSocket(o);return}returnwa("tunneling connection has established"),n.sockets[n.sockets.indexOf(o)]=b,r(b)}s(p,"onConnect");functionA(l){a.removeAllListeners(),wa(`tunneling socket could not be established, cause=%s
`);b.push(O),i+=O.byteLength,z&&(i=null),o=t,n=s(async function*(){for(let y of b)y.stream?yield*y.stream():yield y},"action"),a=`multipart/form-data; boundary=${u}`}else if(sH(t))o=t,i=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(ub.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:iwe(t)}if((typeof o=="string"||ub.isBuffer(o))&&(i=Buffer.byteLength(o)),n!=null){let u;r=new ReadableStream({async start(){u=n(t)[Symbol.asyncIterator]()},async pull(p){let{value:A,done:l}=await u.next();if(l)queueMicrotask(()=>{p.close(),p.byobRequest?.respond(0)});else if(!pH(r)){let b=new Uint8Array(A);b.byteLength&&p.enqueue(b)}return p.desiredSize>0},async cancel(p){await u.return()},type:"bytes"})}return[{stream:r,source:o,length:i},a]}s(dH,"extractBody");function hwe(t,e=!1){return t instanceof ReadableStream&&(a5(!ub.isDisturbed(t),"The body has already been consumed."),a5(!t.locked,"The stream is locked.")),dH(t,e)}s(hwe,"safelyExtractBody");function zwe(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}s(zwe,"cloneBody");function gwe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}s(gwe,"throwIfAborted");function Owe(t){return{blob(){return BA(this,r=>{let n=cH(this);return n===null?n="":n&&(n=fwe(n)),new lwe([r],{type:n})},t)},arrayBuffer(){return BA(this,r=>new Uint8Array(r).buffer,t)},text(){return BA(this,uH,t)},json(){return BA(this,Cwe,t)},formData(){return BA(this,r=>{let n=cH(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let o=Mwe(r,n);if(o==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new aH;return i[qA]=o,i}case"application/x-www-form-urlencoded":{let o=new URLSearchParams(r.toString()),i=new aH;for(let[a,c]of o)i.append(a,c);return i}}throw new TypeError('Content-Typewasnotoneof"multipart/form-data"or"application/x-www-form-urlencoded".')},t)},bytes(){returnBA(this,r=>newUint8Array(r),t)}}}s(Owe,"bodyMixinMethods");functionEwe(t){Object.assign(t.prototype,Owe(t))}s(Ewe,"mixinBody");asyncfunctionBA(t,e,r){if(Awe.brandCheck(t,r),bH(t))thrownewTypeError("Body is unusable: Body has already been read");gwe(t[qA]);letn=cwe(),o=s(a=>n.reject(a),"errorSteps"),i=s(a=>{try{n.resolve(e(a))}catch(c){o(c)}},"successSteps");returnt[qA].body==null?(i(Buffer.allocUnsafe(0)),n.promise):(awaituwe(t[qA].body,i,o),n.promise)}s(BA,"consumeBody");functionbH(t){lete=t[qA].body;returne!=null&&(e.stream.locked||ub.isDisturbed(e.stream))}s(bH,"bodyUnusable");functionCwe(t){returnJSON.parse(uH(t))}s(Cwe,"parseJSONFromBytes");functioncH(t){lete=t[qA].headersList,r=pwe(e);returnr==="failure"?null:r}s(cH,"bodyMimeType");fH.exports={extractBody:dH,safelyExtractBody:hwe,cloneBody:zwe,mixinBody:Ewe,streamRegistry:lH,hasFinalizationRegistry:AH,bodyUnusable:bH}});varwH=m((sq0,NH)=>{"use strict";varfe=require("node:assert"),he=Xe(),{channels:MH}=bA(),u5=GI(),{RequestContentLengthMismatchError:nu,ResponseContentLengthMismatchError:mH,RequestAbortedError:BH,InvalidArgumentError:ywe,HeadersTimeoutError:Bwe,HeadersOverflowError:qwe,SocketError:IA,InformationalError:RA,BodyTimeoutError:Dwe,HTTPParserError:Iwe,ResponseExceededMaxSizeError:Rwe}=p0(),{kUrl:qH,kReset:rr,kClient:Vz,kParser:T0,kBlocking:lb,kRunning:w1,kPending:DH,kSize:hH,kWriting:Fa,kQueue:io,kNoRef:pb,kKeepAliveDefaultTimeout:Nwe,kHostHeader:wwe,kPendingIdx:Swe,kRunningIdx:dn,kError:Ft,kPipelining:Jz,kSocket:iu,kKeepAliveTimeoutValue:$z,kMaxHeadersSize:p5,kKeepAliveMaxTimeout:Fwe,kKeepAliveTimeoutThreshold:Wwe,kHeadersTimeout:xwe,kBodyTimeout:Twe,kStrictContentLength:d5,kMaxRequests:zH,kCounter:vwe,kMaxResponseSize:Lwe,kOnError:gH,kResume:qs,kHTTPContext:IH}=G0(),wr=lG(),OH=Buffer.alloc(0),Gz=Buffer[Symbol.species],Hz=he.addListener,_we=he.removeAllListeners,su=Symbol("kIdleSocketValidation"),ou=Symbol("kIdleSocketValidationTimeout"),m5=Symbol("kSocketUsed"),A5;asyncfunctionQwe(){lett=process.e
`}return MH.sendHeaders.hasSubscribers&&MH.sendHeaders.publish({request:e,headers:O,socket:M}),!u||b===0?CH(z,null,t,e,M,A,O,l):he.isBuffer(u)?CH(z,u,t,e,M,A,O,l):he.isBlobLike(u)?typeof u.stream=="function"?yH(z,u.stream(),t,e,M,A,O,l):Jwe(z,u,t,e,M,A,O,l):he.isStream(u)?Vwe(z,u,t,e,M,A,O,l):he.isIterable(u)?yH(z,u,t,e,M,A,O,l):fe(!1),!0}s(Xwe,"writeH1");function Vwe(t,e,r,n,o,i,a,c){fe(i!==0||r[w1]===0,"stream body cannot be pipelined");let u=!1,p=new jz({abort:t,socket:o,request:n,contentLength:i,client:r,expectsPayload:c,header:a}),A=s(function(z){if(!u)try{!p.write(z)&&this.pause&&this.pause()}catch(O){he.destroy(this,O)}},"onData"),l=s(function(){u||e.resume&&e.resume()},"onDrain"),b=s(function(){if(queueMicrotask(()=>{e.removeListener("error",M)}),!u){let z=new BH;queueMicrotask(()=>M(z))}},"onClose"),M=s(function(z){if(!u){if(u=!0,fe(o.destroyed||o[Fa]&&r[w1]<=1),o.off("drain",l).off("error",M),e.removeListener("data",A).removeListener("end",M).removeListener("close",b),!z)try{p.end()}catch(O){z=O}p.destroy(z),z&&(z.code!=="UND_ERR_INFO"||z.message!=="reset")?he.destroy(e,z):he.destroy(e)}},"onFinished");e.on("data",A).on("end",M).on("error",M).on("close",b),e.resume&&e.resume(),o.on("drain",l).on("error",M),e.errorEmitted??e.errored?setImmediate(()=>M(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>M(null)),(e.closeEmitted??e.closed)&&setImmediate(b)}s(Vwe,"writeStream");function CH(t,e,r,n,o,i,a,c){try{e?he.isBuffer(e)&&(fe(i===e.byteLength,"buffer body must have content length"),o.cork(),o.write(`${a}content-length:${i}\r
`,"latin1")),n.onRequestSent(),r[qs]()}catch(u){t(u)}}s(CH,"writeBuffer");async function Jwe(t,e,r,n,o,i,a,c){fe(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new nu;let u=Buffer.from(await e.arrayBuffer());o.cork(),o.write(`${a}content-length:${i}\r
`,"latin1"),o.write(u),o.uncork(),n.onBodySent(u),n.onRequestSent(),!c&&n.reset!==!1&&(o[rr]=!0),r[qs]()}catch(u){t(u)}}s(Jwe,"writeBlob");async function yH(t,e,r,n,o,i,a,c){fe(i!==0||r[w1]===0,"iterator body cannot be pipelined");let u=null;function p(){if(u){let b=u;u=null,b()}}s(p,"onDrain");let A=s(()=>new Promise((b,M)=>{fe(u===null),o[Ft]?M(o[Ft]):u=b}),"waitForDrain");o.on("close",p).on("drain",p);let l=new jz({abort:t,socket:o,request:n,contentLength:i,client:r,expectsPayload:c,header:a});try{for await(let b of e){if(o[Ft])throw o[Ft];l.write(b)||await A()}l.end()}catch(b){l.destroy(b)}finally{o.off("close",p).off("drain",p)}}s(yH,"writeIterable");var jz=class{static{s(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:o,client:i,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=o,this.client=i,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[Fa]=!0}write(e){let{socket:r,request:n,contentLength:o,client:i,bytesWritten:a,expectsPayload:c,header:u}=this;if(r[Ft])throw r[Ft];if(r.destroyed)return!1;let p=Buffer.byteLength(e);if(!p)return!0;if(o!==null&&a+p>o){if(i[d5])throw new nu;process.emitWarning(new nu)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[rr]=!0),o===null?r.write(`${u}transfer-encoding:chunked\r
`,"latin1"),r!==null&&o!==r){if(n[d5])throw new nu;process.emitWarning(new nu)}e[T0].timeout&&e[T0].timeoutType===NA&&e[T0].timeout.refresh&&e[T0].timeout.refresh(),n[qs]()}}destroy(e){let{socket:r,client:n,abort:o}=this;r[Fa]=!1,e&&(fe(n[w1]<=1,"pipeline should only contain this request"),o(e))}};NH.exports=kwe});var _H=m((cq0,LH)=>{"use strict";var bn=require("node:assert"),{pipeline:Ywe}=require("node:stream"),Ze=Xe(),{RequestContentLengthMismatchError:h5,RequestAbortedError:SH,SocketError:db,InformationalError:z5}=p0(),{kUrl:Kz,kReset:eg,kClient:wA,kRunning:tg,kPending:$we,kQueue:Wa,kPendingIdx:g5,kRunningIdx:so,kError:co,kSocket:$1,kStrictContentLength:jwe,kOnError:O5,kMaxConcurrentStreams:vH,kHTTP2Session:ao,kResume:xa,kSize:Kwe,kHTTPContext:Zwe}=G0(),Ds=Symbol("open streams"),FH,WH=!1,Zz;try{Zz=require("node:http2")}catch{Zz={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:e6e,HTTP2_HEADER_METHOD:t6e,HTTP2_HEADER_PATH:r6e,HTTP2_HEADER_SCHEME:n6e,HTTP2_HEADER_CONTENT_LENGTH:o6e,HTTP2_HEADER_EXPECT:i6e,HTTP2_HEADER_STATUS:s6e}}=Zz;function a6e(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let o of n)e.push(Buffer.from(r),Buffer.from(o));else e.push(Buffer.from(r),Buffer.from(n));return e}s(a6e,"parseH2Headers");async function c6e(t,e){t[$1]=e,WH||(WH=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=Zz.connect(t[Kz],{createConnection:s(()=>e,"createConnection"),peerMaxConcurrentStreams:t[vH]});r[Ds]=0,r[wA]=t,r[$1]=e,Ze.addListener(r,"error",p6e),Ze.addListener(r,"frameError",A6e),Ze.addListener(r,"end",l6e),Ze.addListener(r,"goaway",d6e),Ze.addListener(r,"close",function(){let{[wA]:o}=this,{[$1]:i}=o,a=this[$1][co]||this[co]||new db("closed",Ze.getSocketInfo(i));if(o[ao]=null,o.destroyed){bn(o[$we]===0);let c=o[Wa].splice(o[so]);for(let u=0;u<c.length;u++){let p=c[u];Ze.errorRequest(o,p,a)}}}),r.unref(),t[ao]=r,e[ao]=r,Ze.addListener(e,"error",function(o){bn(o.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[co]=o,this[wA][O5](o)}),Ze.addListener(e,"end",function(){Ze.destroy(this,new db("other side closed",Ze.getSocketInfo(this)))}),Ze.addListener(e,"close",function(){let o=this[co]||new db("closed",Ze.getSocketInfo(this));t[$1]=null,this[ao]!=null&&this[ao].destroy(o),t[g5]=t[so],bn(t[tg]===0),t.emit("disconnect",t[Kz],[t],o),t[xa]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...o){return f6e(t,...o)},resume(){u6e(t)},destroy(o,i){n?queueMicrotask(i):e.destroy(o).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}s(c6e,"connectH2");function u6e(t){let e=t[$1];e?.destroyed===!1&&(t[Kwe]===0&&t[vH]===0?(e.unref(),t[ao].unref()):(e.ref(),t[ao].ref()))}s(u6e,"resumeH2");function p6e(t){bn(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[$1][co]=t,this[wA][O5](t)}s(p6e,"onHttp2SessionError");function A6e(t,e,r){if(r===0){let n=new z5(`HTTP/2:"frameError"received-type${t},code${e}`);this[$1][co]=n,this[wA][O5](n)}}s(A6e,"onHttp2FrameError");function l6e(){let t=new db("other side closed",Ze.getSocketInfo(this[$1]));this.destroy(t),Ze.destroy(this[$1],t)}s(l6e,"onHttp2SessionEnd");function d6e(t){let e=this[co]||new db(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,Ze.getSocketInfo(this)),r=this[wA];if(r[$1]=null,r[Zwe]=null,this[ao]!=null&&(this[ao].destroy(e),this[ao]=null),Ze.destroy(this[$1],e),r[so]<r[Wa].length){let n=r[Wa][r[so]];r[Wa][r[so]++]=null,Ze.errorRequest(r,n,e),r[g5]=r[so]}bn(r[tg]===0),r.emit("disconnect",r[Kz],[r],e),r[xa]()}s(d6e,"onHTTP2GoAway");function b6e(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}s(b6e,"shouldSendContentLength");function f6e(t,e){let r=t[ao],{method:n,path:o,host:i,upgrade:a,expectContinue:c,signal:u,headers:p}=e,{body:A}=e;if(a)return Ze.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let D=0;D<p.length;D+=2){let x=p[D+0],W=p[D+1];if(Array.isArray(W))for(let _=0;_<W.length;_++)l[x]?l[x]+=`,${W[_]}`:l[x]=W[_];else l[x]=W}let b,{hostname:M,port:z}=t[Kz];l[e6e]=i||`${M}
`.trim())}};zJ.exports=xR});varyg=m((zD0,yJ)=>{"use strict";varOJ=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:PWe}=p0(),kWe=TA();CJ()===void0&&EJ(newkWe);functionEJ(t){if(!t||typeoft.dispatch!="function")thrownewPWe("Argument agent must implement Agent");Object.defineProperty(globalThis,OJ,{value:t,writable:!0,enumerable:!1,configurable:!1})}s(EJ,"setGlobalDispatcher");functionCJ(){returnglobalThis[OJ]}s(CJ,"getGlobalDispatcher");yJ.exports={setGlobalDispatcher:EJ,getGlobalDispatcher:CJ}});varBg=m((ED0,BJ)=>{"use strict";BJ.exports=class{static{s(this,"DecoratorHandler")}#e;constructor(e){if(typeofe!="object"||e===null)thrownewTypeError("handler must be an object");this.#e=e}onConnect(...e){returnthis.#e.onConnect?.(...e)}onError(...e){returnthis.#e.onError?.(...e)}onUpgrade(...e){returnthis.#e.onUpgrade?.(...e)}onResponseStarted(...e){returnthis.#e.onResponseStarted?.(...e)}onHeaders(...e){returnthis.#e.onHeaders?.(...e)}onData(...e){returnthis.#e.onData?.(...e)}onComplete(...e){returnthis.#e.onComplete?.(...e)}onBodySent(...e){returnthis.#e.onBodySent?.(...e)}}});varDJ=m((yD0,qJ)=>{"use strict";varUWe=ng();qJ.exports=t=>{lete=t?.maxRedirections;returnr=>s(function(o,i){let{maxRedirections:a=e,...c}=o;if(!a)returnr(o,i);letu=newUWe(r,a,o,i);returnr(c,u)},"redirectInterceptor")}});varRJ=m((qD0,IJ)=>{"use strict";varGWe=bg();IJ.exports=t=>e=>s(function(n,o){returne(n,newGWe({...n,retryOptions:{...t,...n.retryOptions}},{handler:o,dispatch:e}))},"retryInterceptor")});varwJ=m((ID0,NJ)=>{"use strict";varHWe=Xe(),{InvalidArgumentError:XWe,RequestAbortedError:VWe}=p0(),JWe=Bg(),TR=classextendsJWe{static{s(this,"DumpHandler")}#e=1024*1024;#t=null;#n=!1;#r=!1;#o=0;#i=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))thrownewXWe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#s.bind(this))}#s(e){this.#r=!0,this.#i=e}onHeaders(e,r,n,o){leta=HWe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)thrownewVWe(`Response size (${a}) larger than maxSize (${this.#e})`);returnthis.#r?!0:this.#a.onHeaders(e,r,n,o)}onError(e){this.#n||(e=this.#i??e,this.#a.onError(e))}onData(e){returnthis.#o=this.#o+e.length,this.#o>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#i):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};functionYWe({maxSize:t}={maxSize:1024*1024}){returne=>s(function(n,o){let{dumpMaxSize:i=t}=n,a=newTR({maxSize:i},o);returne(n,a)},"Intercept")}s(YWe,"createDumpInterceptor");NJ.exports=YWe});varWJ=m((ND0,FJ)=>{"use strict";var{isIP:$We}=require("node:net"),{lookup:jWe}=require("node:dns"),KWe=Bg(),{InvalidArgumentError:VA,InformationalError:ZWe}=p0(),SJ=Math.pow(2,31)-1,vR=class{static{s(this,"DNSInstance")}#e=0;#t=0;#n=newMap;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#o}getfull(){returnthis.#n.size===this.#t}runLookup(e,r,n){leto=this.#n.get(e.hostname);if(o==null&&this.full){n(null,e.origin);return}leti={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(o==null)this.lookup(e,i,(a,c)=>{if(a||c==null||c.length===0){n(a??newZWe("No DNS entries found"));return}this.setRecords(e,c);letu=this.#n.get(e.hostname),p=this.pick(e,u,i.affinity),A;typeofp.port=="number"?A=`:${p.port}`:e.port!==""?A=`:${e.port}`:A="",n(null,`${e.protocol}//${p.family===6?`[${p.address}]`:p.address}${A}`)});else{leta=this.pick(e,o,i.affinity);if(a==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}letc;typeofa.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#r(e,r,n){jWe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(o,i)=>
${i}`;break;case"retry":lj(i)&&(r[o]=i);break;case"id":dj(i)&&(r[o]=i);break;case"event":i.length>0&&(r[o]=i);break}}processEvent(e){e.retry&&lj(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&dj(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};bj.exports={EventSourceStream:DN}});var Cj=m((FI0,Ej)=>{"use strict";var{pipeline:a_e}=require("node:stream"),{fetching:c_e}=Wb(),{makeRequest:u_e}=$A(),{webidl:Ws}=st(),{EventSourceStream:p_e}=fj(),{parseMIMEType:A_e}=tr(),{createFastMessageEvent:l_e}=rl(),{isNetworkError:Mj}=Sb(),{delay:d_e}=BN(),{kEnumerableProperty:yu}=Xe(),{environmentSettingsObject:mj}=Nr(),hj=!1,zj=3e3,Jb=0,gj=1,Yb=2,b_e="anonymous",f_e="use-credentials",al=class t extends EventTarget{static{s(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#n=!1;#r=Jb;#o=null;#i=null;#a;#s;constructor(e,r={}){super(),Ws.util.markAsUncloneable(this);let n="EventSource constructor";Ws.argumentLengthCheck(arguments,1,n),hj||(hj=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=Ws.converters.USVString(e,n,"url"),r=Ws.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#s={lastEventId:"",reconnectionTime:zj};let o=mj,i;try{i=new URL(e,o.settingsObject.baseUrl),this.#s.origin=i.origin}catch(u){throw new DOMException(u,"SyntaxError")}this.#t=i.href;let a=b_e;r.withCredentials&&(a=f_e,this.#n=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=mj.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#o=u_e(c),this.#u()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#u(){if(this.#r===Yb)return;this.#r=Jb;let e={request:this.#o,dispatcher:this.#a},r=s(n=>{Mj(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(Mj(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let o=n.headersList.get("content-type",!0),i=o!==null?A_e(o):"failure",a=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=gj,this.dispatchEvent(new Event("open")),this.#s.origin=n.urlList[n.urlList.length-1].origin;let c=new p_e({eventSourceSettings:this.#s,push:s(u=>{this.dispatchEvent(l_e(u.type,u.options))},"push")});a_e(n.body.stream,c,u=>{u?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=c_e(e)}async#c(){this.#r!==Yb&&(this.#r=Jb,this.dispatchEvent(new Event("error")),await d_e(this.#s.reconnectionTime),this.#r===Jb&&(this.#s.lastEventId.length&&this.#o.headersList.set("last-event-id",this.#s.lastEventId,!0),this.#u()))}close(){Ws.brandCheck(this,t),this.#r!==Yb&&(this.#r=Yb,this.#i.abort(),this.#o=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},Oj={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Jb,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:gj,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Yb,writable:!1}};Obj
%s`,x,x,B,n);varW=B.type==="*"?Fw:B.type==="?"?Sw:"\\"+B.type;o=!0,n=n.slice(0,B.reStart)+W+"\\("+x}z(),i&&(n+="\\\\");var_=!1;switch(n.charAt(0)){case"[":case".":case"(":_=!0}for(varae=c.length-1;ae>-1;ae--){varSe=c[ae],xe=n.slice(0,Se.reStart),Ne=n.slice(Se.reStart,Se.reEnd-8),Ce=n.slice(Se.reEnd-8,Se.reEnd),we=n.slice(Se.reEnd);Ce+=we;vark=xe.split("(").length-1,Te=we;for(O=0;O<k;O++)Te=Te.replace(/\)[+*?]?/,"");we=Te;varT="";we===""&&e!==TO&&(T="$");varj=xe+Ne+we+T+Ce;n=j}if(n!==""&&o&&(n="(?=.)"+n),_&&(n=b+n),e===TO)return[n,o];if(!o)return$ke(t);var$e=r.nocase?"i":"";try{varm1=newRegExp("^"+n+"$",$e)}catch{returnnewRegExp("$.")}returnm1._glob=t,m1._src=n,m1}s(Jke,"parse");Ur.makeRe=function(t,e){returnnewut(t,e||{}).makeRe()};ut.prototype.makeRe=Yke;functionYke(){if(this.regexp||this.regexp===!1)returnthis.regexp;vart=this.set;if(!t.length)returnthis.regexp=!1,this.regexp;vare=this.options,r=e.noglobstar?Fw:e.dot?Pke:kke,n=e.nocase?"i":"",o=t.map(function(i){returni.map(function(a){returna===Ww?r:typeofa=="string"?jke(a):a._src}).join("\\/")}).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=newRegExp(o,n)}catch{this.regexp=!1}returnthis.regexp}s(Yke,"makeRe");Ur.match=function(t,e,r){r=r||{};varn=newut(e,r);returnt=t.filter(function(o){returnn.match(o)}),n.options.nonull&&!t.length&&t.push(e),t};ut.prototype.match=s(function(e,r){if(typeofr>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)returne==="";if(e==="/"&&r)return!0;varn=this.options;zf.sep!=="/"&&(e=e.split(zf.sep).join("/")),e=e.split(wee),this.debug(this.pattern,"split",e);varo=this.set;this.debug(this.pattern,"set",o);vari,a;for(a=e.length-1;a>=0&&(i=e[a],!i);a--);for(a=0;a<o.length;a++){varc=o[a],u=e;n.matchBase&&c.length===1&&(u=[i]);varp=this.matchOne(u,c,r);if(p)returnn.flipNegate?!0:!this.negate}returnn.flipNegate?!1:this.negate},"match");ut.prototype.matchOne=function(t,e,r){varn=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(varo=0,i=0,a=t.length,c=e.length;o<a&&i<c;o++,i++){this.debug("matchOne loop");varu=e[i],p=t[o];if(this.debug(e,u,p),u===!1)return!1;if(u===Ww){this.debug("GLOBSTAR",[e,u,p]);varA=o,l=i+1;if(l===c){for(this.debug("** at the end");o<a;o++)if(t[o]==="."||t[o]===".."||!n.dot&&t[o].charAt(0)===".")return!1;return!0}for(;A<a;){varb=t[A];if(this.debug(`
globstar while`,t,A,e,l,b),this.matchOne(t.slice(A),e.slice(l),r))returnthis.debug("globstar found match!",A,a,b),!0;if(b==="."||b===".."||!n.dot&&b.charAt(0)==="."){this.debug("dot detected!",t,A,e,l);break}this.debug("globstar swallow a segment, and continue"),A++}return!!(r&&(this.debug(`
`).map(e=>e.trim()).join(" ")};Cte.O=function(t){return this.inspectOpts.colors=this.useColors,y3.inspect(t,this.inspectOpts)}});var q3=m((ox0,N6)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?N6.exports=hte():N6.exports=yte()});var Dte=m(cr=>{"use strict";var dHe=cr&&cr.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(e,r);(!o||("get"in o?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){return e[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),bHe=cr&&cr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Bte=cr&&cr.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&dHe(e,t,r);return bHe(e,t),e};Object.defineProperty(cr,"__esModule",{value:!0});cr.req=cr.json=cr.toBuffer=void 0;var fHe=Bte(require("http")),MHe=Bte(require("https"));async function qte(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}s(qte,"toBuffer");cr.toBuffer=qte;async function mHe(t){let r=(await qte(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let o=n;throw o.message+=`(input:${r})`,o}}s(mHe,"json");cr.json=mHe;functionhHe(t,e={}){letn=((typeoft=="string"?t:t.href).startsWith("https:")?MHe:fHe).request(t,e),o=newPromise((i,a)=>{n.once("response",i).once("error",a).end()});returnn.then=o.then.bind(o),n}s(hHe,"req");cr.req=hHe});varwte=m(Vr=>{"use strict";varRte=Vr&&Vr.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);varo=Object.getOwnPropertyDescriptor(e,r);(!o||("get"ino?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){returne[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),zHe=Vr&&Vr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Nte=Vr&&Vr.__importStar||function(t){if(t&&t.__esModule)returnt;vare={};if(t!=null)for(varrint)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Rte(e,t,r);returnzHe(e,t),e},gHe=Vr&&Vr.__exportStar||function(t,e){for(varrint)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Rte(e,t,r)};Object.defineProperty(Vr,"__esModule",{value:!0});Vr.Agent=void0;varOHe=Nte(require("net")),Ite=Nte(require("http")),EHe=require("https");gHe(Dte(),Vr);varai=Symbol("AgentBaseInternalState"),w6=classextendsIte.Agent{static{s(this,"Agent")}constructor(e){super(e),this[ai]={}}isSecureEndpoint(e){if(e){if(typeofe.secureEndpoint=="boolean")returne.secureEndpoint;if(typeofe.protocol=="string")returne.protocol==="https:"}let{stack:r}=newError;returntypeofr!="string"?!1:r.split(`
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)returnnull;this.sockets[e]||(this.sockets[e]=[]);letr=newOHe.Socket({writable:!1});returnthis.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;letn=this.sockets[e],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&deletethis.sockets[e])}getName(e){returnthis.isSecureEndpoint(e)?EHe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){leto={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(o),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,o)).then(c=>{if(this.decrementSockets(i,a),cinstanceofIte.Agent)try{returnc.addRequest(e,o)}catch(u){returnn(u)}this[ai].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(i,a),n(c)})}createConnection(){lete=this[ai].currentSocket;if(this[ai].currentSocket=void0,!e)thrownewError("No socket was returned in the `connect()` function");returne}getdefaultPort(){returnthis[ai].defaultPort??(this.protocol==="https:"?443:80)}setdefaultPort(e){this[ai]&&(this[ai].defaultPort=e)}getprotocol(){returnthis[ai].protocol??(this.isSecureEndpoint()?"https:":"http:")}setprotocol(e){this[ai]&&(this[ai].protocol=e)}};Vr.Agent=w6});varSte=m(Nl=>{"use strict";varCHe=Nl&&Nl.__importDefault||function(t){returnt&&t.__esModule?t:{default:t}};Object.defineProperty(Nl,"__esModule",{value:!0});Nl.parseProxyResponse=void0;varyHe=CHe(q3()),D3=(0,yHe.default)("https-proxy-agent:parse-proxy-response");functionBHe(t){returnnewPromise((e,r)=>{letn=0,o=[];functioni(){letA=t.read();A?p(A):t.once("readable",i)}s(i,"read");functiona(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",i)}s(a,"cleanup");functionc(){a(),D3("onend"),r(newError("Proxy connection ended before receiving CONNECT response"))}s(c,"onend");functionu(A){a(),D3("onerror %o",A),r(A)}s(u,"onerror");functionp(A){o.push(A),n+=A.length;letl=Buffer.concat(o,n),b=l.indexOf(`\r
`);let{connect:p,buffered:A}=awaitu;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200)returne.once("socket",FHe),r.secureEndpoint?(vf("Upgrading socket connection to TLS"),Fte.connect({...xte(Wte(r),"host","path","port"),socket:o})):o;o.destroy();letl=newI3.Socket({writable:!1});returnl.readable=!0,e.once("socket",b=>{vf("Replaying proxy buffer for failed request"),(0,IHe.default)(b.listenerCount("data")>0),b.push(A),b.push(null)}),l}};R3.protocols=["http","https"];In.HttpsProxyAgent=R3;functionFHe(t){t.resume()}s(FHe,"resume");functionxte(t,...e){letr={},n;for(nint)e.includes(n)||(r[n]=t[n]);returnr}s(xte,"omit")});varPte=m(ur=>{"use strict";varWHe=ur&&ur.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);varo=Object.getOwnPropertyDescriptor(e,r);(!o||("get"ino?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){returne[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),xHe=ur&&ur.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),_te=ur&&ur.__importStar||function(t){if(t&&t.__esModule)returnt;vare={};if(t!=null)for(varrint)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&WHe(e,t,r);returnxHe(e,t),e};Object.defineProperty(ur,"__esModule",{value:!0});ur.req=ur.json=ur.toBuffer=void0;varTHe=_te(require("http")),vHe=_te(require("https"));asyncfunctionQte(t){lete=0,r=[];forawait(letnoft)e+=n.length,r.push(n);returnBuffer.concat(r,e)}s(Qte,"toBuffer");ur.toBuffer=Qte;asyncfunctionLHe(t){letr=(awaitQte(t)).toString("utf8");try{returnJSON.parse(r)}catch(n){leto=n;throwo.message+=` (input: ${r})`,o}}s(LHe,"json");ur.json=LHe;function_He(t,e={}){letn=((typeoft=="string"?t:t.href).startsWith("https:")?vHe:THe).request(t,e),o=newPromise((i,a)=>{n.once("response",i).once("error",a).end()});returnn.then=o.then.bind(o),n}s(_He,"req");ur.req=_He});varHte=m(Jr=>{"use strict";varUte=Jr&&Jr.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);varo=Object.getOwnPropertyDescriptor(e,r);(!o||("get"ino?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){returne[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),QHe=Jr&&Jr.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Gte=Jr&&Jr.__importStar||function(t){if(t&&t.__esModule)returnt;vare={};if(t!=null)for(varrint)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Ute(e,t,r);returnQHe(e,t),e},PHe=Jr&&Jr.__exportStar||function(t,e){for(varrint)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ute(e,t,r)};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.Agent=void0;varkHe=Gte(require("net")),kte=Gte(require("http")),UHe=require("https");PHe(Pte(),Jr);varci=Symbol("AgentBaseInternalState"),S6=classextendskte.Agent{static{s(this,"Agent")}constructor(e){super(e),this[ci]={}}isSecureEndpoint(e){if(e){if(typeofe.secureEndpoint=="boolean")returne.secureEndpoint;if(typeofe.protocol=="string")returne.protocol==="https:"}let{stack:r}=newError;returntypeofr!="string"?!1:r.split(`
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)returnnull;this.sockets[e]||(this.sockets[e]=[]);letr=newkHe.Socket({writable:!1});returnthis.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;letn=this.sockets[e],o=n.indexOf(r);o!==-1&&(n.splice(o,1),this.totalSocketCount--,n.length===0&&deletethis.sockets[e])}getName(e){return(typeofe.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?UHe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){leto={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(o),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,o)).then(c=>{if(this.decrementSockets(i,a),cinstanceofkte.Agent)returnc.addRequest(e,o);this[ci].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(i,a),n(c)})}createConnection(){lete=this[ci].currentSocket;if(this[ci].currentSocket=void0,!e)thrownewError("No socket was returned in the `connect()` function");returne}getdefaultPort(){returnthis[ci].defaultPort??(this.protocol==="https:"?443:80)}setdefaultPort(e){this[ci]&&(this[ci].defaultPort=e)}getprotocol(){returnthis[ci].protocol??(this.isSecureEndpoint()?"https:":"http:")}setprotocol(e){this[ci]&&(this[ci].protocol=e)}};Jr.Agent=S6});varJte=m(Rn=>{"use strict";varGHe=Rn&&Rn.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);varo=Object.getOwnPropertyDescriptor(e,r);(!o||("get"ino?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){returne[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),HHe=Rn&&Rn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Vte=Rn&&Rn.__importStar||function(t){if(t&&t.__esModule)returnt;vare={};if(t!=null)for(varrint)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&GHe(e,t,r);returnHHe(e,t),e},XHe=Rn&&Rn.__importDefault||function(t){returnt&&t.__esModule?t:{default:t}};Object.defineProperty(Rn,"__esModule",{value:!0});Rn.HttpProxyAgent=void0;varVHe=Vte(require("net")),JHe=Vte(require("tls")),YHe=XHe(q3()),$He=require("events"),jHe=Hte(),Xte=require("url"),wl=(0,YHe.default)("http-proxy-agent"),N3=classextendsjHe.Agent{static{s(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeofe=="string"?newXte.URL(e):e,this.proxyHeaders=r?.headers??{},wl("Creating new HttpProxyAgent instance: %o",this.proxy.href);letn=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?KHe(r,"headers"):null,host:n,port:o}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,o=r.secureEndpoint?"https:":"http:",i=e.getHeader("host")||"localhost",a=`${o}//${i}`,c=newXte.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);letu=typeofthis.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){letp=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;u["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}u["Proxy-Connection"]||(u["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(letpofObject.keys(u)){letA=u[p];A&&e.setHeader(p,A)}}asyncconnect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);letn,o;wl("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(wl("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,o=n.indexOf(`\r
`)+4,e.outputData[0].data=e._header+n.substring(o),wl("Output buffer: %o",e.outputData[0].data));leti;returnthis.proxy.protocol==="https:"?(wl("Creating `tls.Socket`: %o",this.connectOpts),i=JHe.connect(this.connectOpts)):(wl("Creating `net.Socket`: %o",this.connectOpts),i=VHe.connect(this.connectOpts)),await(0,$He.once)(i,"connect"),i}};N3.protocols=["http","https"];Rn.HttpProxyAgent=N3;functionKHe(t,...e){letr={},n;for(nint)e.includes(n)||(r[n]=t[n]);returnr}s(KHe,"omit")});varMre=m(G3=>{"use strict";Object.defineProperty(G3,"__esModule",{value:!0});G3.state=void0;G3.state={instrumenterImplementation:void0}});varFre=m(Y3=>{"use strict";Object.defineProperty(Y3,"__esModule",{value:!0});Y3.state=void0;Y3.state={operationRequestMap:newWeakMap}});varAie=m(Yl=>{"use strict";Object.defineProperty(Yl,"__esModule",{value:!0});varhje=require("os"),zje=require("util");functiongje(t){returnt&&typeoft=="object"&&"default"int?t:{default:t}}s(gje,"_interopDefaultLegacy");varOje=gje(zje);functionEje(t,...e){process.stderr.write(`${Oje.default.format(t,...e)}${hje.EOL}`)}s(Eje,"log");vartie=typeofprocess<"u"&&process.env&&process.env.DEBUG||void0,nie,pT=[],AT=[],bC=[];tie&&lT(tie);varoie=Object.assign(t=>iie(t),{enable:lT,enabled:dT,disable:Cje,log:Eje});functionlT(t){nie=t,pT=[],AT=[];lete=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(letnofr)n.startsWith("-")?AT.push(newRegExp(`^${n.substr(1)}$`)):pT.push(newRegExp(`^${n}$`));for(letnofbC)n.enabled=dT(n.namespace)}s(lT,"enable");functiondT(t){if(t.endsWith("*"))return!0;for(leteofAT)if(e.test(t))return!1;for(leteofpT)if(e.test(t))return!0;return!1}s(dT,"enabled");functionCje(){lett=nie||"";returnlT(""),t}s(Cje,"disable");functioniie(t){lete=Object.assign(r,{enabled:dT(t),destroy:yje,log:oie.log,namespace:t,extend:Bje});functionr(...n){e.enabled&&(n.length>0&&(n[0]=`${t}${n[0]}`),e.log(...n))}returns(r,"debug"),bC.push(e),e}s(iie,"createDebugger");functionyje(){lett=bC.indexOf(this);returnt>=0?(bC.splice(t,1),!0):!1}s(yje,"destroy");functionBje(t){lete=iie(`${this.namespace}:${t}`);returne.log=this.log,e}s(Bje,"extend");varyM=oie,sie=newSet,lC=typeofprocess<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void0,fC,MC=yM("azure");MC.log=(...t)=>{yM.log(...t)};varbT=["verbose","info","warning","error"];lC&&(pie(lC)?aie(lC):console.error(`AZURE_LOG_LEVEL set to unknown log level '${lC}'; logging is not enabled. Acceptable values: ${bT.join(", ")}.`));functionaie(t){if(t&&!pie(t))thrownewError(`Unknown log level '${t}'. Acceptable values: ${bT.join(",")}`);fC=t;lete=[];for(letrofsie)uie(r)&&e.push(r.namespace);yM.enable(e.join(","))}s(aie,"setLogLevel");functionqje(){returnfC}s(qje,"getLogLevel");varrie={verbose:400,info:300,warning:200,error:100};functionDje(t){lete=MC.extend(t);returncie(MC,e),{error:dC(e,"error"),warning:dC(e,"warning"),info:dC(e,"info"),verbose:dC(e,"verbose")}}s(Dje,"createClientLogger");functioncie(t,e){e.log=(...r)=>{t.log(...r)}}s(cie,"patchLogMethod");functiondC(t,e){letr=Object.assign(t.extend(e),{level:e});if(cie(t,r),uie(r)){letn=yM.disable();yM.enable(n+","+r.namespace)}returnsie.add(r),r}s(dC,"createLogger");functionuie(t){return!!(fC&&rie[t.level]<=rie[fC])}s(uie,"shouldEnable");functionpie(t){returnbT.includes(t)}s(pie,"isAzureLogLevel");Yl.AzureLogger=MC;Yl.createClientLogger=Dje;Yl.getLogLevel=qje;Yl.setLogLevel=aie});varmT=m(qM=>{"use strict";Object.defineProperty(qM,"__esModule",{value:!0});var$l=newWeakMap,mC=newWeakMap,BM=classt{static{s(this,"AbortSignal")}constructor(){this.onabort=null,$l.set(this,[]),mC.set(this,!1)}getaborted(){if(!mC.has(this))thrownewTypeError("Expected `this` to be an instance of AbortSignal.");returnmC.get(this)}staticgetnone(){returnnewt}addEventListener(e,r){if(!$l.has(this))thrownewTypeError("Expected `this` to be an instance of AbortSignal.");$l.get(this).push(r)}removeEventListener(e,r){if(!$l.has(this))thrownewTypeError("Expected `this` to be an instance of AbortSignal.");letn=$l.get(this),o=n.indexOf(r);o>-
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}s(Jo0,"logUnexpecedPropertyAccessOnce");function Yo0(){Object.keys(p4).forEach(function(t){delete p4[t]})}s(Yo0,"resetLoggedProperties")});var l4=m(Pi=>{"usestrict";Pi.__esModule=!0;Pi.HandlebarsEnvironment=l_;function Vpe(t){return t&&t.__esModule?t:{default:t}}s(Vpe,"_interopRequireDefault");var zp=$t(),$o0=on(),p_=Vpe($o0),jo0=s_(),Ko0=Upe(),Zo0=c_(),A4=Vpe(Zo0),ei0=u_(),ti0="4.7.9";Pi.VERSION=ti0;var ri0=8;Pi.COMPILER_REVISION=ri0;var ni0=7;Pi.LAST_COMPATIBLE_COMPILER_REVISION=ni0;var oi0={1:"<=1.0.rc.2",2:"==1.0.0-rc.3",3:"==1.0.0-rc.4",4:"==1.x.x",5:"==2.0.0-alpha.x",6:">=2.0.0-beta.1",7:">=4.0.0<4.3.0",8:">=4.3.0"};Pi.REVISION_CHANGES=oi0;var A_="[objectObject]";function l_(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},jo0.registerDefaultHelpers(this),Ko0.registerDefaultDecorators(this)}s(l_,"HandlebarsEnvironment");l_.prototype={constructor:l_,logger:A4.default,log:A4.default.log,registerHelper:s(function(e,r){if(zp.toString.call(e)===A_){if(r)throw new p_.default("Argnotsupportedwithmultiplehelpers");zp.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:s(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:s(function(e,r){if(zp.toString.call(e)===A_)zp.extend(this.partials,e);else{if(typeof r>"u")throw new p_.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:s(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:s(function(e,r){if(zp.toString.call(e)===A_){if(r)throw new p_.default("Argnotsupportedwithmultipledecorators");zp.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:s(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:s(function(){ei0.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var ii0=A4.default.log;Pi.log=ii0;Pi.createFrame=zp.createFrame;Pi.logger=A4.default});var Ype=m((d4,Jpe)=>{"usestrict";d4.__esModule=!0;function d_(t){this.string=t}s(d_,"SafeString");d_.prototype.toString=d_.prototype.toHTML=function(){return""+this.string};d4.default=d_;Jpe.exports=d4.default});var $pe=m(b_=>{"usestrict";b_.__esModule=!0;b_.wrapHelper=si0;function si0(t,e){if(typeof t!="function")return t;var r=s(function(){var o=arguments[arguments.length-1];return arguments[arguments.length-1]=e(o),t.apply(this,arguments)},"wrapper");return r}s(si0,"wrapHelper")});var rAe=m(yc=>{"usestrict";yc.__esModule=!0;yc.checkRevision=li0;yc.template=di0;yc.wrapProgram=b4;yc.resolvePartial=bi0;yc.invokePartial=fi0;yc.noop=eAe;function ai0(t){return t&&t.__esModule?t:{default:t}}s(ai0,"_interopRequireDefault");function ci0(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}s(ci0,"_interopRequireWildcard");var ui0=$t(),q2=ci0(ui0),pi0=on(),aa=ai0(pi0),ca=l4(),jpe=s_(),Ai0=$pe(),Kpe=u_();function li0(t){var e=t&&t[0]||1,r=ca.COMPILER_REVISION;if(!(e>=ca.LAST_COMPATIBLE_COMPILER_REVISION&&e<=ca.COMPILER_REVISION))if(e<ca.LAST_COMPATIBLE_COMPILER_REVISION){var n=ca.REVISION_CHANGES[r],o=ca.REVISION_CHANGES[e];throw new aa.default("TemplatewasprecompiledwithanolderversionofHandlebarsthanthecurrentruntime.Pleaseupdateyourprecompilertoanewerversion("+n+")ordowngradeyourruntimetoanolderversion("+o+").")}else throw new aa.default("TemplatewasprecompiledwithanewerversionofHandlebarsthanthecurrentruntime.Pleaseupdateyourruntimetoanewerversion("+t[1]+").")}s(li0,"checkRevision");function di0(t,e){if(!e)throw new aa.default("Noenvironmentpassedtotemplate");if(!t||!t.main)throw new aa.default("Unknowntemplateobject:"+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(a,c,u){u.hash&&(c=q2.extend({},c,u.hash),u.ids&&(u.ids[0]=!0)),a=e.VM.res
`)}s(XA0,"fromDER")});varXB=m(Lc=>{"use strict";Object.defineProperty(Lc,"__esModule",{value:!0});Lc.SHA2_HASH_ALGOS=Lc.RSA_SIGNATURE_ALGOS=Lc.ECDSA_SIGNATURE_ALGOS=void0;Lc.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};Lc.RSA_SIGNATURE_ALGOS={"1.2.840.113549.1.1.14":"sha224","1.2.840.113549.1.1.11":"sha256","1.2.840.113549.1.1.12":"sha384","1.2.840.113549.1.1.13":"sha512"};Lc.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});varT8=m(VB=>{"use strict";Object.defineProperty(VB,"__esModule",{value:!0});VB.RFC3161TimestampVerificationError=void0;varx8=classextendsError{static{s(this,"RFC3161TimestampVerificationError")}};VB.RFC3161TimestampVerificationError=x8});varTde=m(Yi=>{"use strict";varVA0=Yi&&Yi.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);varo=Object.getOwnPropertyDescriptor(e,r);(!o||("get"ino?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){returne[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),JA0=Yi&&Yi.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),YA0=Yi&&Yi.__importStar||(function(){vart=s(function(e){returnt=Object.getOwnPropertyNames||function(r){varn=[];for(varoinr)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);returnn},t(e)},"ownKeys");returnfunction(e){if(e&&e.__esModule)returne;varr={};if(e!=null)for(varn=t(e),o=0;o<n.length;o++)n[o]!=="default"&&VA0(r,e,n[o]);returnJA0(r,e),r}})();Object.defineProperty(Yi,"__esModule",{value:!0});Yi.TSTInfo=void0;varxde=YA0(id()),$A0=XB(),jA0=T8(),v8=class{static{s(this,"TSTInfo")}root;constructor(e){this.root=e}getversion(){returnthis.root.subs[0].toInteger()}getgenTime(){returnthis.root.subs[4].toDate()}getmessageImprintHashAlgorithm(){lete=this.messageImprintObj.subs[0].subs[0].toOID();return$A0.SHA2_HASH_ALGOS[e]}getmessageImprintHashedMessage(){returnthis.messageImprintObj.subs[1].value}getraw(){returnthis.root.toDER()}verify(e){letr=xde.digest(this.messageImprintHashAlgorithm,e);if(!xde.bufferEqual(r,this.messageImprintHashedMessage))thrownewjA0.RFC3161TimestampVerificationError("message imprint does not match artifact")}getmessageImprintObj(){returnthis.root.subs[2]}};Yi.TSTInfo=v8});varLde=m($i=>{"use strict";varKA0=$i&&$i.__createBinding||(Object.create?(function(t,e,r,n){n===void0&&(n=r);varo=Object.getOwnPropertyDescriptor(e,r);(!o||("get"ino?!e.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:s(function(){returne[r]},"get")}),Object.defineProperty(t,n,o)}):(function(t,e,r,n){n===void0&&(n=r),t[n]=e[r]})),ZA0=$i&&$i.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),el0=$i&&$i.__importStar||(function(){vart=s(function(e){returnt=Object.getOwnPropertyNames||function(r){varn=[];for(varoinr)Object.prototype.hasOwnProperty.call(r,o)&&(n[n.length]=o);returnn},t(e)},"ownKeys");returnfunction(e){if(e&&e.__esModule)returne;varr={};if(e!=null)for(varn=t(e),o=0;o<n.length;o++)n[o]!=="default"&&KA0(r,e,n[o]);returnZA0(r,e),r}})();Object.defineProperty($i,"__esModule",{value:!0});$i.RFC3161Timestamp=void0;vartl0=UB(),L8=el0(id()),vde=XB(),Um=T8(),rl0=Tde(),nl0="1.2.840.113549.1.7.2",ol0="1.2.840.113549.1.9.16.1.4",il0="1.2.840.113549.1.9.4",_8=classt{static{s(this,"RFC3161Timestamp")}root;constructor(e){this.root=e}staticparse(e){letr=tl0.ASN1Obj.parseBuffer(e);returnnewt(r)}getstatus(){returnthis.pkiStatusInfoObj.subs[0].toInteger()}getcontentType(){returnthis.contentTypeObj.toOID()}geteContentType(){returnthis.eContentTypeObj.toOID()}getsigningTime(){returnthis.tstInfo.genTime}getsignerIssuer(){returnthis.signerSidObj.subs[0].value}getsignerSerialNumber(){returnthis.signerSidObj.subs[1].value}getsignerDigestAlgorith
`,B20=/\u2014 (\S+) (\S+)\n/g;function q20(t,e){let r=t.inclusionProof,n=fP.fromString(r.checkpoint.envelope),o=dq.fromString(n.note);if(!D20(n,e))throw new Jm.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return o}s(q20,"verifyCheckpoint");function D20(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(n=>{let o=e.find(i=>hbe.crypto.bufferEqual(i.logID.subarray(0,4),n.keyHint)&&i.baseURL.match(n.name));return o?hbe.crypto.verify(r,o.publicKey,n.signature):!1})}s(D20,"verifySignedNote");var fP=class t{static{s(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(bP))throw new Jm.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(bP),n=e.slice(0,r+1),i=e.slice(r+bP.length).matchAll(B20),a=Array.from(i,c=>{let[,u,p]=c,A=Buffer.from(p,"base64");if(A.length<5)throw new Jm.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:u,keyHint:A.subarray(0,4),signature:A.subarray(4)}});if(a.length===0)throw new Jm.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(n,a)}},dq=class t{static{s(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,n,o){this.origin=e,this.logSize=r,this.logHash=n,this.rest=o}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new Jm.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let n=r[0],o=BigInt(r[1]),i=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(n,o,i,a)}};Ym.LogCheckpoint=dq});var gbe=m(zP=>{"use strict";Object.defineProperty(zP,"__esModule",{value:!0});zP.verifyMerkleInclusion=N20;var hP=wo(),MP=It(),I20=Buffer.from([0]),R20=Buffer.from([1]);function N20(t,e){let r=t.inclusionProof,n=BigInt(r.logIndex),o=BigInt(e.logSize);if(n<0n||n>=o)throw new MP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${n}`});let{inner:i,border:a}=w20(n,o);if(r.hashes.length!==i+a)throw new MP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,i),u=r.hashes.slice(i),p=v20(t.canonicalizedBody),A=F20(S20(p,c,n),u);if(!hP.crypto.bufferEqual(A,e.logHash))throw new MP.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}s(N20,"verifyMerkleInclusion");function w20(t,e){let r=W20(t,e),n=x20(t>>BigInt(r));return{inner:r,border:n}}s(w20,"decompInclProof");function S20(t,e,r){return e.reduce((n,o,i)=>r>>BigInt(i)&BigInt(1)?mP(o,n):mP(n,o),t)}s(S20,"chainInner");function F20(t,e){return e.reduce((r,n)=>mP(n,r),t)}s(F20,"chainBorderRight");function W20(t,e){return T20(t^e-BigInt(1))}s(W20,"innerProofSize");function x20(t){return t.toString(2).split("1").length-1}s(x20,"onesCount");function T20(t){return t===0n?0:t.toString(2).length}s(T20,"bitLength");function mP(t,e){return hP.crypto.digest("sha256",R20,t,e)}s(mP,"hashChildren");function v20(t){return hP.crypto.digest("sha256",I20,t)}s(v20,"hashLeaf")});var Ebe=m(gP=>{"use strict";Object.defineProperty(gP,"__esModule",{value:!0});gP.verifyTLogSET=Q20;var Obe=wo(),L20=It(),_20=cd();function Q20(t,e){if(!(0,_20.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(o=>{let i=P20(t),a=Buffer.from(Obe.json.canonicalize(i),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return Obe.crypto.verify(a,o.publicKey,c)}))throw new L20.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}s(Q20,"verifyTLogSET");function P20(t){let{integratedTime:e,logIndex:r,logId:n,canonicalizedBody:o}=t;return{body:o.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:n.keyId.toString("hex")}}s(P20,"toVerificationPayload")});var ybe=m(bq=>{"use strict";Object.defineProperty(bq,"__esModule",{value:!0});bq.verifyTLogBody=X20;bq.verifyTLogInclusion=V20;var Cbe=bbe(),CP=It(),OP=fbe(),EP=Mbe(),k20=mbe(),U20=zbe(),G20=gbe(),H20=Ebe();function X20(t,e){let{kind:r,version:n}=t.kindVersion,o=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==o.kind||n!==o.apiVersion)throw new CP.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${n},received:${o.kind}/${o.apiVersion}`});switch(r){case"dsse":if(n==OP.DSSE_API_VERSION_V1)return(0,OP.verifyDSSETLogBody)(o,e);{let i=Cbe.Entry.fromJSON(o);return(0,OP.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,k20.verifyIntotoTLogBody)(o,e);case"hashedrekord":if(n==EP.HASHEDREKORD_API_VERSION_V1)return(0,EP.verifyHashedRekordTLogBody)(o,e);{let i=Cbe.Entry.fromJSON(o);return(0,EP.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new CP.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}s(X20,"verifyTLogBody");function V20(t,e){let r=!1;if(J20(t)&&((0,H20.verifyTLogSET)(t,e),r=!0),Y20(t)){let n=(0,U20.verifyCheckpoint)(t,e);(0,G20.verifyMerkleInclusion)(t,n),r=!0}if(!r)throw new CP.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}s(V20,"verifyTLogInclusion");function J20(t){return t.inclusionPromise!==void 0}s(J20,"isTLogEntryWithInclusionPromise");function Y20(t){return t.inclusionProof!==void 0}s(Y20,"isTLogEntryWithInclusionProof")});var Rbe=m(fq=>{"use strict";Object.defineProperty(fq,"__esModule",{value:!0});fq.Verifier=void 0;var $20=require("util"),
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,c;return{s:s(function(){r=(0,RC0.default)(t)},"s"),n:s(function(){var p=r.next();return i=p.done,p},"n"),e:s(function(p){a=!0,c=p},"e"),f:s(function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}s(Fh,"_createForOfIteratorHelper");function vC0(t,e){var r;if(t){if(typeof t=="string")return _Ce(t,e);var n=(0,ro.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,FC0.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _Ce(t,e)}}s(vC0,"_unsupportedIterableToArray");function _Ce(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}s(_Ce,"_arrayLikeToArray");var k0="xregexp",eA={astral:!1,namespacing:!1},M1={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},ps={},wh={},Wd={},S7=[],xd="default",QCe="class",LC0={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},_C0=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,QC0=M1.exec.call(/()??/,"")[1]===void 0,PC0=(0,Zp.default)(/x/)!==void 0,kC0={},HCe=kC0.toString;function W7(t){var e=!0;try{if(new RegExp("",t),t==="y"){var r=(function(){return"gy"})(),n=".a".replace(new RegExp("a",r),".")==="..";n&&(e=!1)}}catch{e=!1}return e}s(W7,"hasNativeFlag");var XCe=W7("u"),x7=W7("y"),VCe={g:!0,i:!0,m:!0,u:XCe,y:x7};function JCe(t,e,r,n,o){var i;if(t[k0]={captureNames:e},o)return t;if(t.__proto__)t.__proto__=K.prototype;else for(var a in K.prototype)t[a]=K.prototype[a];return t[k0].source=r,t[k0].flags=n&&(0,TC0.default)(i=n.split("")).call(i).join(""),t}s(JCe,"augment");function Sh(t){return M1.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}s(Sh,"clipDuplicates");function rA(t,e){var r;if(!K.isRegExp(t))throw new TypeError("Type RegExp expected");var n=t[k0]||{},o=UC0(t),i="",a="",c=null,u=null;return e=e||{},e.removeG&&(a+="g"),e.removeY&&(a+="y"),a&&(o=M1.replace.call(o,new RegExp("[".concat(a,"]+"),"g"),"")),e.addG&&(i+="g"),e.addY&&(i+="y"),i&&(o=Sh(o+i)),e.isInternalOnly||(n.source!==void 0&&(c=n.source),(0,Zp.default)(n)!=null&&(u=i?Sh((0,Zp.default)(n)+i):(0,Zp.default)(n))),t=JCe(new RegExp(e.source||t.source,o),GC0(t)?(0,ro.default)(r=n.captureNames).call(r,0):null,c,u,e.isInternalOnly),t}s(rA,"copyRegex");function YCe(t){return(0,GCe.default)(t,16)}s(YCe,"dec");function $Ce(t,e,r){return t.input[t.index-1]==="("||t.input[t.index+t[0].length]===")"||t.input[t.index-1]==="|"||t.input[t.index+t[0].length]==="|"||t.index<1||t.index+t[0].length>=t.input.length||M1.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||HC0(t.input,t.index+t[0].length,r)?"":"(?:)"}s($Ce,"getContextualTokenSeparator");function UC0(t){return PC0?(0,Zp.default)(t):M1.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}s(UC0,"getNativeFlags");function GC0(t){return!!(t[k0]&&t[k0].captureNames)}s(GC0,"hasNamedCapture");function jCe(t){return(0,GCe.default)(t,10).toString(16)}s(jCe,"hex");function HC0(t,e,r){var n="\\(\\?#[^)]*\\)",o="#[^#\\n]*",i="[?*+]|{\\d+(?:,\\d*)?}";return M1.test.call((0,tA.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,ro.default)(t).call(t,e))}s(HC0,"isQuantifierNext");function T7(t,e){return HCe.call(t)==="[object ".concat(e,"]")}s(T7,"isType");function KCe(t){for(;t.length<4;)t="0".concat(t);return t}s(KCe,"pad4");function XC0(t,e){if(Sh(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=M1.replace.call(t,/^\(\?([\w$]+)\)/,function(i,a){if(M1.test.call(/[gy]/,a))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(i));return e=Sh(e+a),""});var
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,c;return{s:s(function(){r=(0,Iy0.default)(t)},"s"),n:s(function(){var p=r.next();return i=p.done,p},"n"),e:s(function(p){a=!0,c=p},"e"),f:s(function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}s(Ty0,"_createForOfIteratorHelper");function vy0(t,e){var r;if(t){if(typeof t=="string")return _ye(t,e);var n=(0,Fy0.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,Sy0.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _ye(t,e)}}s(vy0,"_unsupportedIterableToArray");function _ye(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}s(_ye,"_arrayLikeToArray");var Ly0=s(function(e){var r={},n=e._dec,o=e._hex,i=e._pad4;function a(b){return b.replace(/[- _]+/g,"").toLowerCase()}s(a,"normalize");function c(b){var M=/^\\[xu](.+)/.exec(b);return M?n(M[1]):b.charCodeAt(b[0]==="\\"?1:0)}s(c,"charCode");function u(b){var M="",z=-1;return(0,xy0.default)(e).call(e,b,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(O){var y=c(O[1]);y>z+1&&(M+="\\u".concat(i(o(z+1))),y>z+2&&(M+="-\\u".concat(i(o(y-1))))),z=c(O[2]||O[1])}),z<65535&&(M+="\\u".concat(i(o(z+1))),z<65534&&(M+="-\\uFFFF")),M}s(u,"invertBmp");function p(b){var M="b!";return r[b][M]||(r[b][M]=u(r[b].bmp))}s(p,"cacheInvertedBmp");function A(b,M){var z=r[b],O="";if(z.bmp&&!z.isBmpLast){var y;O=(0,Q7.default)(y="[".concat(z.bmp,"]")).call(y,z.astral?"|":"")}if(z.astral&&(O+=z.astral),z.isBmpLast&&z.bmp){var E;O+=(0,Q7.default)(E="".concat(z.astral?"|":"","[")).call(E,z.bmp,"]")}return M?"(?:(?!".concat(O,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(O,")")}s(A,"buildAstral");function l(b,M){var z=M?"a!":"a=";return r[b][z]||(r[b][z]=A(b,M))}s(l,"cacheAstral"),e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(b,M,z){var O="Invalid double negation ",y="Unknown Unicode token ",E="Unicode token missing data ",B="Astral mode required for Unicode token ",q="Astral mode does not support Unicode tokens within character classes",D=b[1]==="P"||!!b[2],x=(0,Wy0.default)(z).call(z,"A"),W=a(b[4]||b[3]),_=r[W];if(b[1]==="P"&&b[2])throw new SyntaxError(O+b[0]);if(!r.hasOwnProperty(W))throw new SyntaxError(y+b[0]);if(_.inverseOf){if(W=a(_.inverseOf),!r.hasOwnProperty(W)){var ae;throw new ReferenceError((0,Q7.default)(ae="".concat(E+b[0]," -> ")).call(ae,_.inverseOf))}_=r[W],D=!D}if(!(_.bmp||x))throw new SyntaxError(B+b[0]);if(x){if(M==="class")throw new SyntaxError(q);return l(W,D)}return M==="class"?D?p(W):_.bmp:"".concat((D?"[^":"[")+_.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(b){var M="Unicode token requires name",z="Unicode token has no character data ",O=Ty0(b),y;try{for(O.s();!(y=O.n()).done;){var E=y.value;if(!E.name)throw new Error(M);if(!(E.inverseOf||E.bmp||E.astral))throw new Error(z+E.name);r[a(E.name)]=E,E.alias&&(r[a(E.alias)]=E)}}catch(B){O.e(B)}finally{O.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(b){var M=a(b);return r[M]}},"_default");_h.default=Ly0;Qye.exports=_h.default});var Uye=m((sM1,kye)=>{kye.exports=[{name:"InAdlam",astral:"\uD83A[\uDD00-\uDD5F]"},{name:"InAegean_Numbers",astral:"\uD800[\uDD00-\uDD3F]"},{name:"InAhom",astral:"\uD805[\uDF00-\uDF3F]"},{name:"InAlchemical_Symbols",astral:"\uD83D[\uDF00-\uDF7F]"},{name:"InAlphabetic_Presentation_Forms",bmp:"\uFB00-\uFB4F"},{name:"InAnatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE7F]"},{name:"InAncient_Greek_Musical_Notation",astral:"\uD834[\uDE00-\uDE4F]"},{name:"InAncient_Greek_Numbers",astral:"\uD800[\uDD40-\uDD8F]"},{name:"InAncient_Symbols",astral:"\uD800[\uDD90-\uDDCF]"},{name:"InArabic",bmp:"\u0600-\u06FF"},{name:"InArabic_Extended_A",bmp:"\u08A0-\u08FF"},{name:"InArabic_Mathematical_Alphabetic_Symbols",astral:"\uD83B[\uDE00-\uDEFF]"},{name:"InArabic_Presentation_Forms_A",bmp:"\uFB50-\uFDFF"},{name:"InArabic_Presentation_Forms_B",
`).map(i=>i.trim());for(let i of o)!i||i.startsWith("#")||n.patterns.push(new gf(i));return n.searchPaths.push(...Iw(n.patterns)),n})}static stat(e,r,n){return xw(this,void 0,void 0,function*(){let o;if(r.followSymbolicLinks)try{o=yield hl.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Cn(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw i}else o=yield hl.promises.lstat(e.path);if(o.isDirectory()&&r.followSymbolicLinks){let i=yield hl.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===i)){Cn(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}n.push(i)}return o})}};var n7e=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})};function vee(t,e){return n7e(this,void 0,void 0,function*(){return yield LO.create(t,e)})}s(vee,"create");var e3=w(require("crypto"),1),El=w(require("fs"),1),Fu=w(require("path"),1),N1e=w(I1e(),1),w1e=w(require("util"),1);var Df;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(Df||(Df={}));var Qt;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Qt||(Qt={}));var Gr;(function(t){t.GNU="gnu",t.BSD="bsd"})(Gr||(Gr={}));var KO=2,ZO=5e3,r6=5e3,n6=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,R1e=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,If="cache.tar",o6="manifest.txt",HS0=10*Math.pow(1024,3);var Ol=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})},pGe=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=t[i]&&function(a){return new Promise(function(c,u){a=t[i](a),o(c,u,a.done,a.value)})}}function o(i,a,c,u){Promise.resolve(u).then(function(p){i({value:p,done:c})},a)}},AGe="1.0";function Rf(){return Ol(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let n;t?n=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?n="/Users":n="/home",e=Fu.join(n,"actions","temp")}let r=Fu.join(e,e3.randomUUID());return yield Ts(r),r})}s(Rf,"createTempDirectory");function oi(t){return El.statSync(t).size}s(oi,"getArchiveFileSizeInBytes");function i6(t){return Ol(this,void 0,void 0,function*(){var e,r,n,o,i;let a=[],c=(i=process.env.GITHUB_WORKSPACE)!==null&&i!==void 0?i:process.cwd(),u=yield vee(t.join(`
`),{implicitDescendants:!1});try{for(var p=!0,A=pGe(u.globGenerator()),l;l=yield A.next(),e=l.done,!e;p=!0){o=l.value,p=!1;let M=Fu.relative(c,o).replace(new RegExp(`\\${Fu.sep}`,"g"),"/");N(`Matched: ${M}`),M===""?a.push("."):a.push(`${M}`)}}catch(b){r={error:b}}finally{try{!p&&!e&&(n=A.return)&&(yield n.call(A))}finally{if(r)throw r.error}}return a})}s(i6,"resolvePaths");function Nf(t){return Ol(this,void 0,void 0,function*(){return w1e.promisify(El.unlink)(t)})}s(Nf,"unlinkFile");function S1e(t){return Ol(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),N(`Checking ${e} ${r.join(" ")}`);try{yield Pr(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:s(o=>n+=o.toString(),"stdout"),stderr:s(o=>n+=o.toString(),"stderr")}})}catch(o){N(o.message)}return n=n.trim(),N(n),n})}s(S1e,"getVersion");function wf(){return Ol(this,void 0,void 0,function*(){let t=yield S1e("zstd",["--quiet"]),e=N1e.clean(t);return N(`zstd version: ${e}`),t===""?Qt.Gzip:Qt.ZstdWithoutLong})}s(wf,"getCompressionMethod");function nc(t){return t===Qt.Gzip?Df.Gzip:Df.Zstd}s(nc,"getCacheFileName");function F1e(){return Ol(this,void 0,void 0,function*(){return El.existsSync(n6)?n6:(yield S1e("tar")).toLowerCase().includes("gnu tar")?at("tar"):""})}s(F1e,"getGnuTarPathOnWindows");function s6(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}s(s6,"assertDefined");function Cl(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(AGe),e3.createHash("sha256").update(n.join("|")).digest("hex")}s(Cl,"getCacheVersion");function W1e(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}s(W1e,"getRuntimeToken");var Ff=w(require("http"),1),u6=w(require("https"),1);function a6(t){let e=t.protocol==="https:";if(lGe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new r3(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new r3(`http://${r}`)}else return}s(a6,"getProxyUrl");function lGe(t){if(!t.hostname)return!1;let e=t.hostname;if(dGe(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let o=[t.hostname.toUpperCase()];typeof n=="number"&&o.push(`${o[0]}:${n}`);for(let i of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(i==="*"||o.some(a=>a===i||a.endsWith(`.${i}`)||i.startsWith(".")&&a.endsWith(`${i}`)))return!0;return!1}s(lGe,"checkBypass");function dGe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}s(dGe,"isLoopbackAddress");var r3=class extends URL{static{s(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var oc=w($d(),1),x1e=w(ul(),1);var E1=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})},i1;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllo
${IGe.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function c3(t){return t instanceof kt?!0:xu(t)&&t.name==="RestError"}s(c3,"isRestError");function ar(t,e){return Buffer.from(t,e)}s(ar,"stringToUint8Array");var u3=w(require("node:http"),1),p3=w(require("node:https"),1),z6=w(require("node:zlib"),1),Z1e=require("node:stream");var qn=Wf("ts-http-runtime");var RGe={};function xf(t){return t&&typeof t.pipe=="function"}s(xf,"isReadableStream");function K1e(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=s(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}s(K1e,"isStreamComplete");function ete(t){return t&&typeof t.byteLength=="number"}s(ete,"isArrayBuffer");var A3=class extends Z1e.Transform{static{s(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(o){n(o)}}constructor(e){super(),this.progressCallback=e}},g6=class{static{s(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new si("The operation was aborted. Request has already been canceled.");n=s(p=>{p.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let o;e.timeout>0&&(o=setTimeout(()=>{let p=new zo;qn.info(`request to '${p.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),a=i?.includes("gzip")||i?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let p=FGe(c);p!==null&&e.headers.set("Content-Length",p)}let u;try{if(c&&e.onUploadProgress){let z=e.onUploadProgress,O=new A3(z);O.on("error",y=>{qn.error("Error in upload progress",y)}),xf(c)?c.pipe(O):O.end(c),c=O}let p=await this.makeRequest(e,r,c);o!==void 0&&clearTimeout(o);let A=NGe(p),b={status:p.statusCode??0,headers:A,request:e};if(e.method==="HEAD")return p.resume(),b;u=a?wGe(p,A):p;let M=e.onDownloadProgress;if(M){let z=new A3(M);z.on("error",O=>{qn.error("Error in download progress",O)}),u.pipe(z),u=z}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(b.status)?b.readableStreamBody=u:b.bodyAsText=await SGe(u),b}finally{if(e.abortSignal&&n){let p=Promise.resolve();xf(c)&&(p=K1e(c));let A=Promise.resolve();xf(u)&&(A=K1e(u)),Promise.all([p,A]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(l=>{qn.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,n){let o=new URL(e.url),i=o.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,i),hostname:o.hostname,path:`${o.pathname}${o.search}`,port:o.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((u,p)=>{let A=i?u3.default.request(c,u):p3.default.request(c,u);A.once("error",l=>{p(new kt(l.message,{code:l.code??kt.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new si("The operation was aborted. Rejecting from abort signal callback while making request.");A.destroy(l),p(l)}),n&&xf(n)?n.pipe(A):n?typeof n=="string"||Buffer.isBuffer(n)?A.end(n):ete(n)?A.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(qn.error("Unrecognized body type",n),p(new kt("Unrecognized body type"))):A.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?u3.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new u3.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return p3.default.globalAgent;let o=e.tlsSettings??RGe,i=this.cachedHttpsAgents.get(o);return i&&i.options.keepAlive===!n||(qn.info("No cached TLS Agent exi
`;return e}s(pXe,"encodeHeaders");function AXe(t){return t instanceof Uint8Array?t.byteLength:x3(t)?t.size===-1?void 0:t.size:void 0}s(AXe,"getLength");function lXe(t){let e=0;for(let r of t){let n=AXe(r);if(n===void 0)return;e+=n}return e}s(lXe,"getTotalLength");async function dXe(t,e,r){let n=[ar(`--${r}`,"utf-8"),...e.flatMap(i=>[ar(`\r
`,"utf-8")],o=lXe(n);o&&t.headers.set("Content-Length",o),t.body=await ore(n)}s(dXe,"buildRequestBody");var Lf="multipartPolicy",bXe=70,fXe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function MXe(t){if(t.length>bXe)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!fXe.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}s(MXe,"assertValidBoundary");function v3(){return{name:Lf,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBodyandregularbodycannotbesetatthesametime");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",o=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!o)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,i,a]=o;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?MXe(r):r=uXe(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await dXe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}s(v3,"multipartPolicy");function L3(){return a3()}s(L3,"createEmptyPipeline");var ire=o3({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),Uv0=ire.logger;function ui(t){return ire.createClientLogger(t)}s(ui,"createClientLogger");var pi=ui("core-rest-pipeline");function _6(t={}){return d3({logger:pi.info,...t})}s(_6,"logPolicy");var Q6=b3;function P6(t={}){return f3(t)}s(P6,"redirectPolicy");var _3=w(require("node:os"),1),Q3=w(require("node:process"),1);function sre(){return"User-Agent"}s(sre,"getHeaderName");async function are(t){if(Q3.default&&Q3.default.versions){let e=`${_3.default.type()} ${_3.default.release()}; ${_3.default.arch()}`,r=Q3.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}s(are,"setPlatformSpecificData");var P3="1.22.2";function yXe(t){let e=[];for(let[r,n]of t){let o=n?`${r}/${n}`:r;e.push(o)}return e.join("")}s(yXe,"getUserAgentString");function cre(){return sre()}s(cre,"getUserAgentHeaderName");async function k3(t){let e=new Map;e.set("core-rest-pipeline",P3),await are(e);let r=yXe(e);return t?`${t} ${r}`:r}s(k3,"getUserAgentValue");var ure=cre(),pre="userAgentPolicy";function k6(t={}){let e=k3(t.userAgentPrefix);return{name:pre,async sendRequest(r,n){return r.headers.has(ure)||r.headers.set(ure,await e),n(r)}}}s(k6,"userAgentPolicy");var Yr=class extends Error{static{s(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function U6(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:o}=e??{};return new Promise((i,a)=>{function c(){a(new Yr(o??"Theoperationwasaborted."))}s(c,"rejectOnAbort");function u(){n?.removeEventListener("abort",p)}s(u,"removeListeners");function p(){r?.(),u(),c()}if(s(p,"onAbort"),n?.aborted)return c();try{t(A=>{u(),i(A)},A=>{u(),a(A)})}catch(A){a(A)}n?.addEventListener("abort",p)})}s(U6,"createAbortablePromise");var RXe="Thedelaywasaborted.";function _f(t,e){let r,{abortSignal:n,abortErrorMsg:o}=e??{};return U6(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:s(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:o??RXe})}s(_f,"delay");function sc(t){if(xu(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unabletostringifyinput]"}return`Unknown error ${e}`}}s(sc,"getErrorMessage");function Are(t){return xu(t)}s(Are,"isError");function Sl(){return Wu()}s(Sl,"randomUUID");var f0=Lu;var lre=Symbol("rawContent");function H6(t){return typeof t[lre]=="function"}s(H6,"hasRawContent");function dre(t){return H6(t)?t[lre]():t}s(dre,"getRawContent");var U3=Lf;function X6(){let t=v3();return{name:U3,sendRequest:s(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)H6(n.body)&&(n.body=dre(n.body));return t.sendRequest(e,r)},"sendRequest")}}s(X6,"multipartPolicy");var V6=M3;function J6(){return m3()}s(J6,"decompressResponsePolicy");fun
`&&t[i]!=="\r";i++)u+=t[i];if(u=u.trim(),u[u.length-1]==="/"&&(u=u.substring(0,u.length-1),i--),!ZVe(u)){let l;return u.trim().length===0?l="Invalidspaceafter'<'.":l="Tag'"+u+"'isaninvalidname.",C1("InvalidTag",l,Ut(t,i))}let p=JVe(t,i);if(p===!1)return C1("InvalidAttr","Attributesfor'"+u+"'haveopenquote.",Ut(t,i));let A=p.value;if(i=p.index,A[A.length-1]==="/"){let l=i-A.length;A=A.substring(0,A.length-1);let b=Kre(A,e);if(b===!0)n=!0;else return C1(b.err.code,b.err.msg,Ut(t,l+b.err.line))}else if(c)if(p.tagClosed){if(A.trim().length>0)return C1("InvalidTag","Closingtag'"+u+"'can't have attributes or invalid starting.",Ut(t,a));if(r.length===0)return C1("InvalidTag","Closing tag '"+u+"' has not been opened.",Ut(t,a));{let l=r.pop();if(u!==l.tagName){let b=Ut(t,l.tagStartPos);return C1("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+b.line+", col "+b.col+") instead of closing tag '"+u+"'.",Ut(t,a))}r.length==0&&(o=!0)}}else return C1("InvalidTag","Closing tag '"+u+"' doesn'thaveproperclosing.",Ut(t,i));else{let l=Kre(A,e);if(l!==!0)return C1(l.err.code,l.err.msg,Ut(t,i-A.length+l.err.line));if(o===!0)return C1("InvalidXml","Multiplepossiblerootnodesfound.",Ut(t,i));e.unpairedTags.indexOf(u)!==-1||r.push({tagName:u,tagStartPos:a}),n=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=jre(t,i);continue}else if(t[i+1]==="?"){if(i=$re(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=jVe(t,i);if(l==-1)return C1("InvalidChar","char'&'isnotexpected.",Ut(t,i));i=l}else if(o===!0&&!Yre(t[i]))return C1("InvalidXml","Extratextattheend",Ut(t,i));t[i]==="<"&&i--}}else{if(Yre(t[i]))continue;return C1("InvalidChar","char'"+t[i]+"'isnotexpected.",Ut(t,i))}if(n){if(r.length==1)return C1("InvalidTag","Unclosedtag'"+r[0].tagName+"'.",Ut(t,r[0].tagStartPos));if(r.length>0)return C1("InvalidXml","Invalid'"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"'found.",{line:1,col:1})}else return C1("InvalidXml","Starttagexpected.",1);return!0}s(rE,"validate");function Yre(t){return t===""||t===""||t===`
`||t==="\r"}s(Yre,"isWhiteSpace");function $re(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==""){let n=t.substr(r,e-r);if(e>5&&n==="xml")return C1("InvalidXml","XMLdeclarationallowedonlyatthestartofthedocument.",Ut(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}s($re,"readPI");function jre(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}s(jre,"readCommentAndCDATA");var XVe='"',VVe="'";function JVe(t,e){let r="",n="",o=!1;for(;e<t.length;e++){if(t[e]===XVe||t[e]===VVe)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){o=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:o}}s(JVe,"readAttributeStr");var YVe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Kre(t,e){let r=eE(t,YVe),n={};for(let o=0;o<r.length;o++){if(r[o][1].length===0)return C1("InvalidAttr","Attribute '"+r[o][2]+"' has no space in starting.",jf(r[o]));if(r[o][3]!==void 0&&r[o][4]===void 0)return C1("InvalidAttr","Attribute '"+r[o][2]+"' is without value.",jf(r[o]));if(r[o][3]===void 0&&!e.allowBooleanAttributes)return C1("InvalidAttr","boolean attribute '"+r[o][2]+"' is not allowed.",jf(r[o]));let i=r[o][2];if(!KVe(i))return C1("InvalidAttr","Attribute '"+i+"' is an invalid name.",jf(r[o]));if(!Object.prototype.hasOwnProperty.call(n,i))n[i]=1;else return C1("InvalidAttr","Attribute '"+i+"' is repeated.",jf(r[o]))}return!0}s(Kre,"validateAttributeString");function $Ve(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}s($Ve,"validateNumberAmpersand");function jVe(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,$Ve(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}s(jVe,"validateAmpersand");function C1(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}s(C1,"getErrorObject");function KVe(t){return zS(t)}s(KVe,"validateAttrName");function ZVe(t){return zS(t)}s(ZVe,"validateTagName");function Ut(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}s(Ut,"getLineNumberForPosition");function jf(t){return t.startIndex+t[1].length}s(jf,"getPositionFromMatch");var Zre={amp:"&",AMP:"&",lt:"<",LT:"<",gt:">",GT:">",quot:'"',QUOT:'"',apos:"'",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",lsquor:"\u201A",rsquor:"\u2019",ldquor:"\u201E",bdquo:"\u201E",comma:",",period:".",colon:":",semi:";",excl:"!",quest:"?",num:"#",dollar:"$",percent:"%",amp:"&",ast:"*",commat:"@",lowbar:"_",verbar:"|",vert:"|",sol:"/",bsol:"\\",lbrace:"{",rbrace:"}",lbrack:"[",rbrack:"]",lpar:"(",rpar:")",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",COPY:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",REG:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",half:"\xBD",frac34:"\xBE",iquest:"\xBF",times:"\xD7",div:"\xF7",divide:"\xF7"},ene={Agrave:"\xC0",agrave:"\xE0",Aacute:"\xC1",aacute:"\xE1",Acirc:"\xC2",acirc:"\xE2",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",Aring:"\xC5",aring:"\xE5",AElig:"\xC6",aelig:"\xE6",Ccedil:"\xC7",ccedil:"\xE7",Egrave:"\xC8",egrave:"\xE8",Eacute:"\xC9",eacute:"\xE9",Ecirc:"\xCA",ecirc:"\xEA",Euml:"\xCB",euml:"\xEB",Igrave:"\xCC",igrave:"\xEC",Iacute:"\xCD",iacute:"\xED",Icirc:"\xCE",icirc:"\xEE",Iuml:"\xCF",iuml:"\xEF",ETH:"\xD0",eth:"\xF0",Ntilde:"\xD1",ntil
`);lete=newAr("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;leto=this.options,i=neweM(o.processEntities),a=t.length;for(letc=0;c<a;c++)if(t[c]==="<"){letp=t.charCodeAt(c+1);if(p===47){letA=Ll(t,">",c,"Closing Tag is not closed."),l=t.substring(c+2,A).trim();if(o.removeNSPrefix){letM=l.indexOf(":");M!==-1&&(l=l.substr(M+1))}l=DS(o.transformTagName,l,"",o).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));letb=this.matcher.getCurrentTag();if(l&&o.unpairedTagsSet.has(l))thrownewError(`Unpaired tag can not be used as closing tag: </${l}>`);b&&o.unpairedTagsSet.has(b)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=A}elseif(p===63){letA=IS(t,c,!1,"?>");if(!A)thrownewError("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);letl=this.buildAttributesMap(A.tagExp,this.matcher,A.tagName,!0);if(l){letb=l[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(b)||1),i.setXmlVersion(Number(b)||1)}if(!(o.ignoreDeclaration&&A.tagName==="?xml"||o.ignorePiTags)){letb=newAr(A.tagName);b.add(o.textNodeName,""),A.tagName!==A.tagExp&&A.attrExpPresent&&o.ignoreAttributes!==!0&&(b[":@"]=l),this.addChild(r,b,this.readonlyMatcher,c)}c=A.closeIndex+1}elseif(p===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){letA=Ll(t,"-->",c+4,"Comment is not closed.");if(o.commentPropName){letl=t.substring(c+4,A-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(o.commentPropName,[{[o.textNodeName]:l}])}c=A}elseif(p===33&&t.charCodeAt(c+2)===68){letA=i.readDocType(t,c);this.entityDecoder.addInputEntities(A.entities),c=A.i}elseif(p===33&&t.charCodeAt(c+2)===91){letA=Ll(t,"]]>",c,"CDATA is not closed.")-2,l=t.substring(c+9,A);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);letb=this.parseTextData(l,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);b==null&&(b=""),o.cdataPropName?r.add(o.cdataPropName,[{[o.textNodeName]:l}]):r.add(o.textNodeName,b),c=A+2}else{letA=IS(t,c,o.removeNSPrefix);if(!A){letW=t.substring(Math.max(0,c-50),Math.min(a,c+50));thrownewError(`readTagExp returned undefined at position ${c}. Context: "${W}"`)}letl=A.tagName,b=A.rawTagName,M=A.tagExp,z=A.attrExpPresent,O=A.closeIndex;if({tagName:l,tagExp:M}=DS(o.transformTagName,l,M,o),o.strictReservedNames&&(l===o.commentPropName||l===o.cdataPropName||l===o.textNodeName||l===o.attributesGroupName))thrownewError(`Invalid tag name: ${l}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));lety=r;y&&o.unpairedTagsSet.has(y.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());letE=!1;M.length>0&&M.lastIndexOf("/")===M.length-1&&(E=!0,l[l.length-1]==="/"?(l=l.substr(0,l.length-1),M=l):M=M.substr(0,M.length-1),z=l!==M);letB=null,q={},D;D=EJe(b),l!==e.tagname&&this.matcher.push(l,{},D),l!==M&&z&&(B=this.buildAttributesMap(M,this.matcher,l),B&&(q=OJe(B,o))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());letx=c;if(this.isCurrentNodeStopNode){letW="";if(E)c=A.closeIndex;elseif(o.unpairedTagsSet.has(l))c=A.closeIndex;else{letae=this.readStopNodeData(t,b,O+1);if(!ae)thrownewError(`Unexpected end of ${b}`);c=ae.i,W=ae.tagContent}let_=newAr(l);B&&(_[":@"]=B),_.add(o.textNodeName,W),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,_,this.readonlyMatcher,x)}else{if(E){({tagName:l,tagExp:M}=DS(o.transformTagName,l,M,o));letW=newAr(l);B&&(W[":@"]=B),this.addChild(r,W,this.readonlyMatcher,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1}elseif(o.unpairedTagsSet.has(l)){letW=newAr(l);B&&(W[":@"]=B),this.addChild(r,W,this.readonlyMatcher,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=A.closeIndex;continue}else{letW=newAr(l);if(this.tagsNodeStack.length>o.maxNestedTags)thrownewError("Maximum nested tags exceeded");this.tagsNodeStack.push(r),B&&(W[":@"]=B),this.addChild(r,W,this.readonlyMatcher,x),r=W}n="",c=O}}}elsen+=t[c];returne.child},"parse
${c}:${decodeURIComponent(i[c])}`}returnn}};vars1=classextendsXu{static{s(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){returnnewiM(e,r,this)}computeHMACSHA256(e){return(0,wne.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};varP1=ui("storage-common");varNn;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Nn||(Nn={}));varlc={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Nn.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void0},tYe=newYr("The operation was aborted."),sM=classextendsbi{static{s(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=lc){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:lc.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):lc.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:lc.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:lc.maxRetryDelayInMs):lc.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:lc.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:lc.secondaryHost}}asyncsendRequest(e){returnthis.attemptSendRequest(e,!1,1)}asyncattemptSendRequest(e,r,n){leto=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;i||(o.url=bE(o.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(o.url=Ac(o.url,Xs.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));leta;try{if(P1.info(`RetryPolicy: =====> Try=${n}${i?"Primary":"Secondary"}`),a=awaitthis._nextPolicy.sendRequest(o),!this.shouldRetry(i,n,a))returna;r=r||!i&&a.status===404}catch(c){if(P1.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(i,n,a,c))throwc}returnawaitthis.delay(i,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,o){if(r>=this.retryOptions.maxTries)returnP1.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;leti=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(o){for(letaofi)if(o.name.toUpperCase().includes(a)||o.message.toUpperCase().includes(a)||o.code&&o.code.toString().toUpperCase()===a)returnP1.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(n||o){leta=n?n.status:o?o.statusCode:0;if(!e&&a===404)returnP1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)returnP1.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){leta=n.headers.get(De.X_MS_CopySourceErrorCode);if(a!==void0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}returno?.code==="PARSE_ERROR"&&o?.message.startsWith('Error "Error: Unclosed root tag')?(P1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}asyncdelay(e,r,n){leto=0;if(e)switch(this.retryOptions.retryPolicyType){caseNn.EXPONENTIAL:o=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;caseNn.FIXED:o=this.retryOptions.retryDelayInMs;break}elseo=Math.random()*1e3;returnP1.info(`RetryPolicy: Delay for ${o}ms`),mE(o,n,tYe)}};varaM=class{static{s(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){returnnewsM(e,r,this.retryOptions)}};varrYe="storageBrowserPolicy";functionSne(){return{name:rYe,asyncsendRequest(t,e){returnf0||((t.method==="GET"||t.method==="HEAD")&&(t.url=Ac(t.url,Xs.Parameters.FORCE_BROWSER_NO_CACHE,newDate().getTime().toString())),t.headers.delete(De.COOKIE),t.headers.delete(De.CONTENT_LENGTH)),e(t)}}}s(Sne,"storageBrowserPolicy");varnYe="StorageCorrectContentLengthPolicy";functionFne(){functiont(e){e.body&&(
`}),c}s(n,"getCanonicalizedHeadersString");function o(i){let a=fE(i.url)||"/",c="";c+=`/${t.accountName}${a}`;let u=ME(i.url),p={};if(u){let A=[];for(let l in u)if(Object.prototype.hasOwnProperty.call(u,l)){let b=l.toLowerCase();p[b]=u[l],A.push(b)}A.sort();for(let l of A)c+=`
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:newBo(t.version,i,n,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:o}}s(Aje,"generateBlobSASQueryParameters20150405");functionlje(t,e){if(t=tp(t),!t.identifier&&!(t.permissions&&t.expiresOn))thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=wi.parse(t.permissions.toString()).toString():o=Si.parse(t.permissions.toString()).toString());leti=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}s(lje,"generateBlobSASQueryParameters20181109");functiondje(t,e){if(t=tp(t),!t.identifier&&!(t.permissions&&t.expiresOn))thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=wi.parse(t.permissions.toString()).toString():o=Si.parse(t.permissions.toString()).toString());leti=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void0,void0,void0,t.encryptionScope),stringToSign:i}}s(dje,"generateBlobSASQueryParameters20201206");functionbje(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=wi.parse(t.permissions.toString()).toString():o=Si.parse(t.permissions.toString()).toString());leti=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}s(bje,"generateBlobSASQueryParametersUDK20181109");functionfje(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=wi.parse(t.permissions.toString()).toString():o=Si.parse(t.permissions.toString()).toString());leti=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}s(fje,"generateBlobSASQueryParametersUDK20200210");functionMje(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=wi.parse(t.permissions.toString()).toString():o=Si.parse(t.permissions.toString()).toString());leti=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}s(Mje,"generateBlobSASQueryParametersUDK20201206");functionmje(t,e){if(t=tp(t),!t.permissions||!t.expiresOn)thrownewRangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");letr="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));leto;t.permissions&&(t.blobName?o=wi.parse(t.permissions.toString()).toString():o=Si.parse(t.permissions.toString()).toString());leti=[o||"",t.startsOn?M0(t.startsOn,!1):"",t.expiresOn?M0(t.expiresOn,!1):"",ep(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?M0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?M0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void0,t.correlationId,void0,t.delegatedUserObjectId,t.ipRange?yo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:newBo(t.version,a,o,void0,void0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}s(mje,"generateBlobSASQueryParametersUDK20250705");functionep(t,e,r){letn=[`/blob/${t}/${e}`];returnr&&n.push(`/${r}`),n.join("")}s(ep,"getCanonicalName");functiontp(t){lete=t.version?t.version:OE;if(t.snapshotTime&&e<"2018-11-09")throwRangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void0&&t.snapshotTime)throwRangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void0&&t.versionId)throwRangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throwRangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throwRangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throwRangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throwRangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throwRangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throwRangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throwRangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");returnt.version=e,t}s(tp,"SASSignatureValuesSanityCheckAndAutofill");vargM=class{static{s(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;getleaseId(){returnthis._leaseId}geturl(){returnthis._url}constructor(e,r){letn=e.storageClientContext;this._url=e.url,e.name===void0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=Sl()),this._leaseId=r}asyncacquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==go||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==go||r.conditions?.tagConditions))thrownewRangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");returnAe.withSpan("BlobLeaseClient-acquireLease",r,asyncn=>be(awaitthis._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}asyncchangeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==go||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==go||r.conditions?.tagConditions))thrownewRangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");returnAe.withSpan("BlobLeaseClient-changeLease",r,asyncn=>{leto=be(awaitthis._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));returnthis._leaseId=e,o})}asyncreleaseLease(e={}){if(this._isContainer&&(e.conditions?.i
Ifyouareusingself-hostedrunners,pleasemakesureyourrunnerhasaccesstoallGitHubendpoints:https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};Kl.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var ip=class extends Error{static{s(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries.
Moreinfoonstoragelimits:https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};ip.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var NM=class extends Error{static{s(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var DKe=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})},FT=class{static{s(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,o=(e/(1024*1024)/(n/1e3)).toFixed(1);S(`Sent ${e} of ${this.contentLength} (${r}%), ${o} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=s(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function Jie(t,e,r){return DKe(this,void 0,void 0,function*(){var n;let o=new ta(t),i=o.getBlockBlobClient(),a=new FT((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),N(`BlobClient: ${o.name}:${o.accountName}:${o.containerName}`);let u=yield i.uploadFile(e,c);if(u._response.status>=400)throw new qC(`uploadCacheArchiveSDK: upload failed with status code ${u._response.status}`);return u}catch(u){throw r0(`uploadCacheArchiveSDK: internal error uploading cache archive: ${u.message}`),u}finally{a.stopDisplayTimer()}})}s(Jie,"uploadCacheArchiveSDK");var $ie=w(require("buffer"),1),Fi=w(require("fs"),1),jie=w(require("stream"),1),Kie=w(require("util"),1);var DC=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})};function IC(t){return t?t>=200&&t<300:!1}s(IC,"isSuccessStatusCode");function IKe(t){return t?t>=500:!0}s(IKe,"isServerErrorStatusCode");function RKe(t){return t?[i1.BadGateway,i1.ServiceUnavailable,i1.GatewayTimeout].includes(t):!1}s(RKe,"isRetryableStatusCode");function NKe(t){return DC(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}s(NKe,"sleep");function Yie(t,e,r){return DC(this,arguments,void 0,function*(n,o,i,a=KO,c=ZO,u=void 0){let p="",A=1;for(;A<=a;){let l,b,M=!1;try{l=yield o()}catch(z){u&&(l=u(z)),M=!0,p=z.message}if(l&&(b=i(l),!IKe(b)))return l;if(b&&(M=RKe(b),p=`Cache service responded with ${b}`),N(`${n} - Attempt ${A} of ${a} failed with error: ${p}`),!M){N(`${n} - Error is not retryable`);break}yield NKe(c),A++}throw Error(`${n} failed: ${p}`)})}s(Yie,"retry");function wM(t,e){return DC(this,arguments,void 0,function*(r,n,o=KO,i=ZO){return yield Yie(r,n,a=>a.statusCode,o,i,a=>{if(a instanceof ii)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}s(wM,"retryTypedResponse");function Zl(t,e){return DC(this,arguments,void 0,function*(r,n,o=KO,i=ZO){return yield Yie(r,n,a=>a.message.statusCode,o,i)})}s(Zl,"retryHttpClientResponse");var xn=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a
Othercacheswithsimilarkey:`);for(let c of i?.artifactCaches||[])N(`CacheKey:${c?.cacheKey},CacheVersion:${c?.cacheVersion},CacheScope:${c?.scope},CacheCreated:${c?.creationTime}`)}}})}s(LKe,"printCachesListForDiagnostics");function vT(t,e,r){return fr(this,void 0,void 0,function*(){let n=new cse.URL(t),o=rse(r);n.hostname.endsWith(".blob.core.windows.net")?o.useAzureSdk?yield ese(t,e,o):o.concurrentBlobDownloads?yield Zie(t,e,o):yield NC(t,e):yield NC(t,e)})}s(vT,"downloadCache");function pse(t,e,r){return fr(this,void 0,void 0,function*(){let n=TT(),o=Cl(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:o,cacheSize:r?.cacheSize};return yield wM("reserveCache",()=>fr(this,void 0,void 0,function*(){return n.postJson(FM("caches"),i)}))})}s(pse,"reserveCache");function ase(t,e){return`bytes${t}-${e}/*`}s(ase,"getContentRange");function _Ke(t,e,r,n,o){return fr(this,void 0,void 0,function*(){N(`Uploading chunk of size ${o-n+1} bytes at offset ${n} with content range: ${ase(n,o)}`);let i={"Content-Type":"application/octet-stream","Content-Range":ase(n,o)},a=yield Zl(`uploadChunk (start: ${n}, end: ${o})`,()=>fr(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!IC(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}s(_Ke,"uploadChunk");function QKe(t,e,r,n){return fr(this,void 0,void 0,function*(){let o=oi(r),i=FM(`caches/${e.toString()}`),a=e2.openSync(r,"r"),c=WT(n),u=s6("uploadConcurrency",c.uploadConcurrency),p=s6("uploadChunkSize",c.uploadChunkSize),A=[...new Array(u).keys()];N("Awaiting all uploads");let l=0;try{yield Promise.all(A.map(()=>fr(this,void 0,void 0,function*(){for(;l<o;){let b=Math.min(o-l,p),M=l,z=l+b-1;l+=p,yield _Ke(t,i,()=>e2.createReadStream(r,{fd:a,start:M,end:z,autoClose:!1}).on("error",O=>{throw new Error(`Cache upload failed because file read failed with ${O.message}`)}),M,z)}})))}finally{e2.closeSync(a)}})}s(QKe,"uploadFile");function PKe(t,e,r){return fr(this,void 0,void 0,function*(){let n={size:r};return yield wM("commitCache",()=>fr(this,void 0,void 0,function*(){return t.postJson(FM(`caches/${e.toString()}`),n)}))})}s(PKe,"commitCache");function LT(t,e,r,n){return fr(this,void 0,void 0,function*(){if(WT(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Jie(r,e,n)}else{let i=TT();N("Upload cache"),yield QKe(i,t,e,n),N("Commiting cache");let a=oi(e);S(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield PKe(i,t,a);if(!IC(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);S("Cache saved successfully")}})}s(LT,"saveCache");var oae=w(jse(),1),D1=w(q1(),1),tn=w(q1(),1),pp=w(q1(),1),Ap=w(q1(),1),lp=w(q1(),1);var Sv=w(q1(),1),Fv=w(q1(),1),tae=w(q1(),1),rae=w(q1(),1),nae=w(q1(),1);var Rv=w(q1(),1),Nv=w(q1(),1),Kse=w(q1(),1),Zse=w(q1(),1),eae=w(q1(),1);var wv=class extends eae.MessageType{static{s(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,Zse.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Kse.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,o){let i=o??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,u]=e.tag();switch(c){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let p=n.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${u}) for ${this.typeName}`);let A=e.skip(u);p!==!1&&(p===!0?Nv.UnknownFieldHandler.onRead:p)(this.typeName,i,c,u,A)}}return i}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,Rv.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,Rv.WireType.Varint).int64(e.permission);let o=n.writeUnknownFields;return o!==!1&&(o==!0?Nv.UnknownFieldHandler.onWrite:o)(this.typeName,e,r),r}},my=new wv;var Wv=class extends nae.Mess
`));let n=yield Yv(r,"create");yield $v(n,t)})}s(Kv,"createTar");var m2=function(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return s(o,"adopt"),new(r||(r=Promise))(function(i,a){function c(A){try{p(n.next(A))}catch(l){a(l)}}s(c,"fulfilled");function u(A){try{p(n.throw(A))}catch(l){a(l)}}s(u,"rejected");function p(A){A.done?i(A.value):o(A.value).then(c,u)}s(p,"step"),p((n=n.apply(t,e||[])).next())})},Io=class t extends Error{static{s(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},dp=class t extends Error{static{s(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},Zv="cache write denied:",M2=class t extends dp{static{s(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},Oy=class t extends Error{static{s(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function cae(t){if(!t||t.length===0)throw new Io("Path Validation Error: At least one directory or file path is required")}s(cae,"checkPaths");function eL(t){if(t.length>512)throw new Io(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Io(`Key Validation Error: ${t} cannot contain commas.`)}s(eL,"checkKey");function tL(){return SM()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}s(tL,"isFeatureAvailable");function uae(t,e,r,n){return m2(this,arguments,void 0,function*(o,i,a,c,u=!1){let p=SM();return N(`Cache service version: ${p}`),cae(o),p==="v2"?yield r00(o,i,a,c,u):yield t00(o,i,a,c,u)})}s(uae,"restoreCache");function t00(t,e,r,n){return m2(this,arguments,void 0,function*(o,i,a,c,u=!1){a=a||[];let p=[i,...a];if(N("Resolved Keys:"),N(JSON.stringify(p)),p.length>10)throw new Io("Key Validation Error: Keys are limited to a maximum of 10.");for(let b of p)eL(b);let A=yield wf(),l="";try{let b=yield use(p,o,{compressionMethod:A,enableCrossOsArchive:u});if(!b?.archiveLocation)return;if(c?.lookupOnly)return S("Lookup only - skipping download"),b.cacheKey;l=YM.join(yield Rf(),nc(A)),N(`Archive Path: ${l}`),yield vT(b.archiveLocation,l,c),vs()&&(yield JM(l,A));let M=oi(l);return S(`Cache Size: ~${Math.round(M/(1024*1024))} MB (${M} B)`),yield jv(l,A),S("Cache restored successfully"),b.cacheKey}catch(b){let M=b;if(M.name===Io.name)throw b;M instanceof ii&&typeof M.statusCode=="number"&&M.statusCode>=500?ll(`Failed to restore: ${b.message}`):r0(`Failed to restore: ${b.message}`)}finally{try{yield Nf(l)}catch(b){N(`Failed to delete archive: ${b}`)}}})}s(t00,"restoreCacheV1");function r00(t,e,r,n){return m2(this,arguments,void 0,function*(o,i,a,c,u=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let p=[i,...a];if(N("Resolved Keys:"),N(JSON.stringify(p)),p.length>10)throw new Io("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of p)eL(l);let A="";try{let l=Jv(),b=yield wf(),M={key:i,restoreKeys:a,version:Cl(o,b,u)},z=yield l.GetCacheEntryDownloadURL(M);if(!z.ok){N(`Cache not found for version ${M.version} of keys: ${p.join(", ")}`);return}if(M.key!==z.matchedKey?S(`Cache hit for restore-key: ${z.matchedKey}`):S(`Cache hit for: ${z.matchedKey}`),c?.lookupOnly)return S("Lookup only - skipping download"),z.matchedKey;A=YM.join(yield Rf(),nc(b)),N(`Archive path: ${A}`),N(`Starting download of archive to: ${A}`),yield vT(z.signedDownloadUrl,A,c);let y=oi(A);return S(`Cache Size: ~${Math.round(y/(1024*1024))} MB (${y} B)`),vs()&&(yield JM(A,b)),yield jv(A,b),S("Cache restored successfully"),z.matchedKey}catch(l){let b=l;if(b.name===Io.name)throw l;b instanceof ii&&typeof b.statusCode=="number"&&b.statusCode>=500?ll(`Failed to restore: ${l.message}`):r0(`Failed to restore: ${l.message}`)}finally{try{A&&(yield Nf(A))}catch(l){N(`Failed to delete archive: ${l}`)}}})}s(r00,"restoreCacheV2");function rL(t,e,r){return m2(this,arguments,void 0,function*(n,o,i,a=!1)
`)}s(K00,"_buildMessageForResponseErrors");var Z00=class extends Error{static{s(this,"GraphqlResponseError")}constructor(t,e,r){super(K00(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},e10=["method","baseUrl","url","headers","request","query","mediaType","operationName"],t10=["query","method","url"],$ae=/\/api\/v3\/?$/;function r10(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(t10.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,o=Object.keys(n).reduce((a,c)=>e10.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),i=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return $ae.test(i)&&(o.url=i.replace($ae,"/api/graphql")),t(o).then(a=>{if(a.data.errors){let c={};for(let u of Object.keys(a.headers))c[u]=a.headers[u];throw new Z00(o,c,a.data)}return a.data.data})}s(r10,"graphql");function fL(t,e){let r=t.defaults(e);return Object.assign(s((o,i)=>r10(r,o,i),"newApi"),{defaults:fL.bind(null,r),endpoint:r.endpoint})}s(fL,"withDefaults");var Oe1=fL(ZM,{headers:{"user-agent":`octokit-graphql.js/${j00} ${Oc()}`},method:"POST",url:"/graphql"});function jae(t){return fL(t,{method:"POST",url:"/graphql"})}s(jae,"withCustomRequest");var ML="(?:[a-zA-Z0-9_-]+)",Kae="\\.",Zae=new RegExp(`^${ML}${Kae}${ML}${Kae}${ML}$`),n10=Zae.test.bind(Zae);async function o10(t){let e=n10(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}s(o10,"auth");function i10(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}s(i10,"withAuthorizationPrefix");async function s10(t,e,r,n){let o=e.endpoint.merge(r,n);return o.headers.authorization=i10(t),e(o)}s(s10,"hook");var ece=s(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(o10.bind(null,e),{hook:s10.bind(null,e)})},"createTokenAuth2");var mL="7.0.6";var tce=s(()=>{},"noop"),a10=console.warn.bind(console),c10=console.error.bind(console);function u10(t={}){return typeof t.debug!="function"&&(t.debug=tce),typeof t.info!="function"&&(t.info=tce),typeof t.warn!="function"&&(t.warn=a10),typeof t.error!="function"&&(t.error=c10),t}s(u10,"createLogger");var rce=`octokit-core.js/${mL} ${Oc()}`,Wy=class{static{s(this,"Octokit")}static VERSION=mL;static defaults(e){return class extends this{static{s(this,"OctokitWithDefaults")}constructor(...n){let o=n[0]||{};if(typeof e=="function"){super(e(o));return}super(Object.assign({},e,o,o.userAgent&&e.userAgent?{userAgent:`${o.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{s(this,"NewOctokit")}static plugins=r.concat(e.filter(o=>!r.includes(o)))}}constructor(e={}){let r=new Rae.Collection,n={baseUrl:ZM.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${rce}`:rce,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=ZM.defaults(n),this.graphql=jae(this.request).defaults(n),this.log=u10(e.log),this.hook=r,e.authStrategy){let{authStrategy:i,...a}=e,c=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},e.auth));r.wrap("request",c.hook),this.auth=c}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let i=ece(e.auth);r.wrap("request",i.hook),this.auth=i}let o=this.constructor;for(let i=0;i<o.plugins.length;++i)
`,a).length:l,p?(c===null?0:c.length)+u.length:0,p?u.length+l:0);return b<M},"__needMoreData"),parse:s(function(n,o,i,a){let{bom:c,comment_no_infix:u,delimiter_auto:p,encoding:A,from_line:l,ltrim:b,max_record_size:M,raw:z,relax_quotes:O,rtrim:y,skip_empty_lines:E,to:B,to_line:q}=this.options,{comment:D,escape:x,quote:W,record_delimiter:_}=this.options,{bomSkipped:ae,delimiterDiscovered:Se,delimiterBufPrevious:xe,rawBuffer:Ne,escapeIsQuote:Ce}=this.state;if(!Se&&p){let j;if(xe===void 0?j=n:xe!==void 0&&n===void 0?j=xe:j=Buffer.concat([xe,n]),n=void 0,o||j.length>p.size)this.options.delimiter=[Buffer.from(dle(j,this.options.delimiter_auto))],this.state.previousBuf=j,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=j;return}}let{previousBuf:we}=this.state,k;if(we===void 0)if(n===void 0){a();return}else k=n;else we!==void 0&&n===void 0?k=we:k=Buffer.concat([we,n]);if(ae===!1)if(c===!1)this.state.bomSkipped=!0;else if(k.length<3){if(o===!1){this.state.previousBuf=k;return}}else{for(let j in T2)if(T2[j].compare(k,0,T2[j].length)===0){let $e=T2[j].length;this.state.bufBytesStart+=$e,k=k.slice($e);let m1=x2({...this.original_options,encoding:j});for(let ze in m1)this.options[ze]=m1[ze];({comment:D,escape:x,quote:W}=this.options);break}this.state.bomSkipped=!0}let Te=k.length,T;for(T=0;T<Te&&!this.__needMoreData(T,Te,o);T++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),q!==-1&&this.info.lines>q){this.state.stop=!0,a();return}this.state.quoting===!1&&_.length===0&&this.__autoDiscoverRecordDelimiter(k,T)&&(_=this.options.record_delimiter);let j=k[T];if(z===!0&&Ne.append(j),(j===Xs0||j===Vs0)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(x!==null&&this.state.quoting===!0&&this.__isEscape(k,T,j)&&T+x.length<Te)if(Ce){if(this.__isQuote(k,T+x.length)){this.state.escaping=!0,T+=x.length-1;continue}}else{this.state.escaping=!0,T+=x.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(k,T))if(this.state.quoting===!0){let ze=k[T+W.length],D0=y&&this.__isCharTrimable(k,T+W.length),je=D!==null&&this.__compareBytes(D,k,T+W.length,ze),X=this.__isDelimiter(k,T+W.length,ze),Rt=_.length===0?this.__autoDiscoverRecordDelimiter(k,T+W.length):this.__isRecordDelimiter(ze,k,T+W.length);if(x!==null&&this.__isEscape(k,T,j)&&this.__isQuote(k,T+x.length))T+=x.length-1;else if(!ze||X||Rt||je||D0){this.state.quoting=!1,this.state.wasQuoting=!0,T+=W.length-1;continue}else if(O===!1){let Nt=this.__error(new Je("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(ze)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Nt!==void 0)return Nt}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(W),T+=W.length-1}else if(this.state.field.length!==0){if(O===!1){let ze=this.__infoField(),D0=Object.keys(T2).map(X=>T2[X].equals(this.state.field.toString())?X:!1).filter(Boolean)[0],je=this.__error(new Je("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(ze.column)} at line ${ze.lines}, value is ${JSON.stringify(this.state.field.toString(A))}`,D0?`(${D0} bom)`:void 0],this.options,ze,{field:this.state.field}));if(je!==void 0)return je}}else{this.state.quoting=!0,T+=W.length-1;continue}if(this.state.quoting===!1){let ze=this.__isRecordDelimiter(j,k,T);if(ze!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=l){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),T+=ze-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,T+=ze-1;continue}this.info.bytes=this.state.bufBytesStart+T;let X=this.__onField();if(X!==void 0)return
More info: ${u.url}`);let M=u.range&&u.range.length>0?u.range[0]?.start.line:void 0,z=!1;for(let O of a)if(O.remote||O.path.endsWith(p)&&O.content===A){c.push({title:l,message:b,file:O.path,startLine:M}),z=!0;break}z||N(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${p}: ${l}`)}return c}};var yp=w(require("fs"),1),K_=w(require("path"),1);var L4=class t{static{s(this,"Build")}buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new S0,this.iidFilename=`build-iidfile-${l0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${l0.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),n=e?.attrs||{},o=Object.entries(n).filter(([M])=>!r.has(M)),i=l0.parseBoolOrDefault(n["fetch-by-commit"]),a=e?.ref||n.ref||Vt.ref;a.startsWith("refs/")?a.startsWith("refs/pull/")&&l0.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(a=a.replace(/\/merge$/g,"/head")):a=`refs/heads/${a}`;let c=`${A0.serverURL}/${Vt.repo.owner}/${Vt.repo.repo}.git`,u=e?.checksum||n.checksum,p=e?.subdir||n.subdir,A=e?.format;if(!A){if(A="fragment",o.length>0)A="query";else if(l0.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(A="query")}catch{}}let l=Vt.sha||a;a.startsWith("refs/pull/")&&a.endsWith("/head")&&(l=typeof Vt.payload.pull_request?.head?.sha=="string"?Vt.payload.pull_request.head.sha:a);let b=u||l;if(A==="query"){let M=[`ref=${i||u?a:b}`],z=i?b:u;z&&M.push(`checksum=${z}`),p&&p!=="."&&M.push(`subdir=${p}`);for(let[O,y]of o)M.push(`${O}=${y}`);return`${c}?${M.join("&")}`}return`${c}#${b}${p&&p!=="."?`:${p}`:""}`}getImageIDFilePath(){return K_.default.join(u0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(yp.default.existsSync(e))return yp.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return K_.default.join(u0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!yp.default.existsSync(e))return;let r=yp.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,n]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${n}`}static resolveSecretFile(e){let[r,n]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${n}`}static resolveSecretEnv(e){let[r,n]=t.parseSecretKvp(e);return`id=${r},env=${n}`}static resolveSecret(e,r){let[n,o]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!yp.default.existsSync(o))throw new Error(`secret file ${o} not found`);return[n,o]}let i=u0.tmpName({tmpdir:u0.tmpDir()});return yp.default.writeFileSync(i,o),[n,i]}static getProvenanceInput(e){let r=kr(e);if(!r)return r;try{return $j(e)?`builder-id=${A0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${A0.workflowRunURL(!0)}`;let r=an(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of r)if(n.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return e;return`${e},builder-id=${A0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let n="registry",o="",i="",a=an(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let c of a){let u=c.toString().split(/(?<=^[^=]+?)=/).map(p=>p.trim());u[0]==="type"?n=u[1]:u[0]==="repository"?o=u[1]:u[0]==="ghtoken"&&(i=u[1])}return n==="gha"&&(o||(e=`${e},repository=${A0.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExpo
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let o of n){if(o.length==1&&!o[0].startsWith("type="))return e=="local";for(let[i,a]of o.map(c=>c.split("=").map(u=>u.trim())))if(i=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let n=an(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let o of n)for(let[i,a]of o.map(c=>c.split("=").map(u=>u.trim())))if(i=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=an(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),n=[];for(let o of r)for(let i of o)try{let a=l0.parseBool(i);n.push(`disabled=${!a}`)}catch{n.push(i)}return n.join(",")}static hasGitAuthTokenSecret(e,r){for(let n of e){if(r&&n.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(n.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let n=e.indexOf("="),o=e.substring(0,n),i=e.substring(n+1);if(o.length==0||i.length==0)throw new Error(`${e} is not a valid secret`);return r&&Ko(i),[o,i]}};var Z_=w(require("fs"),1),zle=w(require("path"),1);var _4=class t{static{s(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new S0,this.metadataFilename=`bake-metadata-${l0.generateRandomString()}.json`}getMetadataFilePath(){return zle.default.join(u0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!Z_.default.existsSync(e))return;let r=Z_.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let n in e)"buildx.build.ref"in e[n]&&r.push(e[n]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});let n=["bake"],o,i=[],a=[...e.files||[],e.source];if(a){for(let u of a.map(p=>p?p.trim():""))if(u.length!=0){if(!l0.isValidRef(u)){i.push(u);continue}if(o)throw new Error("Only one remote bake definition can be defined");o=u}}o&&n.push(o);for(let u of i)n.push("--file",u);if(e.overrides)for(let u of e.overrides)n.push("--set",u);if(e.vars)for(let u of e.vars)n.push("--var",u);if(e.allow)for(let u of e.allow)n.push("--allow",u);e.call&&n.push("--call",e.call),e.load&&n.push("--load"),e.noCache&&n.push("--no-cache"),e.provenance&&n.push("--provenance",e.provenance),e.push&&n.push("--push"),e.sbom&&n.push("--sbom",e.sbom);let c=await this.buildx.getCommand([...n,"--print",...e.targets||[]]);return await Ee.getExecOutput(c.command,c.args,r).then(u=>{if(u.stderr.length>0&&u.exitCode!=0)throw new Error(`cannot parse bake definitions: ${u.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(u.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let n in r.target){let o=r.target[n];o.attest&&Array.isArray(o.attest)&&(o.attest=o.attest.map(i=>t.parseAttestEntry(i))),o["cache-from"]&&Array.isArray(o["cache-from"])&&(o["cache-from"]=o["cache-from"].map(i=>t.parseCacheEntry(i))),o["cache-to"]&&Array.isArray(o["cache-to"])&&(o["cache-to"]=o["cache-to"].map(i=>t.parseCacheEntry(i))),o.output&&Array.isArray(o.output)&&(o.output=o.output.map(i=>t.parseExportEntry(i))),o.secret&&Array.isArray(o.secret)&&(o.secret=o.secret.map(i=>t.parseSecretEntry(i))),o.ssh&&Array.isArray(o.ssh)&&(o.ssh=o.ssh.map(i=>t.parseSSHEntry(i)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},n=an(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let o of n){let[i,a]=o.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(i){case"type":r.type=a;break;case"disabled":r.disabled=l0.parseBool(a);break;default:r[i]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},n=an(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&!n[0].includes("="))return r.type="registry",r.ref=n[0],r;for(let o of n){let[i,a]=o.toString().
`)[0])}static async isHeadDetached(){return await t.exec(["branch","--show-current"]).then(e=>e.length==0)}static async getDetachedRef(){let e=await t.exec(["show","-s","--pretty=%D"]);N(`detached HEAD ref: ${e}`);let r=e.replace(/^grafted, /,"").trim();if(r==="HEAD")return await t.inferRefFromHead();let n=r.match(/^HEAD, (.*)$/);if(!n||!n[1])throw new Error(`Cannot find detached HEAD ref in "${e}"`);let o=n[1].trim();if(o.startsWith("tag: "))return await t.findDetachedTagRef(o,e);if(o.match(/^pull\/\d+\/(head|merge)$/))return`refs/${o}`;let a=o.match(/^[^/]+\/[^/]+, (.+)$/);if(a)return`refs/heads/${a[1].trim()}`;let c=o.match(/^[^/]+\/(.+)$/);if(c)return`refs/heads/${c[1].trim()}`;throw new Error(`Unsupported detached HEAD ref in "${e}"`)}static async exec(e=[]){return await Ee.getExecOutput("git",e,{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitCode!=0)throw new Error(r.stderr);return r.stdout.trim()})}static async inferRefFromHead(){let e=await t.findContainingRef("refs/heads/");if(e)return e;let r=await t.findContainingRef("refs/remotes/");if(r){let i=r.match(/^refs\/remotes\/[^/]+\/(.+)$/);return i?`refs/heads/${i[1]}`:r}let n=await t.exec(["tag","--contains","HEAD"]),[o]=n.split(`
`).map(i=>i.trim()).filter(i=>i.length>0);if(o)return`refs/tags/${o}`;throw new Error("Cannot infer ref from detached HEAD")}static async findDetachedTagRef(e,r){let o=(await t.exec(["for-each-ref","--format=%(refname)","--points-at","HEAD","refs/tags/"])).split(`
`).map(i=>i.trim()).filter(i=>i.length>0).sort((i,a)=>a.length-i.length);for(let i of o){let a=`tag: ${i.slice(10)}`;if(e===a||e.startsWith(`${a}, `))return i}if(o.length===1)return o[0];throw new Error(`Cannot find detached tag ref in "${r}"`)}static async findContainingRef(e){let r=await t.exec(["for-each-ref","--format=%(refname)","--contains","HEAD","--sort=-committerdate",e]),[n]=r.split(`
${p}`),await new Promise(A=>setTimeout(A,Math.pow(2,a)*100));else throw i}else throw new Error(`Cosign verify command failed with: ${c.stderr.trim().split(/\r?\n/).filter(p=>p.length>0).pop()??"unknown error"}`)}throw i}async signProvenanceBlobs(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign provenance blobs");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n=await this.cosignSigningConfigArgs(e.noTransparencyLog),o=t.getProvenanceBlobs(e);for(let i of Object.keys(o))await ct(`Signing ${i}`,async()=>{let a=o[i],c=rs.default.join(rs.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),u=t.getProvenanceSubjects(a);if(u.length===0){r0(`No subjects found in provenance ${i}, skip signing.`);return}let p=rs.default.join(rs.default.dirname(i),u[0].name),A=["attest-blob","--yes","--oidc-provider","github-actions","--new-bundle-format","--statement",i,"--type",Wbe,"--bundle",c,...n];S(`[command]${this.cosign.binPath} ${[...A,p].join(" ")}`);let l=await Ee.getExecOutput(this.cosign.binPath,["--verbose",...A,p],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),b=es.parseCommandOutput(l.stderr.trim());if(l.exitCode!=0)if(b.errors&&b.errors.length>0){let z=b.errors.map(O=>`- [${O.code}] ${O.message} : ${O.detail}`).join(`
${z}`)}else throw new Error(`Cosign attest-blob command failed with: ${l.stderr.trim().split(/\r?\n/).filter(z=>z.length>0).pop()??"unknown error"}`);let M=t.parseBundle((0,dd.bundleFromJSON)(JSON.parse(ts.default.readFileSync(c,{encoding:"utf-8"}))));S("Provenance blob signed for:");for(let z of u){let[O,y]=Object.entries(z.digest)[0]||[];S(` - ${z.name} (${O}:${y})`)}M.tlogID&&S(`Attestation signature uploaded to Rekor transparency log: ${kp}?logIndex=${M.tlogID}`),S(`Sigstore bundle written to: ${c}`),r[i]={...M,bundlePath:c,subjects:u}})}catch(n){throw new Error(`Signing BuildKit provenance blobs failed: ${n.message}`)}return r}async verifySignedArtifacts(e,r){let n={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[o,i]of Object.entries(e)){let a=rs.default.dirname(o);await ct(`Verifying signature bundle ${i.bundlePath}`,async()=>{for(let c of i.subjects){let u=rs.default.join(a,c.name);S(`Verifying signed artifact ${u}`);let p=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??Wbe];(r.noTransparencyLog||!i.tlogID)&&p.push("--use-signed-timestamps","--insecure-ignore-tlog");let A=await Ee.getExecOutput(this.cosign.binPath,[...p,"--bundle",i.bundlePath,u],{ignoreReturnCode:!0});if(A.stderr.length>0&&A.exitCode!=0)throw new Error(A.stderr);n[u]={bundlePath:i.bundlePath,cosignArgs:p}}})}return n}async verifyArtifact(e,r,n){S("Verifying keyless verification bundle signature");let o=JSON.parse(ts.default.readFileSync(r,"utf-8")),i=(0,dd.bundleFromJSON)(o);S("Fetching Sigstore TUF trusted root metadata");let a=await Tbe.getTrustedRoot(),c=(0,bd.toTrustMaterial)(a);try{S("Verifying artifact signature");let u=(0,bd.toSignedEntity)(i,ts.default.readFileSync(e)),p=t.parseCertificate(i),A=i.verificationMaterial.tlogEntries,l=A.length>0?A[0].logIndex:void 0;if(n?.subjectAlternativeName&&n?.subjectAlternativeName instanceof RegExp){let z=p.subjectAltName?.replace(/^uri:/i,"");if(z){if(!z.match(n.subjectAlternativeName))throw new Error(`Signing certificate subjectAlternativeName "${z}" does not match expected pattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let M=new bd.Verifier(c).verify(u,{subjectAlternativeName:n?.subjectAlternativeName&&typeof n.subjectAlternativeName=="string"?n.subjectAlternativeName:void 0,extensions:n?.issuer?{issuer:n.issuer}:void 0});return N(`Sigstore.verifyArtifact signer: ${JSON.stringify(M)}`),{payload:o,certificate:p.toString(),tlogID:l}}catch(u){throw new Error(`Failed to verify artifact signature: ${u}`)}}static noTransparencyLog(e){return e??A0.context.payload.repository?.private??!1}async cosignSigningConfigArgs(e){let r=[],n=t.noTransparencyLog(e);return S(`Upload to transparency log: ${n?"disabled":"enabled"}`),await this.cosign.versionSatisfies(">=3.0.4")?await ct("Creating Sigstore protobuf signing config",async()=>{let o=u0.tmpName({template:"signing-config-XXXXXX.json",tmpdir:u0.tmpDir()}),i=["signing-config","create","--with-default-services=true",`--out=${o}`];n&&i.push("--no-default-rekor=true"),await Ee.exec(this.cosign.binPath,i,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),S(JSON.stringify(JSON.parse(ts.default.readFileSync(o,{encoding:"utf-8"})),null,2)),r.push(`--signing-config=${o}`)}):(r.push("--use-signing-config"),n&&r.push("--tlog-upload=false")),r}static getProvenanceBlobs(e){let r=rs.default.join(e.localExportDir,"provenance.json");if(ts.default.existsSync(r))return{[r]:ts.default.readFileSync(r)};let n=ts.default.readdirSync(e.localExportDir,{withFileTypes:!0}),o=n.filter(i=>i.isDirectory());if(o.length>0&&o.length===n.length&&o.every(i=>ts.default.existsSync(rs.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let a of o){let c=rs.default.join(e.localExportDir,a.name,"provenance.json");i[c]=ts.default.readFileSync(c)}return i}throw new Error(`No valid provenance.json found in ${e.
`,bakeTarget:kr("bake-target")||"docker-metadata-action",githubToken:kr("github-token")}}s(Pbe,"getInputs");async function kbe(t,e){switch(t){case"workflow":return await ed0(e);case"git":return await td0();default:throw new Error(`Invalidcontextsource:${t}`)}}s(kbe,"getContext");async function ed0(t){let e=A0.context;return/pull_request_target/.test(e.eventName)&&(e.ref=`refs/pull/${e.payload.number}/merge`),/true/i.test(process.env.DOCKER_METADATA_PR_HEAD_SHA||"")&&(/pull_request/.test(e.eventName)||/pull_request_target/.test(e.eventName))&&e.payload?.pull_request?.head?.sha!=null&&(e.sha=e.payload.pull_request.head.sha),{commitDate:await rd0(e.sha,t),...e}}s(ed0,"getContextFromWorkflow");async function td0(){let t=await pa.context();return{commitDate:await pa.commitDate(t.sha),...t}}s(td0,"getContextFromGit");async function rd0(t,e){let r=A0.context.payload;if(r.commits){let n=r.commits.find(o=>o.id===t)?.timestamp;if(n)return new Date(n)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let n=await e.github.octokit.rest.repos.getCommit({owner:A0.context.repo.owner,repo:A0.context.repo.repo,ref:t});if(n.data.commit.committer?.date)return new Date(n.data.commit.committer.date);throw new Error("Committer date not found")}catch(n){return N(`FailedtogetcommitdatefromGitHubAPI:${n.message}`),new Date}}s(rd0,"getCommitDateFromWorkflow");var Da=w(V_(),1),L4e=w(require("fs"),1),_4e=w(require("path"),1),Vh=w(Jbe(),1),pn=w(R4e(),1),_d=w(kn(),1);var Ye=class t extends Error{static{s(this,"CsvError")}constructor(e,r,n,...o){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let i of o)for(let a in i){let c=i[a];this[a]=Buffer.isBuffer(c)?c.toString(n.encoding):c==null?c:JSON.parse(JSON.stringify(c))}}};var Xh=s(function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},"is_object");var yD=s(function(t){let e=[];for(let r=0,n=t.length;r<n;r++){let o=t[r];if(o==null||o===!1)e[r]={disabled:!0};else if(typeof o=="string"||typeof o=="number")e[r]={name:`${o}`};else if(Xh(o)){if(typeof o.name!="string")throw new Ye("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property"name"isrequiredatposition${r}`,"when column is an object literal"]);e[r]=o}else throw new Ye("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got${JSON.stringify(o)}atposition${r}`])}return e},"normalize_columns_array");var Z7=class{static{s(this,"ResizeableBuffer")}constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let r=this.length+e.length;if(r>=this.size&&(this.resize(),r>=this.size))throw Error("INVALID_BUFFER_STATE");let n=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{let r=this.length++;r===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,r)}}append(e){let r=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let r=Buffer.allocUnsafe(this.size);this.buf.copy(r,0,0,e),this.buf=r}toString(e){return e?this.buf.toString(e,0,this.length):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},e9=Z7;var N4e=s(function(t){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((n,o)=>{let i=Buffer.from(String.fromCharCode(o),t.encoding);return o!==63&&i.length===1&&i[0]===63||n.push(i),n},[]),r=new Uint8Array(256);for(let n of e)r[n[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.isArray(
`,a).length:l,p?(c===null?0:c.length)+u.length:0,p?u.length+l:0);returnb<M},"__needMoreData"),parse:s(function(n,o,i,a){let{bom:c,comment_no_infix:u,delimiter_auto:p,encoding:A,from_line:l,ltrim:b,max_record_size:M,raw:z,relax_quotes:O,rtrim:y,skip_empty_lines:E,to:B,to_line:q}=this.options,{comment:D,escape:x,quote:W,record_delimiter:_}=this.options,{bomSkipped:ae,delimiterDiscovered:Se,delimiterBufPrevious:xe,rawBuffer:Ne,escapeIsQuote:Ce}=this.state;if(!Se&&p){letj;if(xe===void0?j=n:xe!==void0&&n===void0?j=xe:j=Buffer.concat([xe,n]),n=void0,o||j.length>p.size)this.options.delimiter=[Buffer.from(S4e(j,this.options.delimiter_auto))],this.state.previousBuf=j,this.state.delimiterBufPrevious=void0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=j;return}}let{previousBuf:we}=this.state,k;if(we===void0)if(n===void0){a();return}elsek=n;elsewe!==void0&&n===void0?k=we:k=Buffer.concat([we,n]);if(ae===!1)if(c===!1)this.state.bomSkipped=!0;elseif(k.length<3){if(o===!1){this.state.previousBuf=k;return}}else{for(letjinLd)if(Ld[j].compare(k,0,Ld[j].length)===0){let$e=Ld[j].length;this.state.bufBytesStart+=$e,k=k.slice($e);letm1=vd({...this.original_options,encoding:j});for(letzeinm1)this.options[ze]=m1[ze];({comment:D,escape:x,quote:W}=this.options);break}this.state.bomSkipped=!0}letTe=k.length,T;for(T=0;T<Te&&!this.__needMoreData(T,Te,o);T++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),q!==-1&&this.info.lines>q){this.state.stop=!0,a();return}this.state.quoting===!1&&_.length===0&&this.__autoDiscoverRecordDelimiter(k,T)&&(_=this.options.record_delimiter);letj=k[T];if(z===!0&&Ne.append(j),(j===X40||j===V40)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(x!==null&&this.state.quoting===!0&&this.__isEscape(k,T,j)&&T+x.length<Te)if(Ce){if(this.__isQuote(k,T+x.length)){this.state.escaping=!0,T+=x.length-1;continue}}else{this.state.escaping=!0,T+=x.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(k,T))if(this.state.quoting===!0){letze=k[T+W.length],D0=y&&this.__isCharTrimable(k,T+W.length),je=D!==null&&this.__compareBytes(D,k,T+W.length,ze),X=this.__isDelimiter(k,T+W.length,ze),Rt=_.length===0?this.__autoDiscoverRecordDelimiter(k,T+W.length):this.__isRecordDelimiter(ze,k,T+W.length);if(x!==null&&this.__isEscape(k,T,j)&&this.__isQuote(k,T+x.length))T+=x.length-1;elseif(!ze||X||Rt||je||D0){this.state.quoting=!1,this.state.wasQuoting=!0,T+=W.length-1;continue}elseif(O===!1){letNt=this.__error(newYe("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(ze)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Nt!==void0)returnNt}elsethis.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(W),T+=W.length-1}elseif(this.state.field.length!==0){if(O===!1){letze=this.__infoField(),D0=Object.keys(Ld).map(X=>Ld[X].equals(this.state.field.toString())?X:!1).filter(Boolean)[0],je=this.__error(newYe("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(ze.column)} at line ${ze.lines}, value is ${JSON.stringify(this.state.field.toString(A))}`,D0?`(${D0} bom)`:void0],this.options,ze,{field:this.state.field}));if(je!==void0)returnje}}else{this.state.quoting=!0,T+=W.length-1;continue}if(this.state.quoting===!1){letze=this.__isRecordDelimiter(j,k,T);if(ze!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=l){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),T+=ze-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,T+=ze-1;continue}this.info.bytes=this.state.bufBytesStart+T;letX=this.__onField();if(X!==void0)return
`,i),Buffer.from("\r",i)];e:for(let c=0;c<a.length;c++){let u=a[c].length;for(let p=0;p<u;p++)if(a[c][p]!==n[o+p])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:s(function(n){let{encoding:o,raw:i,skip_records_with_error:a}=this.options,c=typeof n=="string"?new Error(n):n;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(c,i?this.state.rawBuffer.toString(o):void 0)}catch(u){return u}return}else return c},"__error"),__infoDataSet:s(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:s(function(){let{columns:n,raw:o,encoding:i}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:o?this.state.rawBuffer.toString(i):void 0}},"__infoRecord"),__infoField:s(function(){let{columns:n}=this.options,o=Array.isArray(n),i=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:i,column:o===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var nA=s(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=BD(e),o=s(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),i=s(()=>{},"close"),a=n.parse(t,!0,o,i);if(a!==void 0)throw a;return r},"parse");function x4e(t){let e=[];if(t.length==1){let r=!1,n=nA(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let o of n){let i=o.toString().split("=").map(a=>a.trim());if(i.length==1)e.push({name:i[0],enable:!0});else{r=!0;break}}if(!r)return W4e(e)}e=[];for(let r of t){let n={name:"",enable:!0},o=nA(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of o){let a=i.toString().split("=").map(c=>c.trim());if(a.length==1)n.name=a[0];else{let c=a[0].toLowerCase(),u=a[1];switch(c){case"name":{n.name=u;break}case"enable":{if(!["true","false"].includes(u))throw new Error(`Invalidenableattributevalue:${r}`);n.enable=/true/i.test(u);break}default:throw new Error(`Unknownimageattribute:${r}`)}}}if(n.name.length==0)throw new Error(`Imagenameattributeempty:${r}`);e.push(n)}return W4e(e)}s(x4e,"Transform");function W4e(t){Iu("Processing images input");for(let e of t)S(`name=${e.name},enable=${e.enable}`);return Ru(),t}s(W4e,"output");var r9=(u=>(u.Schedule="schedule",u.Semver="semver",u.Pep440="pep440",u.Match="match",u.Edge="edge",u.Ref="ref",u.Raw="raw",u.Sha="sha",u))(r9||{}),qD=(n=>(n.Branch="branch",n.Tag="tag",n.PR="pr",n))(qD||{}),DD=(r=>(r.Short="short",r.Long="long",r))(DD||{}),t9=class{static{s(this,"Tag")}type;attrs;constructor(){this.attrs={}}toString(){let e=[`type=${this.type}`];for(let r in this.attrs)e.push(`${r}=${this.attrs[r]}`);return e.join(",")}},Y40={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function T4e(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let n of t)e.push($40(n));let r=e.sort((n,o)=>Number(n.attrs.priority)<Number(o.attrs.priority)?1:Number(n.attrs.priority)>Number(o.attrs.priority)?-1:0);Iu("Processing tags input");for(let n of r)S(n.toString());return Ru(),r}s(T4e,"Transform");function $40(t){let e=nA(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new t9;for(let n of e){let o=n.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim());if(o.length==1)r.attrs.value=o[0];else{let i=o[0].toLowerCase(),a=o[1];switch(i){case"type":{if(!Object.values(r9).includes(a))throw new Error(`Unknowntagtypeattribute:${a}`);r.type=a;break}default:{r.attrs[i]=a;break}}}}switch(r.type==null&&(r.type="raw"),r.type){case"schedule":{Object.prototype.hasOwnProperty.call(r.attrs,"pattern")||(r.attrs.pattern="nightly");break}case"semver":case"pep440":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missingpatternattributefor${t}`);Object.prototype.hasOwnProperty.