varPKe=Object.create;varSB=Object.defineProperty;varQKe=Object.getOwnPropertyDescriptor;varkKe=Object.getOwnPropertyNames;varUKe=Object.getPrototypeOf,GKe=Object.prototype.hasOwnProperty;varo=(t,e)=>SB(t,"name",{value:e,configurable:!0});varHKe=(t,e)=>()=>(t&&(e=t(t=0)),e);varb=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Lne=(t,e)=>{for(varrine)SB(t,r,{get:e[r],enumerable:!0})},XKe=(t,e,r,s)=>{if(e&&typeofe=="object"||typeofe=="function")for(letnofkKe(e))!GKe.call(t,n)&&n!==r&&SB(t,n,{get:()=>e[n],enumerable:!(s=QKe(e,n))||s.enumerable});returnt};var_=(t,e,r)=>(r=t!=null?PKe(UKe(t)):{},XKe(e||!t||!t.__esModule?SB(r,"default",{value:t,enumerable:!0}):r,t));varXne=b(Ih=>{"use strict";varCd0=require("net"),KKe=require("tls"),Z_=require("http"),Une=require("https"),ZKe=require("events"),Bd0=require("assert"),eZe=require("util");Ih.httpOverHttp=tZe;Ih.httpsOverHttp=rZe;Ih.httpOverHttps=sZe;Ih.httpsOverHttps=nZe;functiontZe(t){vare=newqu(t);returne.request=Z_.request,e}o(tZe,"httpOverHttp");functionrZe(t){vare=newqu(t);returne.request=Z_.request,e.createSocket=Gne,e.defaultPort=443,e}o(rZe,"httpsOverHttp");functionsZe(t){vare=newqu(t);returne.request=Une.request,e}o(sZe,"httpOverHttps");functionnZe(t){vare=newqu(t);returne.request=Une.request,e.createSocket=Gne,e.defaultPort=443,e}o(nZe,"httpsOverHttps");functionqu(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||Z_.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",o(function(s,n,i,a){for(varc=Hne(n,i,a),u=0,p=e.requests.length;u<p;++u){varl=e.requests[u];if(l.host===c.host&&l.port===c.port){e.requests.splice(u,1),l.request.onSocket(s);return}}s.destroy(),e.removeSocket(s)},"onFree"))}o(qu,"TunnelingAgent");eZe.inherits(qu,ZKe.EventEmitter);qu.prototype.addRequest=o(function(e,r,s,n){vari=this,a=eW({request:e},i.options,Hne(r,s,n));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)}o(u,"onFree");functionp(l){i.removeSocket(c),c.removeListener("free",u),c.removeListener("close",p),c.removeListener("agentRemove",p)}o(p,"onCloseOrRemove")})},"addRequest");qu.prototype.createSocket=o(function(e,r){vars=this,n={};s.sockets.push(n);vari=eW({},s.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")),Dl("making CONNECT request");vara=s.request(i);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",u),a.once("connect",p),a.once("error",l),a.end();functionc(A){A.upgrade=!0}o(c,"onResponse");functionu(A,d,h){process.nextTick(function(){p(A,d,h)})}o(u,"onUpgrade");functionp(A,d,h){if(a.removeAllListeners(),d.removeAllListeners(),A.statusCode!==200){Dl("tunneling socket could not be established, statusCode=%d",A.statusCode),d.destroy();varM=newError("tunneling socket could not be established, statusCode="+A.statusCode);M.code="ECONNRESET",e.request.emit("error",M),s.removeSocket(n);return}if(h.length>0){Dl("got illegal response body from proxy"),d.destroy();varM=newError("got illegal response body from proxy");M.code="ECONNRESET",e.request.emit("error",M),s.removeSocket(n);return}returnDl("tunneling connection has established"),s.sockets[s.sockets.indexOf(n)]=d,r(d)}o(p,"onConnect");functionl(A){a.removeAllListeners(),Dl(`tunneling socket could not be established, cause=%s
`);d.push(z),i+=z.byteLength,M&&(i=null),n=t,s=o(async function*(){for(let C of d)C.stream?yield*C.stream():yield C},"action"),a=`multipart/form-data;boundary=${u}`}else if(Zoe(t))n=t,i=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Sz.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:C0t(t)}if((typeof n=="string"||Sz.isBuffer(n))&&(i=Buffer.byteLength(n)),s!=null){let u;r=new ReadableStream({async start(){u=s(t)[Symbol.asyncIterator]()},async pull(p){let{value:l,done:A}=await u.next();if(A)queueMicrotask(()=>{p.close(),p.byobRequest?.respond(0)});else if(!sae(r)){let d=new Uint8Array(l);d.byteLength&&p.enqueue(d)}return p.desiredSize>0},async cancel(p){await u.return()},type:"bytes"})}return[{stream:r,source:n,length:i},a]}o(oae,"extractBody");function _0t(t,e=!1){return t instanceof ReadableStream&&(iL(!Sz.isDisturbed(t),"The body has already been consumed."),iL(!t.locked,"The stream is locked.")),oae(t,e)}o(_0t,"safelyExtractBody");function W0t(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}o(W0t,"cloneBody");function L0t(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(L0t,"throwIfAborted");function P0t(t){return{blob(){return Qh(this,r=>{let s=tae(this);return s===null?s="":s&&(s=v0t(s)),new S0t([r],{type:s})},t)},arrayBuffer(){return Qh(this,r=>new Uint8Array(r).buffer,t)},text(){return Qh(this,rae,t)},json(){return Qh(this,k0t,t)},formData(){return Qh(this,r=>{let s=tae(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let n=T0t(r,s);if(n==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new eae;return i[kh]=n,i}case"application/x-www-form-urlencoded":{let n=new URLSearchParams(r.toString()),i=new eae;for(let[a,c]of n)i.append(a,c);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return Qh(this,r=>new Uint8Array(r),t)}}}o(P0t,"bodyMixinMethods");function Q0t(t){Object.assign(t.prototype,P0t(t))}o(Q0t,"mixinBody");async function Qh(t,e,r){if(w0t.brandCheck(t,r),aae(t))throw new TypeError("Body is unusable: Body has already been read");L0t(t[kh]);let s=q0t(),n=o(a=>s.reject(a),"errorSteps"),i=o(a=>{try{s.resolve(e(a))}catch(c){n(c)}},"successSteps");return t[kh].body==null?(i(Buffer.allocUnsafe(0)),s.promise):(await I0t(t[kh].body,i,n),s.promise)}o(Qh,"consumeBody");function aae(t){let e=t[kh].body;return e!=null&&(e.stream.locked||Sz.isDisturbed(e.stream))}o(aae,"bodyUnusable");function k0t(t){return JSON.parse(rae(t))}o(k0t,"parseJSONFromBytes");function tae(t){let e=t[kh].headersList,r=R0t(e);return r==="failure"?null:r}o(tae,"bodyMimeType");cae.exports={extractBody:oae,safelyExtractBody:_0t,cloneBody:W0t,mixinBody:Q0t,streamRegistry:iae,hasFinalizationRegistry:nae,bodyUnusable:aae}});var Cae=b((M20,yae)=>{"use strict";var ve=require("node:assert"),We=lt(),{channels:uae}=wh(),aL=kW(),{RequestContentLengthMismatchError:Bd,ResponseContentLengthMismatchError:pae,RequestAbortedError:Mae,HeadersTimeoutError:U0t,HeadersOverflowError:G0t,SocketError:Gh,InformationalError:Hh,BodyTimeoutError:H0t,HTTPParserError:X0t,ResponseExceededMaxSizeError:V0t}=It(),{kUrl:gae,kReset:$s,kClient:pD,kParser:A0,kBlocking:vz,kRunning:z1,kPending:zae,kSize:lae,kWriting:Il,kQueue:_o,kNoRef:Nz,kKeepAliveDefaultTimeout:$0t,kHostHeader:j0t,kPendingIdx:Y0t,kRunningIdx:qi,kError:is,kPipelining:lD,kSocket:qd,kKeepAliveTimeoutValue:dD,kMaxHeadersSize:cL,kKeepAliveMaxTimeout:J0t,kKeepAliveTimeoutThreshold:K0t,kHeadersTimeout:Z0t,kBodyTimeout:e1t,kStrictContentLength:lL,kMaxRequests:Aae,kCounter:t1t,kMaxResponseSize:r1t,kOnError:dae,kResume:Fu,kHTTPContext:Oae}=E0(),vn=ioe(),fae=Buffer.alloc(0),aD=Buffer[Symbol.species],cD=We.addListener,s1t=We.removeAllListeners,Id=Symbol("kIdleSocketValidation"),Dd=Symbol("kIdleSocketValidationTimeout"),hL=Symbol("kSocketUsed"),uL;async function n1t(){let t=p
`}return uae.sendHeaders.hasSubscribers&&uae.sendHeaders.publish({request:e,headers:z,socket:h}),!u||d===0?bae(M,null,t,e,h,l,z,A):We.isBuffer(u)?bae(M,u,t,e,h,l,z,A):We.isBlobLike(u)?typeof u.stream=="function"?mae(M,u.stream(),t,e,h,l,z,A):A1t(M,u,t,e,h,l,z,A):We.isStream(u)?l1t(M,u,t,e,h,l,z,A):We.isIterable(u)?mae(M,u,t,e,h,l,z,A):ve(!1),!0}o(p1t,"writeH1");function l1t(t,e,r,s,n,i,a,c){ve(i!==0||r[z1]===0,"stream body cannot be pipelined");let u=!1,p=new fD({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:c,header:a}),l=o(function(M){if(!u)try{!p.write(M)&&this.pause&&this.pause()}catch(z){We.destroy(this,z)}},"onData"),A=o(function(){u||e.resume&&e.resume()},"onDrain"),d=o(function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!u){let M=new Mae;queueMicrotask(()=>h(M))}},"onClose"),h=o(function(M){if(!u){if(u=!0,ve(n.destroyed||n[Il]&&r[z1]<=1),n.off("drain",A).off("error",h),e.removeListener("data",l).removeListener("end",h).removeListener("close",d),!M)try{p.end()}catch(z){M=z}p.destroy(M),M&&(M.code!=="UND_ERR_INFO"||M.message!=="reset")?We.destroy(e,M):We.destroy(e)}},"onFinished");e.on("data",l).on("end",h).on("error",h).on("close",d),e.resume&&e.resume(),n.on("drain",A).on("error",h),e.errorEmitted??e.errored?setImmediate(()=>h(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>h(null)),(e.closeEmitted??e.closed)&&setImmediate(d)}o(l1t,"writeStream");function bae(t,e,r,s,n,i,a,c){try{e?We.isBuffer(e)&&(ve(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${a}content-length:${i}\r
`,"latin1"):(ve(i===null,"no body must not have content length"),n.write(`${a}\r
`,"latin1")),s.onRequestSent(),r[Fu]()}catch(u){t(u)}}o(bae,"writeBuffer");async function A1t(t,e,r,s,n,i,a,c){ve(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new Bd;let u=Buffer.from(await e.arrayBuffer());n.cork(),n.write(`${a}content-length:${i}\r
`,"latin1"),n.write(u),n.uncork(),s.onBodySent(u),s.onRequestSent(),!c&&s.reset!==!1&&(n[$s]=!0),r[Fu]()}catch(u){t(u)}}o(A1t,"writeBlob");async function mae(t,e,r,s,n,i,a,c){ve(i!==0||r[z1]===0,"iterator body cannot be pipelined");let u=null;function p(){if(u){let d=u;u=null,d()}}o(p,"onDrain");let l=o(()=>new Promise((d,h)=>{ve(u===null),n[is]?h(n[is]):u=d}),"waitForDrain");n.on("close",p).on("drain",p);let A=new fD({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:c,header:a});try{for await(let d of e){if(n[is])throw n[is];A.write(d)||await l()}A.end()}catch(d){A.destroy(d)}finally{n.off("close",p).off("drain",p)}}o(mae,"writeIterable");var fD=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:s,contentLength:n,client:i,expectsPayload:a,header:c}){this.socket=r,this.request=s,this.contentLength=n,this.client=i,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[Il]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:a,expectsPayload:c,header:u}=this;if(r[is])throw r[is];if(r.destroyed)return!1;let p=Buffer.byteLength(e);if(!p)return!0;if(n!==null&&a+p>n){if(i[lL])throw new Bd;process.emitWarning(new Bd)}r.cork(),a===0&&(!c&&s.reset!==!1&&(r[$s]=!0),n===null?r.write(`${u}transfer-encoding:chunked\r
`,"latin1"),r!==null&&n!==r){if(s[lL])throw new Bd;process.emitWarning(new Bd)}e[A0].timeout&&e[A0].timeoutType===Xh&&e[A0].timeout.refresh&&e[A0].timeout.refresh(),s[Fu]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[Il]=!1,e&&(ve(s[z1]<=1,"pipeline should only contain this request"),n(e))}};yae.exports=o1t});var Nae=b((z20,Sae)=>{"use strict";var Ii=require("node:assert"),{pipeline:d1t}=require("node:stream"),mt=lt(),{RequestContentLengthMismatchError:bL,RequestAbortedError:Bae,SocketError:Tz,InformationalError:mL}=It(),{kUrl:hD,kReset:mD,kClient:Vh,kRunning:MD,kPending:f1t,kQueue:Rl,kPendingIdx:ML,kRunningIdx:Wo,kError:Po,kSocket:L1,kStrictContentLength:h1t,kOnError:gL,kMaxConcurrentStreams:wae,kHTTP2Session:Lo,kResume:wl,kSize:b1t,kHTTPContext:m1t}=E0(),vu=Symbol("open streams"),Dae,qae=!1,bD;try{bD=require("node:http2")}catch{bD={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:M1t,HTTP2_HEADER_METHOD:g1t,HTTP2_HEADER_PATH:z1t,HTTP2_HEADER_SCHEME:O1t,HTTP2_HEADER_CONTENT_LENGTH:E1t,HTTP2_HEADER_EXPECT:y1t,HTTP2_HEADER_STATUS:C1t}}=bD;function B1t(t){let e=[];for(let[r,s]of Object.entries(t))if(Array.isArray(s))for(let n of s)e.push(Buffer.from(r),Buffer.from(n));else e.push(Buffer.from(r),Buffer.from(s));return e}o(B1t,"parseH2Headers");async function D1t(t,e){t[L1]=e,qae||(qae=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=bD.connect(t[hD],{createConnection:o(()=>e,"createConnection"),peerMaxConcurrentStreams:t[wae]});r[vu]=0,r[Vh]=t,r[L1]=e,mt.addListener(r,"error",I1t),mt.addListener(r,"frameError",R1t),mt.addListener(r,"end",w1t),mt.addListener(r,"goaway",S1t),mt.addListener(r,"close",function(){let{[Vh]:n}=this,{[L1]:i}=n,a=this[L1][Po]||this[Po]||new Tz("closed",mt.getSocketInfo(i));if(n[Lo]=null,n.destroyed){Ii(n[f1t]===0);let c=n[Rl].splice(n[Wo]);for(let u=0;u<c.length;u++){let p=c[u];mt.errorRequest(n,p,a)}}}),r.unref(),t[Lo]=r,e[Lo]=r,mt.addListener(e,"error",function(n){Ii(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Po]=n,this[Vh][gL](n)}),mt.addListener(e,"end",function(){mt.destroy(this,new Tz("other side closed",mt.getSocketInfo(this)))}),mt.addListener(e,"close",function(){let n=this[Po]||new Tz("closed",mt.getSocketInfo(this));t[L1]=null,this[Lo]!=null&&this[Lo].destroy(n),t[ML]=t[Wo],Ii(t[MD]===0),t.emit("disconnect",t[hD],[t],n),t[wl]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...n){return F1t(t,...n)},resume(){q1t(t)},destroy(n,i){s?queueMicrotask(i):e.destroy(n).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}o(D1t,"connectH2");function q1t(t){let e=t[L1];e?.destroyed===!1&&(t[b1t]===0&&t[wae]===0?(e.unref(),t[Lo].unref()):(e.ref(),t[Lo].ref()))}o(q1t,"resumeH2");function I1t(t){Ii(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[L1][Po]=t,this[Vh][gL](t)}o(I1t,"onHttp2SessionError");function R1t(t,e,r){if(r===0){let s=new mL(`HTTP/2:"frameError"received-type${t},code${e}`);this[L1][Po]=s,this[Vh][gL](s)}}o(R1t,"onHttp2FrameError");function w1t(){let t=new Tz("other side closed",mt.getSocketInfo(this[L1]));this.destroy(t),mt.destroy(this[L1],t)}o(w1t,"onHttp2SessionEnd");function S1t(t){let e=this[Po]||new Tz(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,mt.getSocketInfo(this)),r=this[Vh];if(r[L1]=null,r[m1t]=null,this[Lo]!=null&&(this[Lo].destroy(e),this[Lo]=null),mt.destroy(this[L1],e),r[Wo]<r[Rl].length){let s=r[Rl][r[Wo]];r[Rl][r[Wo]++]=null,mt.errorRequest(r,s,e),r[ML]=r[Wo]}Ii(r[MD]===0),r.emit("disconnect",r[hD],[r],e),r[wl]()}o(S1t,"onHTTP2GoAway");function N1t(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(N1t,"shouldSendContentLength");function F1t(t,e){let r=t[Lo],{method:s,path:n,host:i,upgrade:a,expectContinue:c,signal:u,headers:p}=e,{body:l}=e;if(a)return mt.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let A={};for(let w=0;w<p.length;w+=2){let N=p[w+0],x=p[w+1];if(Array.isArray(x))for(let P=0;P<x.length;P++)A[N]?A[N]+=`,${x[P]}`:A[N]=x[P];else A[N]=x}let d,{hostname:h,port:M}=t[hD];A[M1
globstarwhile`,t,l,e,A,d),this.matchOne(t.slice(l),e.slice(A),r))return this.debug("globstar found match!",l,a,d),!0;if(d==="."||d===".."||!s.dot&&d.charAt(0)==="."){this.debug("dot detected!",t,l,e,A);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(r&&(this.debug(`
`;if(s.username||s.password){let d=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(d).toString("base64")}`}i.Host=`${a}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(i))c+=`${d}:${i[d]}\r
`)+4,e.outputData[0].data=e._header+s.substring(n),Vb("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(Vb("Creating `tls.Socket`: %o",this.connectOpts),i=pMt.connect(this.connectOpts)):(Vb("Creating `net.Socket`: %o",this.connectOpts),i=uMt.connect(this.connectOpts)),await(0,AMt.once)(i,"connect"),i}};XI.protocols=["http","https"];Ui.HttpProxyAgent=XI;function fMt(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}o(fMt,"omit")});var age=b(oR=>{"use strict";Object.defineProperty(oR,"__esModule",{value:!0});oR.state=void 0;oR.state={instrumenterImplementation:void 0}});var Cge=b(lR=>{"use strict";Object.defineProperty(lR,"__esModule",{value:!0});lR.state=void 0;lR.state={operationRequestMap:new WeakMap}});var r3e=b(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});var vEt=require("os"),TEt=require("util");function xEt(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}o(xEt,"_interopDefaultLegacy");var _Et=xEt(TEt);function WEt(t,...e){process.stderr.write(`${_Et.default.format(t,...e)}${vEt.EOL}`)}o(WEt,"log");var XOe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,$Oe,oH=[],aH=[],w5=[];XOe&&cH(XOe);var jOe=Object.assign(t=>YOe(t),{enable:cH,enabled:uH,disable:LEt,log:WEt});function cH(t){$Oe=t,oH=[],aH=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?aH.push(new RegExp(`^${s.substr(1)}$`)):oH.push(new RegExp(`^${s}$`));for(let s of w5)s.enabled=uH(s.namespace)}o(cH,"enable");function uH(t){if(t.endsWith("*"))return!0;for(let e of aH)if(e.test(t))return!1;for(let e of oH)if(e.test(t))return!0;return!1}o(uH,"enabled");function LEt(){let t=$Oe||"";return cH(""),t}o(LEt,"disable");function YOe(t){let e=Object.assign(r,{enabled:uH(t),destroy:PEt,log:jOe.log,namespace:t,extend:QEt});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return o(r,"debug"),w5.push(e),e}o(YOe,"createDebugger");function PEt(){let t=w5.indexOf(this);return t>=0?(w5.splice(t,1),!0):!1}o(PEt,"destroy");function QEt(t){let e=YOe(`${this.namespace}:${t}`);return e.log=this.log,e}o(QEt,"extend");var X3=jOe,JOe=new Set,I5=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,S5,N5=X3("azure");N5.log=(...t)=>{X3.log(...t)};var pH=["verbose","info","warning","error"];I5&&(t3e(I5)?KOe(I5):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${I5}';loggingisnotenabled.Acceptablevalues:${pH.join(", ")}.`));function KOe(t){if(t&&!t3e(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${pH.join(",")}`);S5=t;let e=[];for(let r of JOe)e3e(r)&&e.push(r.namespace);X3.enable(e.join(","))}o(KOe,"setLogLevel");function kEt(){return S5}o(kEt,"getLogLevel");var VOe={verbose:400,info:300,warning:200,error:100};function UEt(t){let e=N5.extend(t);return ZOe(N5,e),{error:R5(e,"error"),warning:R5(e,"warning"),info:R5(e,"info"),verbose:R5(e,"verbose")}}o(UEt,"createClientLogger");function ZOe(t,e){e.log=(...r)=>{t.log(...r)}}o(ZOe,"patchLogMethod");function R5(t,e){let r=Object.assign(t.extend(e),{level:e});if(ZOe(t,r),e3e(r)){let s=X3.disable();X3.enable(s+","+r.namespace)}return JOe.add(r),r}o(R5,"createLogger");function e3e(t){return!!(S5&&VOe[t.level]<=VOe[S5])}o(e3e,"shouldEnable");function t3e(t){return pH.includes(t)}o(t3e,"isAzureLogLevel");lm.AzureLogger=N5;lm.createClientLogger=UEt;lm.getLogLevel=kEt;lm.setLogLevel=KOe});var dH=b($3=>{"use strict";Object.defineProperty($3,"__esModule",{value:!0});var Am=new WeakMap,F5=new WeakMap,V3=class t{static{o(this,"AbortSignal")}constructor(){this.onabort=null,Am.set(this,[]),F5.set(this,!1)}get aborted(){if(!F5.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return F5.get(this)}static get none(){return new t}addEventListener(e,r){if(!Am.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Am.get(this).push(r)}removeEventListener(e,r){if(!Am.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=Am.get(this),n=s.indexOf(r);n>-
Seehttps://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}o(cwt,"logUnexpecedPropertyAccessOnce");function uwt(){Object.keys(DS).forEach(function(t){delete DS[t]})}o(uwt,"resetLoggedProperties")});var IS=b(Ic=>{"use strict";Ic.__esModule=!0;Ic.HandlebarsEnvironment=a$;function WBe(t){return t&&t.__esModule?t:{default:t}}o(WBe,"_interopRequireDefault");var Q2=ys(),pwt=ai(),i$=WBe(pwt),lwt=t$(),Awt=vBe(),dwt=s$(),qS=WBe(dwt),fwt=n$(),hwt="4.7.9";Ic.VERSION=hwt;var bwt=8;Ic.COMPILER_REVISION=bwt;var mwt=7;Ic.LAST_COMPATIBLE_COMPILER_REVISION=mwt;var Mwt={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"};Ic.REVISION_CHANGES=Mwt;var o$="[object Object]";function a$(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},lwt.registerDefaultHelpers(this),Awt.registerDefaultDecorators(this)}o(a$,"HandlebarsEnvironment");a$.prototype={constructor:a$,logger:qS.default,log:qS.default.log,registerHelper:o(function(e,r){if(Q2.toString.call(e)===o$){if(r)throw new i$.default("Arg not supported with multiple helpers");Q2.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:o(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:o(function(e,r){if(Q2.toString.call(e)===o$)Q2.extend(this.partials,e);else{if(typeof r>"u")throw new i$.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:o(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:o(function(e,r){if(Q2.toString.call(e)===o$){if(r)throw new i$.default("Arg not supported with multiple decorators");Q2.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:o(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:o(function(){fwt.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var gwt=qS.default.log;Ic.log=gwt;Ic.createFrame=Q2.createFrame;Ic.logger=qS.default});var PBe=b((RS,LBe)=>{"use strict";RS.__esModule=!0;function c$(t){this.string=t}o(c$,"SafeString");c$.prototype.toString=c$.prototype.toHTML=function(){return""+this.string};RS.default=c$;LBe.exports=RS.default});var QBe=b(u$=>{"use strict";u$.__esModule=!0;u$.wrapHelper=zwt;function zwt(t,e){if(typeof t!="function")return t;var r=o(function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=e(n),t.apply(this,arguments)},"wrapper");return r}o(zwt,"wrapHelper")});var VBe=b(gA=>{"use strict";gA.__esModule=!0;gA.checkRevision=Dwt;gA.template=qwt;gA.wrapProgram=wS;gA.resolvePartial=Iwt;gA.invokePartial=Rwt;gA.noop=HBe;function Owt(t){return t&&t.__esModule?t:{default:t}}o(Owt,"_interopRequireDefault");function Ewt(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}o(Ewt,"_interopRequireWildcard");var ywt=ys(),km=Ewt(ywt),Cwt=ai(),fp=Owt(Cwt),hp=IS(),kBe=t$(),Bwt=QBe(),UBe=n$();function Dwt(t){var e=t&&t[0]||1,r=hp.COMPILER_REVISION;if(!(e>=hp.LAST_COMPATIBLE_COMPILER_REVISION&&e<=hp.COMPILER_REVISION))if(e<hp.LAST_COMPATIBLE_COMPILER_REVISION){var s=hp.REVISION_CHANGES[r],n=hp.REVISION_CHANGES[e];throw new fp.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+n+").")}else throw new fp.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}o(Dwt,"checkRevision");function qwt(t,e){if(!e)throw new fp.default("No environment passed to template");if(!t||!t.main)throw new fp.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function s(a,c,u){u.hash&&(c=km.extend({},c,u.hash),u.ids&&(u.ids[0]=!0)),a=e.VM.res
`+a+"^"},"showPosition"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,c,u,p,l;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),d=0;d<A.length&&(c=this._input.match(this.rules[A[d]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,u=d,!this.options.flex)));d++);return a?(l=a[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],i=this.performAction.call(this,this.yy,this,A[u],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`.Unrecognizedtext.
${K6(p)}${p}`)}catch(p){if(p.code==="ENOENT")return;throw p}return Z6(t,u)}o(KNe,"insert");Mi.exports.find=G8t;async function G8t(t,e){let r=Hy(t,e);try{return(await J6(r)).reduce((n,i)=>i&&i.key===e?Z6(t,i):n,null)}catch(s){if(s.code==="ENOENT")return null;throw s}}o(G8t,"find");Mi.exports.delete=H8t;function H8t(t,e,r={}){if(!r.removeFully)return KNe(t,e,null,r);let s=Hy(t,e);return JNe(s,{recursive:!0,force:!0})}o(H8t,"del");Mi.exports.lsStream=ZNe;function ZNe(t){let e=QK(t),r=new x8t({objectMode:!0});return Promise.resolve().then(async()=>{let{default:s}=await Promise.resolve().then(()=>(Y6(),j6)),n=await LK(e);return await s(n,async i=>{let a=$c.join(e,i),c=await LK(a);await s(c,async u=>{let p=$c.join(a,u),l=await LK(p);await s(l,async A=>{let d=$c.join(p,A);try{let M=(await J6(d)).reduce((z,C)=>(z.set(C.key,C),z),new Map);for(let z of M.values()){let C=Z6(t,z);C&&r.write(C)}}catch(h){if(h.code==="ENOENT")return;throw h}},{concurrency:WK})},{concurrency:WK})},{concurrency:WK}),r.end(),r}).catch(s=>r.emit("error",s)),r}o(ZNe,"lsStream");Mi.exports.ls=X8t;async function X8t(t){return(await ZNe(t).collect()).reduce((r,s)=>(r[s.key]=s,r),{})}o(X8t,"ls");Mi.exports.bucketEntries=J6;async function J6(t,e){let r=await F8t(t,"utf8");return V8t(r,e)}o(J6,"bucketEntries");function V8t(t){let e=[];return t.split(`
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||K6(s[1])!==s[0])return;let n;try{n=JSON.parse(s[1])}catch{}n&&e.push(n)}),e}o(V8t,"_bucketEntries");Mi.exports.bucketDir=QK;function QK(t){return $c.join(t,`index-v${Q8t}`)}o(QK,"bucketDir");Mi.exports.bucketPath=Hy;function Hy(t,e){let r=e6e(e);return $c.join.apply($c,[QK(t)].concat(P8t(r)))}o(Hy,"bucketPath");Mi.exports.hashKey=e6e;function e6e(t){return t6e(t,"sha256")}o(e6e,"hashKey");Mi.exports.hashEntry=K6;function K6(t){return t6e(t,"sha1")}o(K6,"hashEntry");function t6e(t,e){return S8t.createHash(e).update(t).digest("hex")}o(t6e,"hash");function Z6(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?L8t(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}o(Z6,"formatEntry");function LK(t){return v8t(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}o(LK,"readdirOrEmpty")});var FM=b(tF=>{"use strict";Object.defineProperty(tF,"__esModule",{value:!0});tF.LRUCache=void 0;var $8t=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,s6e=new Set,kK=typeof process=="object"&&process?process:{},n6e=o((t,e,r,s)=>{typeof kK.emitWarning=="function"?kK.emitWarning(t,e,r,s):console.error(`[${r}]${e}:${t}`)},"emitWarning"),eF=globalThis.AbortController,r6e=globalThis.AbortSignal;if(typeof eF>"u"){r6e=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(s,n){this._onabort.push(n)}},eF=class{static{o(this,"AbortController")}constructor(){e()}signal=new r6e;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let n of this.signal._onabort)n(s);this.signal.onabort?.(s)}}};let t=kK.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{t&&(t=!1,n6e("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var j8t=o(t=>!s6e.has(t),"shouldWarn"),_A=o(t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),"isPosInt"),i6e=o(t=>_A(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?NM:null:null,"getUintArray"),NM=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},UK=class t{static{o(this,"Stack")}heap;length;static#e=!1;static create(e){let r=i6e(e);if(!r)return[];t.#e=!0;let s=new t(e,r);return t.#e=!1,s}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},GK=class t{static{o(this,"LRUCache")}#e;#t;#s;#r;#n;#i;#a;#o;get perf(){return this.#o}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#l;#A;#d;#u;#b;#O;#m;#M;#B;#g;#y;#C;#h;#E;#D;#z;#p;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#h,sizes:e.#y,keyMap:e.#A,keyList:e.#d,valList:e.#u,next:e.#b,prev:e.#O,get head(){return e.#m},get tail(){return e.#M},free:e.#B,isBackgroundFetch:o(r=>e.#f(r),"isBackgroundFetch"),backgroundFetch:o((r,s,n,i)=>e.#U(r,s,n,i),"backgroundFetch"),moveToTail:o(r=>e.#_(r),"moveToTail"),indexes:o(r=>e.#w(r),"indexes"),rindexes:o(r=>e.#N(r),"rindexes"),isStale:o(r=>e.#I(r),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#c}get fetchMethod(){return this.#i}get memoMethod(){return this.#a}get dispose(){return this.#s}get onInsert(){return this.#r}get disposeAfter(){return this.#n}constructor(e){let{max:r=0,ttl:s,ttlResolution
globstarwhile`,e,d,r,h,M),this.matchOne(e.slice(d),r.slice(h),s))return this.debug("globstar found match!",d,u,M),!0;if(M==="."||M===".."||!n.dot&&M.charAt(0)==="."){this.debug("dot detected!",e,d,r,h);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(s&&(this.debug(`
`;if(s.username||s.password){let d=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(d).toString("base64")}`}i.Host=`${a}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(i))c+=`${d}:${i[d]}\r
`);let{connect:p,buffered:l}=await u;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200){if(e.once("socket",z9t),r.secureEndpoint){BC("Upgrading socket connection to TLS");let d=r.servername||r.host;return mve.connect({...Mve(r,"host","path","port"),socket:n,servername:CC.isIP(d)?void 0:d})}return n}n.destroy();let A=new CC.Socket({writable:!1});return A.readable=!0,e.once("socket",d=>{BC("Replaying proxy buffer for failed request"),(0,h9t.default)(d.listenerCount("data")>0),d.push(l),d.push(null)}),A}};nv.protocols=["http","https"];mo.HttpsProxyAgent=nv;function z9t(t){t.resume()}o(z9t,"resume");function Mve(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}o(Mve,"omit")});var Bve=b(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});var Eve=require("buffer"),wf={INVALID_ENCODING:"Invalid encoding provided. Please specify a valid encoding the internal Node.js Buffer supports.",INVALID_SMARTBUFFER_SIZE:"Invalid size provided. Size must be a valid integer greater than zero.",INVALID_SMARTBUFFER_BUFFER:"Invalid Buffer provided in SmartBufferOptions.",INVALID_SMARTBUFFER_OBJECT:"Invalid SmartBufferOptions object supplied to SmartBuffer constructor or factory methods.",INVALID_OFFSET:"An invalid offset value was provided.",INVALID_OFFSET_NON_NUMBER:"An invalid offset value was provided. A numeric value is required.",INVALID_LENGTH:"An invalid length value was provided.",INVALID_LENGTH_NON_NUMBER:"An invalid length value was provived. A numeric value is required.",INVALID_TARGET_OFFSET:"Target offset is beyond the bounds of the internal SmartBuffer data.",INVALID_TARGET_LENGTH:"Specified length value moves cursor beyong the bounds of the internal SmartBuffer data.",INVALID_READ_BEYOND_BOUNDS:"Attempted to read beyond the bounds of the managed data.",INVALID_WRITE_BEYOND_BOUNDS:"Attempted to write beyond the bounds of the managed data."};sl.ERRORS=wf;function O9t(t){if(!Eve.Buffer.isEncoding(t))throw new Error(wf.INVALID_ENCODING)}o(O9t,"checkEncoding");sl.checkEncoding=O9t;function yve(t){return typeof t=="number"&&isFinite(t)&&B9t(t)}o(yve,"isFiniteInteger");sl.isFiniteInteger=yve;function Cve(t,e){if(typeof t=="number"){if(!yve(t)||t<0)throw new Error(e?wf.INVALID_OFFSET:wf.INVALID_LENGTH)}else throw new Error(e?wf.INVALID_OFFSET_NON_NUMBER:wf.INVALID_LENGTH_NON_NUMBER)}o(Cve,"checkOffsetOrLengthValue");function E9t(t){Cve(t,!1)}o(E9t,"checkLengthValue");sl.checkLengthValue=E9t;function y9t(t){Cve(t,!0)}o(y9t,"checkOffsetValue");sl.checkOffsetValue=y9t;function C9t(t,e){if(t<0||t>e.length)throw new Error(wf.INVALID_TARGET_OFFSET)}o(C9t,"checkTargetOffset");sl.checkTargetOffset=C9t;function B9t(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}o(B9t,"isInteger");function D9t(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof Eve.Buffer.prototype[t]>"u")throw new Error(`PlatformdoesnotsupportBuffer.prototype.${t}.`)}o(D9t,"bigIntAndBufferInt64Check");sl.bigIntAndBufferInt64Check=D9t});var qve=b(oee=>{"use strict";Object.defineProperty(oee,"__esModule",{value:!0});var ut=Bve(),Dve=4096,q9t="utf8",iee=class t{static{o(this,"SmartBuffer")}constructor(e){if(this.length=0,this._encoding=q9t,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(ut.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(ut.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(ut.ERRORS.INVALID_SMARTBUFFER_SIZE);else if(e.buff)if(Buffer.isBuffer(e.buff))this._buff=e.buff,this.length=e.buff.length;else throw new Error(ut.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(Dve);else{if(typeof e<"u")throw new Error(ut.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(Dve)}}static fromSize(e,r){return new this({size:e,encoding:r})}static fromBuffer(e,r){return new this({buff:e,encoding:r})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let r=e;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}r
`,RJt=/\u2014 (\S+) (\S+)\n/g;function wJt(t,e){let r=t.inclusionProof,s=t1e.fromString(r.checkpoint.envelope),n=UT.fromString(s.note);if(!SJt(s,e))throw new t4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return n}o(wJt,"verifyCheckpoint");function SJt(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let n=e.find(i=>RWe.crypto.bufferEqual(i.logID.subarray(0,4),s.keyHint)&&i.baseURL.match(s.name));return n?RWe.crypto.verify(r,n.publicKey,s.signature):!1})}o(SJt,"verifySignedNote");var t1e=class t{static{o(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(e1e))throw new t4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(e1e),s=e.slice(0,r+1),i=e.slice(r+e1e.length).matchAll(RJt),a=Array.from(i,c=>{let[,u,p]=c,l=Buffer.from(p,"base64");if(l.length<5)throw new t4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:u,keyHint:l.subarray(0,4),signature:l.subarray(4)}});if(a.length===0)throw new t4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,a)}},UT=class t{static{o(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,s,n){this.origin=e,this.logSize=r,this.logHash=s,this.rest=n}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new t4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],n=BigInt(r[1]),i=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(s,n,i,a)}};r4.LogCheckpoint=UT});var SWe=b(i1e=>{"use strict";Object.defineProperty(i1e,"__esModule",{value:!0});i1e.verifyMerkleInclusion=vJt;var n1e=li(),r1e=Zr(),NJt=Buffer.from([0]),FJt=Buffer.from([1]);function vJt(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),n=BigInt(e.logSize);if(s<0n||s>=n)throw new r1e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${s}`});let{inner:i,border:a}=TJt(s,n);if(r.hashes.length!==i+a)throw new r1e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,i),u=r.hashes.slice(i),p=QJt(t.canonicalizedBody),l=_Jt(xJt(p,c,s),u);if(!n1e.crypto.bufferEqual(l,e.logHash))throw new r1e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}o(vJt,"verifyMerkleInclusion");function TJt(t,e){let r=WJt(t,e),s=LJt(t>>BigInt(r));return{inner:r,border:s}}o(TJt,"decompInclProof");function xJt(t,e,r){return e.reduce((s,n,i)=>r>>BigInt(i)&BigInt(1)?s1e(n,s):s1e(s,n),t)}o(xJt,"chainInner");function _Jt(t,e){return e.reduce((r,s)=>s1e(s,r),t)}o(_Jt,"chainBorderRight");function WJt(t,e){return PJt(t^e-BigInt(1))}o(WJt,"innerProofSize");function LJt(t){return t.toString(2).split("1").length-1}o(LJt,"onesCount");function PJt(t){return t===0n?0:t.toString(2).length}o(PJt,"bitLength");function s1e(t,e){return n1e.crypto.digest("sha256",FJt,t,e)}o(s1e,"hashChildren");function QJt(t){return n1e.crypto.digest("sha256",NJt,t)}o(QJt,"hashLeaf")});var FWe=b(o1e=>{"use strict";Object.defineProperty(o1e,"__esModule",{value:!0});o1e.verifyTLogSET=GJt;var NWe=li(),kJt=Zr(),UJt=Sg();function GJt(t,e){if(!(0,UJt.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(n=>{let i=HJt(t),a=Buffer.from(NWe.json.canonicalize(i),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return NWe.crypto.verify(a,n.publicKey,c)}))throw new kJt.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}o(GJt,"verifyTLogSET");function HJt(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:n}=t;return{body:n.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString("hex")}}o(HJt,"toVerificationPayload")});var TWe=b(GT=>{"use strict";Object.defineProperty(GT,"__esModule",{value:!0});GT.verifyTLogBody=YJt;GT.verifyTLogInclusion=JJt;var vWe=ete(),u1e=Zr(),a1e=DWe(),c1e=qWe(),XJt=IWe(),VJt=wWe(),$Jt=SWe(),jJt=FWe();function YJt(t,e){let{kind:r,version:s}=t.kindVersion,n=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==n.kind||s!==n.apiVersion)throw new u1e.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${s},received:${n.kind}/${n.apiVersion}`});switch(r){case"dsse":if(s==a1e.DSSE_API_VERSION_V1)return(0,a1e.verifyDSSETLogBody)(n,e);{let i=vWe.Entry.fromJSON(n);return(0,a1e.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,XJt.verifyIntotoTLogBody)(n,e);case"hashedrekord":if(s==c1e.HASHEDREKORD_API_VERSION_V1)return(0,c1e.verifyHashedRekordTLogBody)(n,e);{let i=vWe.Entry.fromJSON(n);return(0,c1e.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new u1e.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}o(YJt,"verifyTLogBody");function JJt(t,e){let r=!1;if(KJt(t)&&((0,jJt.verifyTLogSET)(t,e),r=!0),ZJt(t)){let s=(0,VJt.verifyCheckpoint)(t,e);(0,$Jt.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new u1e.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}o(JJt,"verifyTLogInclusion");function KJt(t){return t.inclusionPromise!==void 0}o(KJt,"isTLogEntryWithInclusionPromise");function ZJt(t){return t.inclusionProof!==void 0}o(ZJt,"isTLogEntryWithInclusionProof")});var PWe=b(HT=>{"use strict";Object.defineProperty(HT,"__esModule",{value:!0});HT.Verifier=
[`+S+"] ";for(L in arguments[0])i(arguments[0],L)&&(q+=L+": "+arguments[0][L]+", ");q=q.slice(0,-2)}else q=arguments[S];O.push(q)}P(f+`
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,a=!1,c;return{s:o(function(){r=(0,va0.default)(t)},"s"),n:o(function(){var p=r.next();return i=p.done,p},"n"),e:o(function(p){a=!0,c=p},"e"),f:o(function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}o(Q4,"_createForOfIteratorHelper");function ka0(t,e){var r;if(t){if(typeof t=="string")return ZHe(t,e);var s=(0,Io.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return(0,Wa0.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return ZHe(t,e)}}o(ka0,"_unsupportedIterableToArray");function ZHe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}o(ZHe,"_arrayLikeToArray");var g0="xregexp",oh={astral:!1,namespacing:!1},K0={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},Mu={},L4={},Zg={},Mse=[],ez="default",eXe="class",Ua0={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]/},Ga0=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,Ha0=K0.exec.call(/()??/,"")[1]===void 0,Xa0=(0,ih.default)(/x/)!==void 0,Va0={},iXe=Va0.toString;function zse(t){var e=!0;try{if(new RegExp("",t),t==="y"){var r=(function(){return"gy"})(),s=".a".replace(new RegExp("a",r),".")==="..";s&&(e=!1)}}catch{e=!1}return e}o(zse,"hasNativeFlag");var oXe=zse("u"),Ose=zse("y"),aXe={g:!0,i:!0,m:!0,u:oXe,y:Ose};function cXe(t,e,r,s,n){var i;if(t[g0]={captureNames:e},n)return t;if(t.__proto__)t.__proto__=pe.prototype;else for(var a in pe.prototype)t[a]=pe.prototype[a];return t[g0].source=r,t[g0].flags=s&&(0,Qa0.default)(i=s.split("")).call(i).join(""),t}o(cXe,"augment");function P4(t){return K0.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}o(P4,"clipDuplicates");function ch(t,e){var r;if(!pe.isRegExp(t))throw new TypeError("Type RegExp expected");var s=t[g0]||{},n=$a0(t),i="",a="",c=null,u=null;return e=e||{},e.removeG&&(a+="g"),e.removeY&&(a+="y"),a&&(n=K0.replace.call(n,new RegExp("[".concat(a,"]+"),"g"),"")),e.addG&&(i+="g"),e.addY&&(i+="y"),i&&(n=P4(n+i)),e.isInternalOnly||(s.source!==void 0&&(c=s.source),(0,ih.default)(s)!=null&&(u=i?P4((0,ih.default)(s)+i):(0,ih.default)(s))),t=cXe(new RegExp(e.source||t.source,n),ja0(t)?(0,Io.default)(r=s.captureNames).call(r,0):null,c,u,e.isInternalOnly),t}o(ch,"copyRegex");function uXe(t){return(0,nXe.default)(t,16)}o(uXe,"dec");function pXe(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||K0.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||Ya0(t.input,t.index+t[0].length,r)?"":"(?:)"}o(pXe,"getContextualTokenSeparator");function $a0(t){return Xa0?(0,ih.default)(t):K0.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}o($a0,"getNativeFlags");function ja0(t){return!!(t[g0]&&t[g0].captureNames)}o(ja0,"hasNamedCapture");function lXe(t){return(0,nXe.default)(t,10).toString(16)}o(lXe,"hex");function Ya0(t,e,r){var s="\\(\\?#[^)]*\\)",n="#[^#\\n]*",i="[?*+]|{\\d+(?:,\\d*)?}";return K0.test.call((0,ah.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,Io.default)(t).call(t,e))}o(Ya0,"isQuantifierNext");function Ese(t,e){return iXe.call(t)==="[object ".concat(e,"]")}o(Ese,"isType");function AXe(t){for(;t.length<4;)t="0".concat(t);return t}o(AXe,"pad4");function Ja0(t,e){if(P4(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=K0.replace.call(t,/^\(\?([\w$]+)\)/,function(i,a){if(K0.test.call(/[gy]/,a))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(i));return e=P4(e
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,a=!1,c;return{s:o(function(){r=(0,Fc0.default)(t)},"s"),n:o(function(){var p=r.next();return i=p.done,p},"n"),e:o(function(p){a=!0,c=p},"e"),f:o(function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}o(Qc0,"_createForOfIteratorHelper");function kc0(t,e){var r;if(t){if(typeof t=="string")return ZXe(t,e);var s=(0,Wc0.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return(0,_c0.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return ZXe(t,e)}}o(kc0,"_unsupportedIterableToArray");function ZXe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}o(ZXe,"_arrayLikeToArray");var Uc0=o(function(e){var r={},s=e._dec,n=e._hex,i=e._pad4;function a(d){return d.replace(/[- _]+/g,"").toLowerCase()}o(a,"normalize");function c(d){var h=/^\\[xu](.+)/.exec(d);return h?s(h[1]):d.charCodeAt(d[0]==="\\"?1:0)}o(c,"charCode");function u(d){var h="",M=-1;return(0,Pc0.default)(e).call(e,d,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(z){var C=c(z[1]);C>M+1&&(h+="\\u".concat(i(n(M+1))),C>M+2&&(h+="-\\u".concat(i(n(C-1))))),M=c(z[2]||z[1])}),M<65535&&(h+="\\u".concat(i(n(M+1))),M<65534&&(h+="-\\uFFFF")),h}o(u,"invertBmp");function p(d){var h="b!";return r[d][h]||(r[d][h]=u(r[d].bmp))}o(p,"cacheInvertedBmp");function l(d,h){var M=r[d],z="";if(M.bmp&&!M.isBmpLast){var C;z=(0,Dse.default)(C="[".concat(M.bmp,"]")).call(C,M.astral?"|":"")}if(M.astral&&(z+=M.astral),M.isBmpLast&&M.bmp){var E;z+=(0,Dse.default)(E="".concat(M.astral?"|":"","[")).call(E,M.bmp,"]")}return h?"(?:(?!".concat(z,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(z,")")}o(l,"buildAstral");function A(d,h){var M=h?"a!":"a=";return r[d][M]||(r[d][M]=l(d,h))}o(A,"cacheAstral"),e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(d,h,M){var z="Invalid double negation ",C="Unknown Unicode token ",E="Unicode token missing data ",B="Astral mode required for Unicode token ",I="Astral mode does not support Unicode tokens within character classes",w=d[1]==="P"||!!d[2],N=(0,Lc0.default)(M).call(M,"A"),x=a(d[4]||d[3]),P=r[x];if(d[1]==="P"&&d[2])throw new SyntaxError(z+d[0]);if(!r.hasOwnProperty(x))throw new SyntaxError(C+d[0]);if(P.inverseOf){if(x=a(P.inverseOf),!r.hasOwnProperty(x)){var j;throw new ReferenceError((0,Dse.default)(j="".concat(E+d[0]," -> ")).call(j,P.inverseOf))}P=r[x],w=!w}if(!(P.bmp||N))throw new SyntaxError(B+d[0]);if(N){if(h==="class")throw new SyntaxError(I);return A(x,w)}return h==="class"?w?p(x):P.bmp:"".concat((w?"[^":"[")+P.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(d){var h="Unicode token requires name",M="Unicode token has no character data ",z=Qc0(d),C;try{for(z.s();!(C=z.n()).done;){var E=C.value;if(!E.name)throw new Error(h);if(!(E.inverseOf||E.bmp||E.astral))throw new Error(M+E.name);r[a(E.name)]=E,E.alias&&(r[a(E.alias)]=E)}}catch(B){z.e(B)}finally{z.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(d){var h=a(d);return r[h]}},"_default");V4.default=Uc0;eVe.exports=V4.default});var sVe=b((yp1,rVe)=>{rVe.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",
Supportbooleaninputlist:\`true | True | TRUE | false | False | FALSE\``)}o(Ude,"getBooleanInput");functionPP(t,e){if(process.env.GITHUB_OUTPUT||"")returnMz("OUTPUT",vB(t,e));process.stdout.write(LP.EOL),Ia("set-output",{name:t},qa(e))}o(PP,"setOutput");functionGde(t){process.exitCode=WP.Failure,qb(t)}o(Gde,"setFailed");functionGu(){returnprocess.env.RUNNER_DEBUG==="1"}o(Gu,"isDebug");functionT(t){Ia("debug",{},t)}o(T,"debug");functionqb(t,e={}){Ia("error",j_(e),tinstanceofError?t.toString():t)}o(qb,"error");functionRt(t,e={}){Ia("warning",j_(e),tinstanceofError?t.toString():t)}o(Rt,"warning");functionW(t){process.stdout.write(t+LP.EOL)}o(W,"info");functionYd(t){J_("group",t)}o(Yd,"startGroup");functionJd(){J_("endgroup")}o(Jd,"endGroup");functionMr(t,e){returnqpt(this,void0,void0,function*(){Yd(t);letr;try{r=yielde()}finally{Jd()}returnr})}o(Mr,"group");functionTq(t,e){if(process.env.GITHUB_STATE||"")returnMz("STATE",vB(t,e));Ia("save-state",{name:t},qa(e))}o(Tq,"saveState");functionHde(t){returnprocess.env[`STATE_${t}`]||""}o(Hde,"getState");varWw=_(require("fs"),1),KX=_(require("os"),1),ZX=_(require("path"),1);varVde=_(require("os"),1);functionqO(t){returnt==null?"":typeoft=="string"||tinstanceofString?t:JSON.stringify(t)}o(qO,"toCommandValue");function$de(t,e,r){lets=newQP(t,e,r);process.stdout.write(s.toString()+Vde.EOL)}o($de,"issueCommand");varXde="::",QP=class{static{o(this,"Command")}constructor(e,r,s){e||(e="missing.command"),this.command=e,this.properties=r,this.message=s}toString(){lete=Xde+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";letr=!0;for(letsinthis.properties)if(this.properties.hasOwnProperty(s)){letn=this.properties[s];n&&(r?r=!1:e+=",",e+=`${s}=${Rpt(n)}`)}}returne+=`${Xde}${Ipt(this.message)}`,e}};functionIpt(t){returnqO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(Ipt,"escapeData");functionRpt(t){returnqO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(Rpt,"escapeProperty");varKde=_(require("os"),1);varYde=require("os"),IO=require("fs");varkP=function(t,e,r,s){functionn(i){returniinstanceofr?i:newr(function(a){a(i)})}returno(n,"adopt"),new(r||(r=Promise))(function(i,a){functionc(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");functionu(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");functionp(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})},{access:wpt,appendFile:Spt,writeFile:Npt}=IO.promises,jde="GITHUB_STEP_SUMMARY";varUP=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){returnkP(this,void0,void0,function*(){if(this._filePath)returnthis._filePath;lete=process.env[jde];if(!e)thrownewError(`Unable to find environment variable for $${jde}. Check if your runtime environment supports job summaries.`);try{yieldwpt(e,IO.constants.R_OK|IO.constants.W_OK)}catch{thrownewError(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}returnthis._filePath=e,this._filePath})}wrap(e,r,s={}){letn=Object.entries(s).map(([i,a])=>`${i}="${a}"`).join("");returnr?`<${e}${n}>${r}</${e}>`:`<${e}${n}>`}write(e){returnkP(this,void0,void0,function*(){letr=!!e?.overwrite,s=yieldthis.filePath();returnyield(r?Npt:Spt)(s,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){returnkP(this,void0,void0,function*(){returnthis.emptyBuffer().write({overwrite:!0})})}stringify(){returnthis._buffer}isEmptyBuffer(){returnthis._buffer.length===0}emptyBuffer(){returnthis._buffer="",this}addRaw(e,r=!1){returnthis._buffer+=e,r?this.addEOL():this}addEOL(){returnthis.addRaw(Yde.EOL)}addCodeBlock(e,r){lets=Object.assign({},r&&{lang:r}),n=this.wrap("pre",this.wrap("code",e),s);returnthis.addRaw(n).addEOL()}addList(e,r=!1){lets=r?"ol":"ul",n=e.map(a=>this.wrap("li",a)).join(""),i=this.wrap(s,n);returnthis.addRaw(i).addEOL()}addTable(e){letr=e.map(n=>{leti=n.map(a=>{if(typeofa=="string")returnthis.wrap("td",a);let{he
${Gbt.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function BI(t){return t instanceof fs?!0:s2(t)&&t.name==="RestError"}o(BI,"isRestError");function Zs(t,e){return Buffer.from(t,e)}o(Zs,"stringToUint8Array");var DI=_(require("node:http"),1),qI=_(require("node:https"),1),fk=_(require("node:zlib"),1),Xme=require("node:stream");var Pi=t3("ts-http-runtime");var Hbt={};function r3(t){return t&&typeof t.pipe=="function"}o(r3,"isReadableStream");function Hme(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=o(()=>{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)})}o(Hme,"isStreamComplete");function Vme(t){return t&&typeof t.byteLength=="number"}o(Vme,"isArrayBuffer");var II=class extends Xme.Transform{static{o(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,s){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),s()}catch(n){s(n)}}constructor(e){super(),this.progressCallback=e}},hk=class{static{o(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new Va("The operation was aborted. Request has already been canceled.");s=o(p=>{p.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",s)}let n;e.timeout>0&&(n=setTimeout(()=>{let p=new Yo;Pi.info(`requestto'${p.sanitizeUrl(e.url)}'timedout.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=jbt(c);p!==null&&e.headers.set("Content-Length",p)}let u;try{if(c&&e.onUploadProgress){let M=e.onUploadProgress,z=new II(M);z.on("error",C=>{Pi.error("Error in upload progress",C)}),r3(c)?c.pipe(z):z.end(c),c=z}let p=await this.makeRequest(e,r,c);n!==void 0&&clearTimeout(n);let l=Xbt(p),d={status:p.statusCode??0,headers:l,request:e};if(e.method==="HEAD")return p.resume(),d;u=a?Vbt(p,l):p;let h=e.onDownloadProgress;if(h){let M=new II(h);M.on("error",z=>{Pi.error("Error in download progress",z)}),u.pipe(M),u=M}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(d.status)?d.readableStreamBody=u:d.bodyAsText=await $bt(u),d}finally{if(e.abortSignal&&s){let p=Promise.resolve();r3(c)&&(p=Hme(c));let l=Promise.resolve();r3(u)&&(l=Hme(u)),Promise.all([p,l]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(A=>{Pi.warning("Error when cleaning up abortListener on httpRequest",A)})}}}makeRequest(e,r,s){let n=new URL(e.url),i=n.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannotconnectto${e.url}whileallowInsecureConnectionisfalse.`);let c={agent:e.agent??this.getOrCreateAgent(e,i),hostname:n.hostname,path:`${n.pathname}${n.search}`,port:n.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((u,p)=>{let l=i?DI.default.request(c,u):qI.default.request(c,u);l.once("error",A=>{p(new fs(A.message,{code:A.code??fs.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let A=new Va("The operation was aborted. Rejecting from abort signal callback while making request.");l.destroy(A),p(A)}),s&&r3(s)?s.pipe(l):s?typeof s=="string"||Buffer.isBuffer(s)?l.end(s):Vme(s)?l.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(Pi.error("Unrecognized body type",s),p(new fs("Unrecognized body type"))):l.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?DI.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new DI.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return qI.default.globalAgent;let n=e.tlsSettings??Hbt,i=this.cachedHttpsAgents.get(n);return i&&i.options.keepAlive===!s||(Pi.info("No cached TLS Agent exi
`;return e}o(DMt,"encodeHeaders");function qMt(t){return t instanceof Uint8Array?t.byteLength:JI(t)?t.size===-1?void 0:t.size:void 0}o(qMt,"getLength");function IMt(t){let e=0;for(let r of t){let s=qMt(r);if(s===void 0)return;e+=s}return e}o(IMt,"getTotalLength");async function RMt(t,e,r){let s=[Zs(`--${r}`,"utf-8"),...e.flatMap(i=>[Zs(`\r
`,"utf-8")],n=IMt(s);n&&t.headers.set("Content-Length",n),t.body=await jMe(s)}o(RMt,"buildRequestBody");var o3="multipartPolicy",wMt=70,SMt=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function NMt(t){if(t.length>wMt)throw new Error(`Multipartboundary"${t}"exceedsmaximumlengthof70characters`);if(Array.from(t).some(e=>!SMt.has(e)))throw new Error(`Multipartboundary"${t}"containsinvalidcharacters`)}o(NMt,"assertValidBoundary");function ZI(){return{name:o3,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,s=t.headers.get("Content-Type")??"multipart/mixed",n=s.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!n)throw new Error(`Gotmultipartrequestbody,butcontent-typeheaderwasnotmultipart:${s}`);let[,i,a]=n;if(a&&r&&a!==r)throw new Error(`Multipartboundarywasspecifiedas${a}intheheader,butgot${r}intherequestbody`);return r??=a,r?NMt(r):r=BMt(),t.headers.set("Content-Type",`${i};boundary=${r}`),await RMt(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}o(ZI,"multipartPolicy");function eR(){return CI()}o(eR,"createEmptyPipeline");var YMe=OI({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),eB0=YMe.logger;function Ya(t){return YMe.createClientLogger(t)}o(Ya,"createClientLogger");var Ja=Ya("core-rest-pipeline");function Tk(t={}){return wI({logger:Ja.info,...t})}o(Tk,"logPolicy");var xk=SI;function _k(t={}){return NI(t)}o(_k,"redirectPolicy");var tR=_(require("node:os"),1),rR=_(require("node:process"),1);function JMe(){return"User-Agent"}o(JMe,"getHeaderName");async function KMe(t){if(rR.default&&rR.default.versions){let e=`${tR.default.type()}${tR.default.release()};${tR.default.arch()}`,r=rR.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})`)}}o(KMe,"setPlatformSpecificData");var sR="1.22.2";function PMt(t){let e=[];for(let[r,s]of t){let n=s?`${r}/${s}`:r;e.push(n)}return e.join(" ")}o(PMt,"getUserAgentString");function ZMe(){return JMe()}o(ZMe,"getUserAgentHeaderName");async function nR(t){let e=new Map;e.set("core-rest-pipeline",sR),await KMe(e);let r=PMt(e);return t?`${t}${r}`:r}o(nR,"getUserAgentValue");var ege=ZMe(),tge="userAgentPolicy";function Wk(t={}){let e=nR(t.userAgentPrefix);return{name:tge,async sendRequest(r,s){return r.headers.has(ege)||r.headers.set(ege,await e),s(r)}}}o(Wk,"userAgentPolicy");var Kn=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function Lk(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:n}=e??{};return new Promise((i,a)=>{function c(){a(new Kn(n??"The operation was aborted."))}o(c,"rejectOnAbort");function u(){s?.removeEventListener("abort",p)}o(u,"removeListeners");function p(){r?.(),u(),c()}if(o(p,"onAbort"),s?.aborted)return c();try{t(l=>{u(),i(l)},l=>{u(),a(l)})}catch(l){a(l)}s?.addEventListener("abort",p)})}o(Lk,"createAbortablePromise");var HMt="The delay was aborted.";function a3(t,e){let r,{abortSignal:s,abortErrorMsg:n}=e??{};return Lk(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:o(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:s,abortErrorMsg:n??HMt})}o(a3,"delay");function tA(t){if(s2(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknownerror${e}`}}o(tA,"getErrorMessage");function rge(t){return s2(t)}o(rge,"isError");function $b(){return r2()}o($b,"randomUUID");var _t=o2;var sge=Symbol("rawContent");function Qk(t){return typeof t[sge]=="function"}o(Qk,"hasRawContent");function nge(t){return Qk(t)?t[sge]():t}o(nge,"getRawContent");var iR=o3;function kk(){let t=ZI();return{name:iR,sendRequest:o(async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)Qk(s.body)&&(s.body=nge(s.body));return t.sendRequest(e,r)},"sendRequest")}}o(kk,"multipartPolicy");var Uk=FI;function Gk(){return vI()}o(Gk,"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--),!hzt(u)){let A;return u.trim().length===0?A="Invalid space after '<'.":A="Tag '"+u+"' is an invalid name.",i1("InvalidTag",A,hs(t,i))}let p=pzt(t,i);if(p===!1)return i1("InvalidAttr","Attributes for '"+u+"' have open quote.",hs(t,i));let l=p.value;if(i=p.index,l[l.length-1]==="/"){let A=i-l.length;l=l.substring(0,l.length-1);let d=Uge(l,e);if(d===!0)s=!0;else return i1(d.err.code,d.err.msg,hs(t,A+d.err.line))}else if(c)if(p.tagClosed){if(l.trim().length>0)return i1("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",hs(t,a));if(r.length===0)return i1("InvalidTag","Closing tag '"+u+"' has not been opened.",hs(t,a));{let A=r.pop();if(u!==A.tagName){let d=hs(t,A.tagStartPos);return i1("InvalidTag","Expected closing tag '"+A.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+u+"'.",hs(t,a))}r.length==0&&(n=!0)}}else return i1("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",hs(t,i));else{let A=Uge(l,e);if(A!==!0)return i1(A.err.code,A.err.msg,hs(t,i-l.length+A.err.line));if(n===!0)return i1("InvalidXml","Multiple possible root nodes found.",hs(t,i));e.unpairedTags.indexOf(u)!==-1||r.push({tagName:u,tagStartPos:a}),s=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=kge(t,i);continue}else if(t[i+1]==="?"){if(i=Qge(t,++i),i.err)return i}else break;else if(t[i]==="&"){let A=dzt(t,i);if(A==-1)return i1("InvalidChar","char '&' is not expected.",hs(t,i));i=A}else if(n===!0&&!Pge(t[i]))return i1("InvalidXml","Extra text at the end",hs(t,i));t[i]==="<"&&i--}}else{if(Pge(t[i]))continue;return i1("InvalidChar","char '"+t[i]+"' is not expected.",hs(t,i))}if(s){if(r.length==1)return i1("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",hs(t,r[0].tagStartPos));if(r.length>0)return i1("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return i1("InvalidXml","Start tag expected.",1);return!0}o(MR,"validate");function Pge(t){return t===" "||t===" "||t===`
`||t==="\r"}o(Pge,"isWhiteSpace");function Qge(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let s=t.substr(r,e-r);if(e>5&&s==="xml")return i1("InvalidXml","XML declaration allowed only at the start of the document.",hs(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}o(Qge,"readPI");function kge(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}o(kge,"readCommentAndCDATA");var czt='"',uzt="'";function pzt(t,e){let r="",s="",n=!1;for(;e<t.length;e++){if(t[e]===czt||t[e]===uzt)s===""?s=t[e]:s!==t[e]||(s="");else if(t[e]===">"&&s===""){n=!0;break}r+=t[e]}return s!==""?!1:{value:r,index:e,tagClosed:n}}o(pzt,"readAttributeStr");var lzt=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Uge(t,e){let r=bR(t,lzt),s={};for(let n=0;n<r.length;n++){if(r[n][1].length===0)return i1("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",g3(r[n]));if(r[n][3]!==void 0&&r[n][4]===void 0)return i1("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",g3(r[n]));if(r[n][3]===void 0&&!e.allowBooleanAttributes)return i1("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",g3(r[n]));let i=r[n][2];if(!fzt(i))return i1("InvalidAttr","Attribute '"+i+"' is an invalid name.",g3(r[n]));if(!Object.prototype.hasOwnProperty.call(s,i))s[i]=1;else return i1("InvalidAttr","Attribute '"+i+"' is repeated.",g3(r[n]))}return!0}o(Uge,"validateAttributeString");function Azt(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}o(Azt,"validateNumberAmpersand");function dzt(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Azt(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}o(dzt,"validateAmpersand");function i1(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}o(i1,"getErrorObject");function fzt(t){return h7(t)}o(fzt,"validateAttrName");function hzt(t){return h7(t)}o(hzt,"validateTagName");function hs(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}o(hs,"getLineNumberForPosition");function g3(t){return t.startIndex+t[1].length}o(g3,"getPositionFromMatch");var Gge={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"},Hge={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
`);let e=new sn("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let n=this.options,i=new E3(n.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let p=t.charCodeAt(c+1);if(p===47){let l=em(t,">",c,"Closing Tag is not closed."),A=t.substring(c+2,l).trim();if(n.removeNSPrefix){let h=A.indexOf(":");h!==-1&&(A=A.substr(h+1))}A=y7(n.transformTagName,A,"",n).tagName,r&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher));let d=this.matcher.getCurrentTag();if(A&&n.unpairedTagsSet.has(A))throw new Error(`Unpairedtagcannotbeusedasclosingtag:</${A}>`);d&&n.unpairedTagsSet.has(d)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),s="",c=l}else if(p===63){let l=C7(t,c,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let A=this.buildAttributesMap(l.tagExp,this.matcher,l.tagName,!0);if(A){let d=A[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(d)||1),i.setXmlVersion(Number(d)||1)}if(!(n.ignoreDeclaration&&l.tagName==="?xml"||n.ignorePiTags)){let d=new sn(l.tagName);d.add(n.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&n.ignoreAttributes!==!0&&(d[":@"]=A),this.addChild(r,d,this.readonlyMatcher,c)}c=l.closeIndex+1}else if(p===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let l=em(t,"-->",c+4,"Comment is not closed.");if(n.commentPropName){let A=t.substring(c+4,l-2);s=this.saveTextToParentTag(s,r,this.readonlyMatcher),r.add(n.commentPropName,[{[n.textNodeName]:A}])}c=l}else if(p===33&&t.charCodeAt(c+2)===68){let l=i.readDocType(t,c);this.entityDecoder.addInputEntities(l.entities),c=l.i}else if(p===33&&t.charCodeAt(c+2)===91){let l=em(t,"]]>",c,"CDATA is not closed.")-2,A=t.substring(c+9,l);s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let d=this.parseTextData(A,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);d==null&&(d=""),n.cdataPropName?r.add(n.cdataPropName,[{[n.textNodeName]:A}]):r.add(n.textNodeName,d),c=l+2}else{let l=C7(t,c,n.removeNSPrefix);if(!l){let x=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${x}"`)}let A=l.tagName,d=l.rawTagName,h=l.tagExp,M=l.attrExpPresent,z=l.closeIndex;if({tagName:A,tagExp:h}=y7(n.transformTagName,A,h,n),n.strictReservedNames&&(A===n.commentPropName||A===n.cdataPropName||A===n.textNodeName||A===n.attributesGroupName))throw new Error(`Invalid tag name: ${A}`);r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher,!1));let C=r;C&&n.unpairedTagsSet.has(C.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;h.length>0&&h.lastIndexOf("/")===h.length-1&&(E=!0,A[A.length-1]==="/"?(A=A.substr(0,A.length-1),h=A):h=h.substr(0,h.length-1),M=A!==h);let B=null,I={},w;w=Wzt(d),A!==e.tagname&&this.matcher.push(A,{},w),A!==h&&M&&(B=this.buildAttributesMap(h,this.matcher,A),B&&(I=_zt(B,n))),A!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=c;if(this.isCurrentNodeStopNode){let x="";if(E)c=l.closeIndex;else if(n.unpairedTagsSet.has(A))c=l.closeIndex;else{let j=this.readStopNodeData(t,d,z+1);if(!j)throw new Error(`Unexpected end of ${d}`);c=j.i,x=j.tagContent}let P=new sn(A);B&&(P[":@"]=B),P.add(n.textNodeName,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,P,this.readonlyMatcher,N)}else{if(E){({tagName:A,tagExp:h}=y7(n.transformTagName,A,h,n));let x=new sn(A);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(n.unpairedTagsSet.has(A)){let x=new sn(A);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=l.closeIndex;continue}else{let x=new sn(A);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),r=x}s="",c=z}}}else s+=t[c];return e.child},"parseXml"
`}),s}getCanonicalizedResourceString(e){let r=SR(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let n=NR(e.url),i={};if(n){let a=[];for(let c in n)if(Object.prototype.hasOwnProperty.call(n,c)){let u=c.toLowerCase();i[u]=n[c],a.push(u)}a.sort();for(let c of a)s+=`
${c}:${decodeURIComponent(i[c])}`}return s}};var L0=class extends h2{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new q3(e,r,this)}computeHMACSHA256(e){return(0,Eze.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var R1=Ya("storage-common");var Gi;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Gi||(Gi={}));var aA={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Gi.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},mOt=new Kn("The operation was aborted."),I3=class extends tc{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,s=aA){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:aA.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):aA.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:aA.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:aA.maxRetryDelayInMs):aA.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:aA.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:aA.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,s){let n=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||s%2===1;i||(n.url=wR(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=oA(n.url,Zu.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(R1.info(`RetryPolicy:=====>Try=${s}${i?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(n),!this.shouldRetry(i,s,a))return a;r=r||!i&&a.status===404}catch(c){if(R1.error(`RetryPolicy:Caughterror,message:${c.message},code:${c.code}`),!this.shouldRetry(i,s,a,c))throw c}return await this.delay(i,s,e.abortSignal),this.attemptSendRequest(e,r,++s)}shouldRetry(e,r,s,n){if(r>=this.retryOptions.maxTries)return R1.info(`RetryPolicy:Attempt(s)${r}>=maxTries${this.retryOptions.maxTries},nofurthertry.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(n){for(let a of i)if(n.name.toUpperCase().includes(a)||n.message.toUpperCase().includes(a)||n.code&&n.code.toString().toUpperCase()===a)return R1.info(`RetryPolicy:Networkerror${a}found,willretry.`),!0}if(s||n){let a=s?s.status:n?n.statusCode:0;if(!e&&a===404)return R1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return R1.info(`RetryPolicy:Willretryforstatuscode${a}.`),!0}if(s&&s?.status>=400){let a=s.headers.get(Ve.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return n?.code==="PARSE_ERROR"&&n?.message.startsWith('Error "Error: Unclosed root tag')?(R1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,s){let n=0;if(e)switch(this.retryOptions.retryPolicyType){case Gi.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Gi.FIXED:n=this.retryOptions.retryDelayInMs;break}else n=Math.random()*1e3;return R1.info(`RetryPolicy:Delayfor${n}ms`),FR(n,s,mOt)}};var R3=class{static{o(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new I3(e,r,this.retryOptions)}};var MOt="storageBrowserPolicy";function yze(){return{name:MOt,async sendRequest(t,e){return _t||((t.method==="GET"||t.method==="HEAD")&&(t.url=oA(t.url,Zu.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Ve.COOKIE),t.headers.delete(Ve.CONTENT_LENGTH)),e(t)}}}o(yze,"storageBrowserPolicy");var gOt="StorageCorrectContentLengthPolicy";function Cze(){function t(e){e.body&&(
`}),c}o(s,"getCanonicalizedHeadersString");function n(i){let a=SR(i.url)||"/",c="";c+=`/${t.accountName}${a}`;let u=NR(i.url),p={};if(u){let l=[];for(let A in u)if(Object.prototype.hasOwnProperty.call(u,A)){let d=A.toLowerCase();p[d]=u[A],l.push(d)}l.sort();for(let A of l)c+=`
`),i=e.computeHMACSHA256(n);return{sasQueryParameters:new ra(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:n}}o(qEt,"generateBlobSASQueryParameters20150405");function IEt(t,e){if(t=C2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Mc.parse(t.permissions.toString()).toString():n=gc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?Wt(t.startsOn,!1):"",t.expiresOn?Wt(t.expiresOn,!1):"",y2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?ta(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,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:new ra(t.version,a,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}o(IEt,"generateBlobSASQueryParameters20181109");function REt(t,e){if(t=C2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Mc.parse(t.permissions.toString()).toString():n=gc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?Wt(t.startsOn,!1):"",t.expiresOn?Wt(t.expiresOn,!1):"",y2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?ta(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,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:new ra(t.version,a,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}o(REt,"generateBlobSASQueryParameters20201206");function wEt(t,e){if(t=C2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Mc.parse(t.permissions.toString()).toString():n=gc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?Wt(t.startsOn,!1):"",t.expiresOn?Wt(t.expiresOn,!1):"",y2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Wt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Wt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?ta(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new ra(t.version,a,n,void 0,void 0,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}}o(wEt,"generateBlobSASQueryParametersUDK20181109");function SEt(t,e){if(t=C2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Mc.parse(t.permissions.toString()).toString():n=gc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?Wt(t.startsOn,!1):"",t.expiresOn?Wt(t.expiresOn,!1):"",y2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Wt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Wt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?ta(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new ra(t.version,a,n,void 0,void 0,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}}o(SEt,"generateBlobSASQueryParametersUDK20200210");function NEt(t,e){if(t=C2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Mc.parse(t.permissions.toString()).toString():n=gc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?Wt(t.startsOn,!1):"",t.expiresOn?Wt(t.expiresOn,!1):"",y2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Wt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Wt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?ta(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new ra(t.version,a,n,void 0,void 0,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}}o(NEt,"generateBlobSASQueryParametersUDK20201206");function FEt(t,e){if(t=C2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Mc.parse(t.permissions.toString()).toString():n=gc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?Wt(t.startsOn,!1):"",t.expiresOn?Wt(t.expiresOn,!1):"",y2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Wt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Wt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?ta(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new ra(t.version,a,n,void 0,void 0,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}}o(FEt,"generateBlobSASQueryParametersUDK20250705");function y2(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}o(y2,"getCanonicalName");function C2(t){let e=t.version?t.version:_R;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}o(C2,"SASSignatureValuesSanityCheckAndAutofill");var k3=class{static{o(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let s=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=s.container):(this._isContainer=!1,this._containerOrBlobOperation=s.blob),r||(r=$b()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Jo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Jo||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return qe.withSpan("BlobLeaseClient-acquireLease",r,async s=>Fe(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:s.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Jo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Jo||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return qe.withSpan("BlobLeaseClient-changeLease",r,async s=>{let n=Fe(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:s.tracingOptions}));return this._leaseId=e,n})}async releaseLease(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"}};fm.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var I2=class extends Error{static{o(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"}};I2.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var K3=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var Uyt=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})},RH=class{static{o(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),s=Date.now()-this.startTime,n=(e/(1024*1024)/(s/1e3)).toFixed(1);W(`Sent ${e} of ${this.contentLength} (${r}%), ${n} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=o(()=>{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 L3e(t,e,r){return Uyt(this,void 0,void 0,function*(){var s;let n=new cp(t),i=n.getBlockBlobClient(),a=new RH((s=r?.archiveSizeBytes)!==null&&s!==void 0?s:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),T(`BlobClient: ${n.name}:${n.accountName}:${n.containerName}`);let u=yield i.uploadFile(e,c);if(u._response.status>=400)throw new k5(`uploadCacheArchiveSDK: upload failed with status code ${u._response.status}`);return u}catch(u){throw Rt(`uploadCacheArchiveSDK: internal error uploading cache archive: ${u.message}`),u}finally{a.stopDisplayTimer()}})}o(L3e,"uploadCacheArchiveSDK");var Q3e=_(require("buffer"),1),zc=_(require("fs"),1),k3e=_(require("stream"),1),U3e=_(require("util"),1);var U5=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})};function G5(t){return t?t>=200&&t<300:!1}o(G5,"isSuccessStatusCode");function Gyt(t){return t?t>=500:!0}o(Gyt,"isServerErrorStatusCode");function Hyt(t){return t?[W0.BadGateway,W0.ServiceUnavailable,W0.GatewayTimeout].includes(t):!1}o(Hyt,"isRetryableStatusCode");function Xyt(t){return U5(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(Xyt,"sleep");function P3e(t,e,r){return U5(this,arguments,void 0,function*(s,n,i,a=hI,c=bI,u=void 0){let p="",l=1;for(;l<=a;){let A,d,h=!1;try{A=yield n()}catch(M){u&&(A=u(M)),h=!0,p=M.message}if(A&&(d=i(A),!Gyt(d)))return A;if(d&&(h=Hyt(d),p=`Cache service responded with ${d}`),T(`${s} - Attempt ${l} of ${a} failed with error: ${p}`),!h){T(`${s} - Error is not retryable`);break}yield Xyt(c),l++}throw Error(`${s} failed: ${p}`)})}o(P3e,"retry");function Z3(t,e){return U5(this,arguments,void 0,function*(r,s,n=hI,i=bI){return yield P3e(r,s,a=>a.statusCode,n,i,a=>{if(a instanceof Xa)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}o(Z3,"retryTypedResponse");function hm(t,e){return U5(this,arguments,void 0,function*(r,s,n=hI,i=bI){return yield P3e(r,s,a=>a.message.statusCode,n,i)})}o(hm,"retryHttpClientResponse");var ji=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a
Othercacheswithsimilarkey:`);for(let c of i?.artifactCaches||[])T(`CacheKey:${c?.cacheKey},CacheVersion:${c?.cacheVersion},CacheScope:${c?.scope},CacheCreated:${c?.creationTime}`)}}})}o(eCt,"printCachesListForDiagnostics");function FH(t,e,r){return cn(this,void 0,void 0,function*(){let s=new Z3e.URL(t),n=V3e(r);s.hostname.endsWith(".blob.core.windows.net")?n.useAzureSdk?yield H3e(t,e,n):n.concurrentBlobDownloads?yield G3e(t,e,n):yield X5(t,e):yield X5(t,e)})}o(FH,"downloadCache");function tEe(t,e,r){return cn(this,void 0,void 0,function*(){let s=NH(),n=Lb(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:n,cacheSize:r?.cacheSize};return yield Z3("reserveCache",()=>cn(this,void 0,void 0,function*(){return s.postJson(tE("caches"),i)}))})}o(tEe,"reserveCache");function K3e(t,e){return`bytes${t}-${e}/*`}o(K3e,"getContentRange");function tCt(t,e,r,s,n){return cn(this,void 0,void 0,function*(){T(`Uploadingchunkofsize${n-s+1}bytesatoffset${s}withcontentrange:${K3e(s,n)}`);let i={"Content-Type":"application/octet-stream","Content-Range":K3e(s,n)},a=yield hm(`uploadChunk(start:${s},end:${n})`,()=>cn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!G5(a.message.statusCode))throw new Error(`Cacheservicerespondedwith${a.message.statusCode}duringuploadchunk.`)})}o(tCt,"uploadChunk");function rCt(t,e,r,s){return cn(this,void 0,void 0,function*(){let n=Ha(r),i=tE(`caches/${e.toString()}`),a=bm.openSync(r,"r"),c=wH(s),u=tk("uploadConcurrency",c.uploadConcurrency),p=tk("uploadChunkSize",c.uploadChunkSize),l=[...new Array(u).keys()];T("Awaiting all uploads");let A=0;try{yield Promise.all(l.map(()=>cn(this,void 0,void 0,function*(){for(;A<n;){let d=Math.min(n-A,p),h=A,M=A+d-1;A+=p,yield tCt(t,i,()=>bm.createReadStream(r,{fd:a,start:h,end:M,autoClose:!1}).on("error",z=>{throw new Error(`Cacheuploadfailedbecausefilereadfailedwith${z.message}`)}),h,M)}})))}finally{bm.closeSync(a)}})}o(rCt,"uploadFile");function sCt(t,e,r){return cn(this,void 0,void 0,function*(){let s={size:r};return yield Z3("commitCache",()=>cn(this,void 0,void 0,function*(){return t.postJson(tE(`caches/${e.toString()}`),s)}))})}o(sCt,"commitCache");function vH(t,e,r,s){return cn(this,void 0,void 0,function*(){if(wH(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield L3e(r,e,s)}else{let i=NH();T("Upload cache"),yield rCt(i,t,e,s),T("Commiting cache");let a=Ha(e);W(`CacheSize:~${Math.round(a/(1024*1024))}MB(${a}B)`);let c=yield sCt(i,t,a);if(!G5(c.statusCode))throw new Error(`Cacheservicerespondedwith${c.statusCode}duringcommitcache.`);W("Cache saved successfully")}})}o(vH,"saveCache");var jEe=_(kEe(),1),u1=_(c1(),1),ni=_(c1(),1),F2=_(c1(),1),v2=_(c1(),1),T2=_(c1(),1);var IX=_(c1(),1),RX=_(c1(),1),XEe=_(c1(),1),VEe=_(c1(),1),$Ee=_(c1(),1);var BX=_(c1(),1),DX=_(c1(),1),UEe=_(c1(),1),GEe=_(c1(),1),HEe=_(c1(),1);var qX=class extends HEe.MessageType{static{o(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,GEe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,UEe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,n){let i=n??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=s.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknownfield${c}(wiretype${u})for${this.typeName}`);let l=e.skip(u);p!==!1&&(p===!0?DX.UnknownFieldHandler.onRead:p)(this.typeName,i,c,u,l)}}return i}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,BX.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,BX.WireType.Varint).int64(e.permission);let n=s.writeUnknownFields;return n!==!1&&(n==!0?DX.UnknownFieldHandler.onWrite:n)(this.typeName,e,r),r}},Fw=new qX;var wX=class extends $Ee.Mess
`));let s=yield HX(r,"create");yield XX(s,t)})}o($X,"createTar");var Fm=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return o(n,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(s.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(s.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):n(l.value).then(c,u)}o(p,"step"),p((s=s.apply(t,e||[])).next())})},ia=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Nm=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},_w=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function ZEe(t){if(!t||t.length===0)throw new ia("Path Validation Error: At least one directory or file path is required")}o(ZEe,"checkPaths");function jX(t){if(t.length>512)throw new ia(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new ia(`KeyValidationError:${t}cannotcontaincommas.`)}o(jX,"checkKey");function YX(){return eE()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}o(YX,"isFeatureAvailable");function eye(t,e,r,s){return Fm(this,arguments,void 0,function*(n,i,a,c,u=!1){let p=eE();return T(`Cacheserviceversion:${p}`),ZEe(n),p==="v2"?yield MBt(n,i,a,c,u):yield mBt(n,i,a,c,u)})}o(eye,"restoreCache");function mBt(t,e,r,s){return Fm(this,arguments,void 0,function*(n,i,a,c,u=!1){a=a||[];let p=[i,...a];if(T("Resolved Keys:"),T(JSON.stringify(p)),p.length>10)throw new ia("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of p)jX(d);let l=yield KO(),A="";try{let d=yield eEe(p,n,{compressionMethod:l,enableCrossOsArchive:u});if(!d?.archiveLocation)return;if(c?.lookupOnly)return W("Lookup only - skipping download"),d.cacheKey;A=mE.join(yield YO(),Kl(l)),T(`ArchivePath:${A}`),yield FH(d.archiveLocation,A,c),Gu()&&(yield bE(A,l));let h=Ha(A);return W(`CacheSize:~${Math.round(h/(1024*1024))}MB(${h}B)`),yield VX(A,l),W("Cache restored successfully"),d.cacheKey}catch(d){let h=d;if(h.name===ia.name)throw d;h instanceof Xa&&typeof h.statusCode=="number"&&h.statusCode>=500?qb(`Failedtorestore:${d.message}`):Rt(`Failedtorestore:${d.message}`)}finally{try{yield JO(A)}catch(d){T(`Failedtodeletearchive:${d}`)}}})}o(mBt,"restoreCacheV1");function MBt(t,e,r,s){return Fm(this,arguments,void 0,function*(n,i,a,c,u=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let p=[i,...a];if(T("Resolved Keys:"),T(JSON.stringify(p)),p.length>10)throw new ia("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of p)jX(A);let l="";try{let A=GX(),d=yield KO(),h={key:i,restoreKeys:a,version:Lb(n,d,u)},M=yield A.GetCacheEntryDownloadURL(h);if(!M.ok){T(`Cachenotfoundforversion${h.version}ofkeys:${p.join(", ")}`);return}if(h.key!==M.matchedKey?W(`Cachehitforrestore-key:${M.matchedKey}`):W(`Cachehitfor:${M.matchedKey}`),c?.lookupOnly)return W("Lookup only - skipping download"),M.matchedKey;l=mE.join(yield YO(),Kl(d)),T(`Archivepath:${l}`),T(`Startingdownloadofarchiveto:${l}`),yield FH(M.signedDownloadUrl,l,c);let C=Ha(l);return W(`CacheSize:~${Math.round(C/(1024*1024))}MB(${C}B)`),Gu()&&(yield bE(l,d)),yield VX(l,d),W("Cache restored successfully"),M.matchedKey}catch(A){let d=A;if(d.name===ia.name)throw A;d instanceof Xa&&typeof d.statusCode=="number"&&d.statusCode>=500?qb(`Failedtorestore:${A.message}`):Rt(`Failedtorestore:${A.message}`)}finally{try{l&&(yield JO(l))}catch(A){T(`Failedtodeletearchive:${A}`)}}})}o(MBt,"restoreCacheV2");function JX(t,e,r){return Fm(this,arguments,void 0,function*(s,n,i,a=!1){let c=eE();return T(`Cacheserviceversion:${c}`),ZEe(s),jX(n),c==="v2"?yield zBt(s,n,i,a):yield gBt(s,n,i,a)})}o(JX,"saveCache");function gBt(t,e,r){return Fm(this,arguments,void 0,fu
`)}o(fDt,"_buildMessageForResponseErrors");var hDt=class extends Error{static{o(this,"GraphqlResponseError")}constructor(t,e,r){super(fDt(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},bDt=["method","baseUrl","url","headers","request","query","mediaType","operationName"],mDt=["query","method","url"],Qye=/\/api\/v3\/?$/;function MDt(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(mDt.includes(a))return Promise.reject(new Error(`[@octokit/graphql]"${a}"cannotbeusedasvariablename`))}let s=typeof e=="string"?Object.assign({query:e},r):e,n=Object.keys(s).reduce((a,c)=>bDt.includes(c)?(a[c]=s[c],a):(a.variables||(a.variables={}),a.variables[c]=s[c],a),{}),i=s.baseUrl||t.endpoint.DEFAULTS.baseUrl;return Qye.test(i)&&(n.url=i.replace(Qye,"/api/graphql")),t(n).then(a=>{if(a.data.errors){let c={};for(let u of Object.keys(a.headers))c[u]=a.headers[u];throw new hDt(n,c,a.data)}return a.data.data})}o(MDt,"graphql");function pV(t,e){let r=t.defaults(e);return Object.assign(o((n,i)=>MDt(r,n,i),"newApi"),{defaults:pV.bind(null,r),endpoint:r.endpoint})}o(pV,"withDefaults");var NQ0=pV(OE,{headers:{"user-agent":`octokit-graphql.js/${dDt}${bA()}`},method:"POST",url:"/graphql"});function kye(t){return pV(t,{method:"POST",url:"/graphql"})}o(kye,"withCustomRequest");var lV="(?:[a-zA-Z0-9_-]+)",Uye="\\.",Gye=new RegExp(`^${lV}${Uye}${lV}${Uye}${lV}$`),gDt=Gye.test.bind(Gye);async function zDt(t){let e=gDt(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),s=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":s?"user-to-server":"oauth"}}o(zDt,"auth");function ODt(t){return t.split(/\./).length===3?`bearer${t}`:`token${t}`}o(ODt,"withAuthorizationPrefix");async function EDt(t,e,r,s){let n=e.endpoint.merge(r,s);return n.headers.authorization=ODt(t),e(n)}o(EDt,"hook");var Hye=o(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(zDt.bind(null,e),{hook:EDt.bind(null,e)})},"createTokenAuth2");var AV="7.0.6";var Xye=o(()=>{},"noop"),yDt=console.warn.bind(console),CDt=console.error.bind(console);function BDt(t={}){return typeof t.debug!="function"&&(t.debug=Xye),typeof t.info!="function"&&(t.info=Xye),typeof t.warn!="function"&&(t.warn=yDt),typeof t.error!="function"&&(t.error=CDt),t}o(BDt,"createLogger");var Vye=`octokit-core.js/${AV}${bA()}`,Yw=class{static{o(this,"Octokit")}static VERSION=AV;static defaults(e){return class extends this{static{o(this,"OctokitWithDefaults")}constructor(...s){let n=s[0]||{};if(typeof e=="function"){super(e(n));return}super(Object.assign({},e,n,n.userAgent&&e.userAgent?{userAgent:`${n.userAgent}${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{o(this,"NewOctokit")}static plugins=r.concat(e.filter(n=>!r.includes(n)))}}constructor(e={}){let r=new zye.Collection,s={baseUrl:OE.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(s.headers["user-agent"]=e.userAgent?`${e.userAgent}${Vye}`:Vye,e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=OE.defaults(s),this.graphql=kye(this.request).defaults(s),this.log=BDt(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=Hye(e.auth);r.wrap("request",i.hook),this.auth=i}let n=this.constructor;for(let i=0;i<n.plugins.length;++i)
`,a).length:A,p?(c===null?0:c.length)+u.length:0,p?u.length+A:0);return d<h},"__needMoreData"),parse:o(function(s,n,i,a){let{bom:c,comment_no_infix:u,encoding:p,from_line:l,ltrim:A,max_record_size:d,raw:h,relax_quotes:M,rtrim:z,skip_empty_lines:C,to:E,to_line:B}=this.options,{comment:I,escape:w,quote:N,record_delimiter:x}=this.options,{bomSkipped:P,previousBuf:j,rawBuffer:Ee,escapeIsQuote:we}=this.state,Z;if(j===void 0)if(s===void 0){a();return}else Z=s;else j!==void 0&&s===void 0?Z=j:Z=Buffer.concat([j,s]);if(P===!1)if(c===!1)this.state.bomSkipped=!0;else if(Z.length<3){if(n===!1){this.state.previousBuf=Z;return}}else{for(let J in Jm)if(Jm[J].compare(Z,0,Jm[J].length)===0){let _e=Jm[J].length;this.state.bufBytesStart+=_e,Z=Z.slice(_e);let re=H$({...this.original_options,encoding:J});for(let Ce in re)this.options[Ce]=re[Ce];({comment:I,escape:w,quote:N}=this.options);break}this.state.bomSkipped=!0}let Se=Z.length,Y;for(Y=0;Y<Se&&!this.__needMoreData(Y,Se,n);Y++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),B!==-1&&this.info.lines>B){this.state.stop=!0,a();return}this.state.quoting===!1&&x.length===0&&this.__autoDiscoverRecordDelimiter(Z,Y)&&(x=this.options.record_delimiter);let J=Z[Y];if(h===!0&&Ee.append(J),(J===pNt||J===lNt)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(w!==null&&this.state.quoting===!0&&this.__isEscape(Z,Y,J)&&Y+w.length<Se)if(we){if(this.__isQuote(Z,Y+w.length)){this.state.escaping=!0,Y+=w.length-1;continue}}else{this.state.escaping=!0,Y+=w.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(Z,Y))if(this.state.quoting===!0){let Ce=Z[Y+N.length],dt=z&&this.__isCharTrimable(Z,Y+N.length),Gt=I!==null&&this.__compareBytes(I,Z,Y+N.length,Ce),He=this.__isDelimiter(Z,Y+N.length,Ce),u0=x.length===0?this.__autoDiscoverRecordDelimiter(Z,Y+N.length):this.__isRecordDelimiter(Ce,Z,Y+N.length);if(w!==null&&this.__isEscape(Z,Y,J)&&this.__isQuote(Z,Y+w.length))Y+=w.length-1;else if(!Ce||He||u0||Gt||dt){this.state.quoting=!1,this.state.wasQuoting=!0,Y+=N.length-1;continue}else if(M===!1){let Tt=this.__error(new qt("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got"${String.fromCharCode(Ce)}"`,`atline${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Tt!==void 0)return Tt}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(N),Y+=N.length-1}else if(this.state.field.length!==0){if(M===!1){let Ce=this.__infoField(),dt=Object.keys(Jm).map(He=>Jm[He].equals(this.state.field.toString())?He:!1).filter(Boolean)[0],Gt=this.__error(new qt("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`aquoteisfoundonfield${JSON.stringify(Ce.column)}atline${Ce.lines},valueis${JSON.stringify(this.state.field.toString(p))}`,dt?`(${dt}bom)`:void 0],this.options,Ce,{field:this.state.field}));if(Gt!==void 0)return Gt}}else{this.state.quoting=!0,Y+=N.length-1;continue}if(this.state.quoting===!1){let Ce=this.__isRecordDelimiter(J,Z,Y);if(Ce!==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(),Y+=Ce-1;continue}if(C===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,Y+=Ce-1;continue}this.info.bytes=this.state.bufBytesStart+Y;let He=this.__onField();if(He!==void 0)return He;this.info.bytes=this.state.bufBytesStart+Y+Ce;let u0=this.__onRecord(i);if(u0!==void 0)return u0;if(E!==-1&&this.info.records>=E){this.state.stop=!0,a();return}}this.state.commenting=!1,Y+=Ce-1;continue}if(this.state.commenting)continue;if(I!==null&&(u===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(I,Z,Y,J)!==0){this.state.commenting=!0;continue}let dt=this.__isDelimite
Moreinfo:${u.url}`);let h=u.range&&u.range.length>0?u.range[0]?.start.line:void 0,M=!1;for(let z of a)if(z.remote||z.path.endsWith(p)&&z.content===l){c.push({title:A,message:d,file:z.path,startLine:h}),M=!0;break}M||T(`Buildx.convertWarningsToGitHubAnnotations:skippingwarningwithoutmatchingDockerfile${p}:${A}`)}return c}};var X2=_(require("fs"),1),$$=_(require("path"),1);var ZS=class t{static{o(this,"Build")}buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new i0,this.iidFilename=`build-iidfile-${St.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${St.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),s=e?.attrs||{},n=Object.entries(s).filter(([h])=>!r.has(h)),i=St.parseBoolOrDefault(s["fetch-by-commit"]),a=e?.ref||s.ref||gs.ref;a.startsWith("refs/")?a.startsWith("refs/pull/")&&St.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(a=a.replace(/\/merge$/g,"/head")):a=`refs/heads/${a}`;let c=`${wt.serverURL}/${gs.repo.owner}/${gs.repo.repo}.git`,u=e?.checksum||s.checksum,p=e?.subdir||s.subdir,l=e?.format;if(!l){if(l="fragment",n.length>0)l="query";else if(St.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(l="query")}catch{}}let A=gs.sha||a;a.startsWith("refs/pull/")&&a.endsWith("/head")&&(A=typeof gs.payload.pull_request?.head?.sha=="string"?gs.payload.pull_request.head.sha:a);let d=u||A;if(l==="query"){let h=[`ref=${i||u?a:d}`],M=i?d:u;M&&h.push(`checksum=${M}`),p&&p!=="."&&h.push(`subdir=${p}`);for(let[z,C]of n)h.push(`${z}=${C}`);return`${c}?${h.join("&")}`}return`${c}#${d}${p&&p!=="."?`:${p}`:""}`}getImageIDFilePath(){return $$.default.join(Dt.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(X2.default.existsSync(e))return X2.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return $$.default.join(Dt.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!X2.default.existsSync(e))return;let r=X2.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,s]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${s}`}static resolveSecretFile(e){let[r,s]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${s}`}static resolveSecretEnv(e){let[r,s]=t.parseSecretKvp(e);return`id=${r},env=${s}`}static resolveSecret(e,r){let[s,n]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!X2.default.existsSync(n))throw new Error(`secretfile${n}notfound`);return[s,n]}let i=Dt.tmpName({tmpdir:Dt.tmpDir()});return X2.default.writeFileSync(i,n),[s,i]}static getProvenanceInput(e){let r=Hn(e);if(!r)return r;try{return Ude(e)?`builder-id=${wt.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${wt.workflowRunURL(!0)}`;let r=ui(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of r)if(s.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return e;return`${e},builder-id=${wt.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let s="registry",n="",i="",a=ui(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let c of a){let u=c.toString().split(/(?<=^[^=]+?)=/).map(p=>p.trim());u[0]==="type"?s=u[1]:u[0]==="repository"?n=u[1]:u[0]==="ghtoken"&&(i=u[1])}return s==="gha"&&(n||(e=`${e},repository=${wt.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExp
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let n of s){if(n.length==1&&!n[0].startsWith("type="))return e=="local";for(let[i,a]of n.map(c=>c.split("=").map(u=>u.trim())))if(i=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let s=ui(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let n of s)for(let[i,a]of n.map(c=>c.split("=").map(u=>u.trim())))if(i=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=ui(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let n of r)for(let i of n)try{let a=St.parseBool(i);s.push(`disabled=${!a}`)}catch{s.push(i)}return s.join(",")}static hasGitAuthTokenSecret(e,r){for(let s of e){if(r&&s.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(s.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let s=e.indexOf("="),n=e.substring(0,s),i=e.substring(s+1);if(n.length==0||i.length==0)throw new Error(`${e}isnotavalidsecret`);return r&&La(i),[n,i]}};var j$=_(require("fs"),1),lqe=_(require("path"),1);var eN=class t{static{o(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new i0,this.metadataFilename=`bake-metadata-${St.generateRandomString()}.json`}getMetadataFilePath(){return lqe.default.join(Dt.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!j$.default.existsSync(e))return;let r=j$.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 s in e)"buildx.build.ref"in e[s]&&r.push(e[s]["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 s=["bake"],n,i=[],a=[...e.files||[],e.source];if(a){for(let u of a.map(p=>p?p.trim():""))if(u.length!=0){if(!St.isValidRef(u)){i.push(u);continue}if(n)throw new Error("Only one remote bake definition can be defined");n=u}}n&&s.push(n);for(let u of i)s.push("--file",u);if(e.overrides)for(let u of e.overrides)s.push("--set",u);if(e.vars)for(let u of e.vars)s.push("--var",u);if(e.allow)for(let u of e.allow)s.push("--allow",u);e.call&&s.push("--call",e.call),e.load&&s.push("--load"),e.noCache&&s.push("--no-cache"),e.provenance&&s.push("--provenance",e.provenance),e.push&&s.push("--push"),e.sbom&&s.push("--sbom",e.sbom);let c=await this.buildx.getCommand([...s,"--print",...e.targets||[]]);return await ke.getExecOutput(c.command,c.args,r).then(u=>{if(u.stderr.length>0&&u.exitCode!=0)throw new Error(`cannotparsebakedefinitions:${u.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(u.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let s in r.target){let n=r.target[s];n.attest&&Array.isArray(n.attest)&&(n.attest=n.attest.map(i=>t.parseAttestEntry(i))),n["cache-from"]&&Array.isArray(n["cache-from"])&&(n["cache-from"]=n["cache-from"].map(i=>t.parseCacheEntry(i))),n["cache-to"]&&Array.isArray(n["cache-to"])&&(n["cache-to"]=n["cache-to"].map(i=>t.parseCacheEntry(i))),n.output&&Array.isArray(n.output)&&(n.output=n.output.map(i=>t.parseExportEntry(i))),n.secret&&Array.isArray(n.secret)&&(n.secret=n.secret.map(i=>t.parseSecretEntry(i))),n.ssh&&Array.isArray(n.ssh)&&(n.ssh=n.ssh.map(i=>t.parseSSHEntry(i)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},s=ui(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let[i,a]=n.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(i){case"type":r.type=a;break;case"disabled":r.disabled=St.parseBool(a);break;default:r[i]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=ui(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(s.length===1&&!s[0].includes("="))return r.type="registry",r.ref=s[0],r;for(let n of s){let[i,a]=n.toString().
`).map(n=>n.trim()).filter(n=>n.length>0);return s}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var jWe=require("crypto"),uu=_(require("fs"),1),sd=_(require("path"),1);var s4=_(XE(),1),pu=_(lxe(),1),YWe=_(W0e(),1),Fg=_(kWe(),1);var A1e=_(XE(),1);var GWe=_(oa(),1);var UWe="application/vnd.oci.empty.v1+json";var cl=class{static{o(this,"Cosign")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await ke.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(T(`Cosign.isAvailablecmderr:${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(T(`Cosign.isAvailableerror:${r}`),!1));return T(`Cosign.isAvailable:${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await ke.getExecOutput(this.binPath,["version","--json"],{ignoreReturnCode:!0,silent:!0}).then(e=>{if(e.stderr.length>0&&e.exitCode!=0)throw new Error(e.stderr.trim());return JSON.parse(e.stdout.trim()).gitVersion}),this._version)}async printVersion(){await ke.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let s=r??await this.version();if(!s)return T("Cosign.versionSatisfies false: undefined version"),!1;let n=GWe.satisfies(s,e)||/^[0-9a-f]{7}$/.exec(s)!==null;return T(`Cosign.versionSatisfies${s}statisfies${e}:${n}`),n}static parseCommandOutput(e){let r,s,n,i;for(let a of e.split(/\r?\n/)){let c=a.trim();if(!c.startsWith("{")||!c.endsWith("}"))continue;let u;try{u=JSON.parse(c)}catch{continue}if(u&&Array.isArray(u.errors)&&u.errors.length>0&&(i=u.errors),!r&&u&&Array.isArray(u.manifests)&&u.manifests.length>0){let p=u.manifests[0];p?.artifactType===A1e.BUNDLE_V03_MEDIA_TYPE&&typeof p.digest=="string"?r=p.digest:p?.artifactType===UWe&&typeof p.digest=="string"&&(s=p.digest)}if(!n&&u&&u.mediaType===A1e.BUNDLE_V03_MEDIA_TYPE&&(n=u),n&&(r||s)){i=void 0;break}}return{bundle:n,signatureManifestDigest:r||s,errors:i}}};var d1e=_(require("fs"),1);var XT=class t{static{o(this,"ImageTools")}buildx;constructor(e){this.buildx=e?.buildx||new i0}async getCommand(e){return await this.buildx.getCommand(["imagetools",...e])}async getInspectCommand(e){return await this.getCommand(["inspect",...e])}async getCreateCommand(e){return await this.getCommand(["create",...e])}async inspectImage(e){return await this.inspect(e,"{{json .Image}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"config"),r;throw new Error("Unexpected output format")})}async inspectManifest(e){return await this.inspect(e,"{{json .Manifest}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"manifests"),r;throw new Error("Unexpected output format")})}async attestationDescriptors(e){let r=await this.inspectManifest(e);if(typeof r!="object"||r===null||!("manifests"in r)||!Array.isArray(r.manifests))throw new Error(`Nodescriptorfoundfor${e.name}`);let s=r.manifests.filter(a=>a.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return s;let n=e.platform,i=new Map;for(let a of r.manifests)a.digest&&i.set(a.digest,a);return s.filter(a=>{let c=a.annotations?.["vnd.docker.reference.digest"];if(!c)return!1;let u=i.get(c);return u?u.platform?.os===n.os&&u.platform?.architecture===n.architecture&&(u.platform?.variant??"")===(n.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],s=Dt.tmpName({tmpdir:Dt.tmpDir(),template:"imagetools-metadata-XXXXXX"}),n=[],i=[];for(let c of e.sources){if(c.startsWith("cwd://")){let u=c.substring(6);u.length>0&&n.push(u);continue}i.push(c)}if(e.tags)for(let c of e.tags)r.push("--tag",c);if(e.platforms)for(let c of e.platforms)r.push("--platform",c);if(e.annotations)for(let c of e.annotations)r.push("--annotation",c);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",s);for(let c of n)r.push("--file",c
${a.message}`),await new Promise(p=>setTimeout(p,Math.pow(2,c)*100))}throw a??new Error(`ImageToolsinspectcommandfailedfor${e.name}`)}async execInspect(e,r,s){return await ke.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(n=>{if(n.stderr.length>0&&n.exitCode!=0)throw new Error(n.stderr.trim());return s(JSON.parse(n.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown|not found: not found)/i.test(e)}};var HWe="application/vnd.in-toto+json";var XWe="https://fulcio.sigstore.dev",VWe="https://rekor.sigstore.dev",$We="https://timestamp.sigstore.dev",$f="https://search.sigstore.dev";var nKt="slsaprovenance1",nd=class t{static{o(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new cl,this.imageTools=e?.imageTools||new XT}async signAttestationManifests(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign attestation manifests");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 s=this.signingEndpoints(e.noTransparencyLog);W(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let n=t.noTransparencyLog(e.noTransparencyLog),i=[];await this.cosign.versionSatisfies(">=3.0.4")?await Mr("Creating Sigstore protobuf signing config",async()=>{let a=Dt.tmpName({template:"signing-config-XXXXXX.json",tmpdir:Dt.tmpDir()}),c=["signing-config","create","--with-default-services=true",`--out=${a}`];n&&c.push("--no-default-rekor=true"),await ke.exec(this.cosign.binPath,c,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),W(JSON.stringify(JSON.parse(uu.default.readFileSync(a,{encoding:"utf-8"})),null,2)),i.push(`--signing-config=${a}`)}):(i.push("--use-signing-config"),n&&i.push("--tlog-upload=false"));for(let a of e.imageNames){let c=await this.imageTools.attestationDigests({name:`${a}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let u of c){let p=`${a}@${u}`;await Mr(`Signingattestationmanifest${p}`,async()=>{let l=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...i];W(`[command]${this.cosign.binPath}${[...l,p].join(" ")}`);let A=await ke.getExecOutput(this.cosign.binPath,["--verbose",...l,p],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),d=cl.parseCommandOutput(A.stderr.trim());if(A.exitCode!=0)if(d.errors&&d.errors.length>0){let M=d.errors.map(z=>`-[${z.code}]${z.message}:${z.detail}`).join(`
${p}`),await new Promise(l=>setTimeout(l,Math.pow(2,a)*100));else throw i}else throw new Error(`Cosignverifycommandfailedwith:${c.stderr.trim().split(/\r?\n/).filter(p=>p.length>0).pop()??"unknown error"}`)}throw i}async signProvenanceBlobs(e){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 s=this.signingEndpoints(e.noTransparencyLog);W(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let n=t.getProvenanceBlobs(e);for(let i of Object.keys(n))await Mr(`Signing${i}`,async()=>{let a=n[i],c=sd.default.join(sd.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),u=t.getProvenanceSubjects(a);if(u.length===0){Rt(`Nosubjectsfoundinprovenance${i},skipsigning.`);return}let p=await t.signPayload({data:a,type:HWe},s),l=t.parseBundle(p);W("Provenance blob signed for:");for(let A of u){let[d,h]=Object.entries(A.digest)[0]||[];W(`-${A.name}(${d}:${h})`)}l.tlogID&&W(`AttestationsignatureuploadedtoRekortransparencylog:${$f}?logIndex=${l.tlogID}`),W(`WritingSigstorebundleto:${c}`),uu.default.writeFileSync(c,JSON.stringify(l.payload,null,2),{encoding:"utf-8"}),r[i]={...l,bundlePath:c,subjects:u}})}catch(s){throw new Error(`SigningBuildKitprovenanceblobsfailed:${s.message}`)}return r}async verifySignedArtifacts(e,r){let s={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[n,i]of Object.entries(e)){let a=sd.default.dirname(n);await Mr(`Verifyingsignaturebundle${i.bundlePath}`,async()=>{for(let c of i.subjects){let u=sd.default.join(a,c.name);W(`Verifyingsignedartifact${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??nKt];(r.noTransparencyLog||!i.tlogID)&&p.push("--use-signed-timestamps","--insecure-ignore-tlog");let l=await ke.getExecOutput(this.cosign.binPath,[...p,"--bundle",i.bundlePath,u],{ignoreReturnCode:!0});if(l.stderr.length>0&&l.exitCode!=0)throw new Error(l.stderr);s[u]={bundlePath:i.bundlePath,cosignArgs:p}}})}return s}async verifyArtifact(e,r,s){W("Verifying keyless verification bundle signature");let n=JSON.parse(uu.default.readFileSync(r,"utf-8")),i=(0,s4.bundleFromJSON)(n);W("Fetching Sigstore TUF trusted root metadata");let a=await YWe.getTrustedRoot(),c=(0,Fg.toTrustMaterial)(a);try{W("Verifying artifact signature");let u=(0,Fg.toSignedEntity)(i,uu.default.readFileSync(e)),p=t.parseCertificate(i),l=i.verificationMaterial.tlogEntries,A=l.length>0?l[0].logIndex:void 0;if(s?.subjectAlternativeName&&s?.subjectAlternativeName instanceof RegExp){let M=p.subjectAltName?.replace(/^uri:/i,"");if(M){if(!M.match(s.subjectAlternativeName))throw new Error(`SigningcertificatesubjectAlternativeName"${M}"doesnotmatchexpectedpattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let h=new Fg.Verifier(c).verify(u,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return T(`Sigstore.verifyArtifactsigner:${JSON.stringify(h)}`),{payload:n,certificate:p.toString(),tlogID:A}}catch(u){throw new Error(`Failedtoverifyartifactsignature:${u}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),W(`Uploadtotransparencylog:${e?"disabled":"enabled"}`),{fulcioURL:XWe,rekorURL:e?void 0:VWe,tsaServerURL:$We}}static noTransparencyLog(e){return e??wt.context.payload.repository?.private}static getProvenanceBlobs(e){let r=sd.default.join(e.localExportDir,"provenance.json");if(uu.default.existsSync(r))return{[r]:uu.default.readFileSync(r)};let s=uu.default.readdirSync(e.localExportDir,{withFileTypes:!0}),n=s.filter(i=>i.isDirectory());if(n.length>0&&n.length===s.length&&n.every(i=>uu.default.existsSync(sd.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let a of n){let c=
`,bakeTarget:Hn("bake-target")||"docker-metadata-action",githubToken:Hn("github-token")}}o(tLe,"getInputs");async function rLe(t,e){switch(t){case"workflow":return await iKt(e);case"git":return await oKt();default:throw new Error(`Invalidcontextsource:${t}`)}}o(rLe,"getContext");async function iKt(t){let e=wt.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 aKt(e.sha,t),...e}}o(iKt,"getContextFromWorkflow");async function oKt(){let t=await mp.context();return{commitDate:await mp.commitDate(t.sha),...t}}o(oKt,"getContextFromGit");async function aKt(t,e){let r=wt.context.payload;if(r.commits){let s=r.commits.find(n=>n.id===t)?.timestamp;if(s)return new Date(s)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let s=await e.github.octokit.rest.repos.getCommit({owner:wt.context.repo.owner,repo:wt.context.repo.repo,ref:t});if(s.data.commit.committer?.date)return new Date(s.data.commit.committer.date);throw new Error("Committer date not found")}catch(s){return T(`FailedtogetcommitdatefromGitHubAPI:${s.message}`),new Date}}o(aKt,"getCommitDateFromWorkflow");var gl=_(k$(),1),Uje=_(require("fs"),1),Gje=_(require("path"),1),oB=_(cLe(),1),yi=_(UVe(),1),oz=_(vje(),1);var ht=class t extends Error{static{o(this,"CsvError")}constructor(e,r,s,...n){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let i of n)for(let a in i){let c=i[a];this[a]=Buffer.isBuffer(c)?c.toString(s.encoding):c==null?c:JSON.parse(JSON.stringify(c))}}};var iB=o(function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},"is_object");var A_=o(function(t){let e=[];for(let r=0,s=t.length;r<s;r++){let n=t[r];if(n==null||n===!1)e[r]={disabled:!0};else if(typeof n=="string"||typeof n=="number")e[r]={name:`${n}`};else if(iB(n)){if(typeof n.name!="string")throw new ht("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property"name"isrequiredatposition${r}`,"when column is an object literal"]);e[r]=n}else throw new ht("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got${JSON.stringify(n)}atposition${r}`])}return e},"normalize_columns_array");var ine=class{static{o(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 s=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),s.copy(this.buf,e.length),this.length+=e.length}else{let r=this.length++;r===this.size&&this.resize();let s=this.clone();this.buf[0]=e,s.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.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},one=ine;var Tje=o(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((s,n)=>{let i=Buffer.from(String.fromCharCode(n),t.encoding);return n!==63&&i.length===1&&i[0]===63||s.push(i),s},[]),r=new Uint8Array(256);for(let s of e)r[s[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:Arr
`,a).length:A,p?(c===null?0:c.length)+u.length:0,p?u.length+A:0);return d<h},"__needMoreData"),parse:o(function(s,n,i,a){let{bom:c,comment_no_infix:u,delimiter_auto:p,encoding:l,from_line:A,ltrim:d,max_record_size:h,raw:M,relax_quotes:z,rtrim:C,skip_empty_lines:E,to:B,to_line:I}=this.options,{comment:w,escape:N,quote:x,record_delimiter:P}=this.options,{bomSkipped:j,delimiterDiscovered:Ee,delimiterBufPrevious:we,rawBuffer:Z,escapeIsQuote:Se}=this.state;if(!Ee&&p){let Ce;if(we===void 0?Ce=s:we!==void 0&&s===void 0?Ce=we:Ce=Buffer.concat([we,s]),s=void 0,n||Ce.length>p.size)this.options.delimiter=[Buffer.from(_je(Ce,this.options.delimiter_auto))],this.state.previousBuf=Ce,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=Ce;return}}let{previousBuf:Y}=this.state,J;if(Y===void 0)if(s===void 0){a();return}else J=s;else Y!==void 0&&s===void 0?J=Y:J=Buffer.concat([Y,s]);if(j===!1)if(c===!1)this.state.bomSkipped=!0;else if(J.length<3){if(n===!1){this.state.previousBuf=J;return}}else{for(let Ce in iz)if(iz[Ce].compare(J,0,iz[Ce].length)===0){let dt=iz[Ce].length;this.state.bufBytesStart+=dt,J=J.slice(dt);let Gt=nz({...this.original_options,encoding:Ce});for(let He in Gt)this.options[He]=Gt[He];({comment:w,escape:N,quote:x}=this.options);break}this.state.bomSkipped=!0}let _e=J.length,re;for(re=0;re<_e&&!this.__needMoreData(re,_e,n);re++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),I!==-1&&this.info.lines>I){this.state.stop=!0,a();return}this.state.quoting===!1&&P.length===0&&this.__autoDiscoverRecordDelimiter(J,re)&&(P=this.options.record_delimiter);let Ce=J[re];if(M===!0&&Z.append(Ce),(Ce===nd0||Ce===id0)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(N!==null&&this.state.quoting===!0&&this.__isEscape(J,re,Ce)&&re+N.length<_e)if(Se){if(this.__isQuote(J,re+N.length)){this.state.escaping=!0,re+=N.length-1;continue}}else{this.state.escaping=!0,re+=N.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(J,re))if(this.state.quoting===!0){let He=J[re+x.length],u0=C&&this.__isCharTrimable(J,re+x.length),Tt=w!==null&&this.__compareBytes(w,J,re+x.length,He),ce=this.__isDelimiter(J,re+x.length,He),Ci=P.length===0?this.__autoDiscoverRecordDelimiter(J,re+x.length):this.__isRecordDelimiter(He,J,re+x.length);if(N!==null&&this.__isEscape(J,re,Ce)&&this.__isQuote(J,re+N.length))re+=N.length-1;else if(!He||ce||Ci||Tt||u0){this.state.quoting=!1,this.state.wasQuoting=!0,re+=x.length-1;continue}else if(z===!1){let Gs=this.__error(new ht("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got"${String.fromCharCode(He)}"`,`atline${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Gs!==void 0)return Gs}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(x),re+=x.length-1}else if(this.state.field.length!==0){if(z===!1){let He=this.__infoField(),u0=Object.keys(iz).map(ce=>iz[ce].equals(this.state.field.toString())?ce:!1).filter(Boolean)[0],Tt=this.__error(new ht("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`aquoteisfoundonfield${JSON.stringify(He.column)}atline${He.lines},valueis${JSON.stringify(this.state.field.toString(l))}`,u0?`(${u0}bom)`:void 0],this.options,He,{field:this.state.field}));if(Tt!==void 0)return Tt}}else{this.state.quoting=!0,re+=x.length-1;continue}if(this.state.quoting===!1){let He=this.__isRecordDelimiter(Ce,J,re);if(He!==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)>=A){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),re+=He-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,re+=He-1;continue}this.info.bytes=this.state.bufBytesStart+r
`,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]!==s[n+p])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:o(function(s){let{encoding:n,raw:i,skip_records_with_error:a}=this.options,c=typeof s=="string"?new Error(s):s;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(c,i?this.state.rawBuffer.toString(n):void 0)}catch(u){return u}return}else return c},"__error"),__infoDataSet:o(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:o(function(){let{columns:s,raw:n,encoding:i}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:s===!0,index:this.state.record.length,raw:n?this.state.rawBuffer.toString(i):void 0}},"__infoRecord"),__infoField:o(function(){let{columns:s}=this.options,n=Array.isArray(s),i=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:i,column:n===!0?s.length>this.state.record.length?s[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var uh=o(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],s=d_(e),n=o(c=>{s.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),i=o(()=>{},"close"),a=s.parse(t,!0,n,i);if(a!==void 0)throw a;return r},"parse");function Pje(t){let e=[];if(t.length==1){let r=!1,s=uh(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let i=n.toString().split("=").map(a=>a.trim());if(i.length==1)e.push({name:i[0],enable:!0});else{r=!0;break}}if(!r)return Lje(e)}e=[];for(let r of t){let s={name:"",enable:!0},n=uh(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of n){let a=i.toString().split("=").map(c=>c.trim());if(a.length==1)s.name=a[0];else{let c=a[0].toLowerCase(),u=a[1];switch(c){case"name":{s.name=u;break}case"enable":{if(!["true","false"].includes(u))throw new Error(`Invalidenableattributevalue:${r}`);s.enable=/true/i.test(u);break}default:throw new Error(`Unknownimageattribute:${r}`)}}}if(s.name.length==0)throw new Error(`Imagenameattributeempty:${r}`);e.push(s)}return Lje(e)}o(Pje,"Transform");function Lje(t){Yd("Processing images input");for(let e of t)W(`name=${e.name},enable=${e.enable}`);return Jd(),t}o(Lje,"output");var cne=(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))(cne||{}),f_=(s=>(s.Branch="branch",s.Tag="tag",s.PR="pr",s))(f_||{}),h_=(r=>(r.Short="short",r.Long="long",r))(h_||{}),ane=class{static{o(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(",")}},ad0={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function Qje(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let s of t)e.push(cd0(s));let r=e.sort((s,n)=>Number(s.attrs.priority)<Number(n.attrs.priority)?1:Number(s.attrs.priority)>Number(n.attrs.priority)?-1:0);Yd("Processing tags input");for(let s of r)W(s.toString());return Jd(),r}o(Qje,"Transform");function cd0(t){let e=uh(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new ane;for(let s of e){let n=s.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim());if(n.length==1)r.attrs.value=n[0];else{let i=n[0].toLowerCase(),a=n[1];switch(i){case"type":{if(!Object.values(cne).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.hasOwnProp