varNDe=Object.create;varMS=Object.defineProperty;varvDe=Object.getOwnPropertyDescriptor;varRDe=Object.getOwnPropertyNames;varTDe=Object.getPrototypeOf,_De=Object.prototype.hasOwnProperty;varo=(t,e)=>MS(t,"name",{value:e,configurable:!0});varQDe=(t,e)=>()=>(t&&(e=t(t=0)),e);varm=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),vK=(t,e)=>{for(varrine)MS(t,r,{get:e[r],enumerable:!0})},PDe=(t,e,r,s)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofRDe(e))!_De.call(t,i)&&i!==r&&MS(t,i,{get:()=>e[i],enumerable:!(s=vDe(e,i))||s.enumerable});returnt};vark=(t,e,r)=>(r=t!=null?NDe(TDe(t)):{},PDe(e||!t||!t.__esModule?MS(r,"default",{value:t,enumerable:!0}):r,t));varwX=m(WA=>{"use strict";varBkt=require("net"),cLe=require("tls"),yk=require("http"),CX=require("https"),lLe=require("events"),xkt=require("assert"),uLe=require("util");WA.httpOverHttp=hLe;WA.httpsOverHttp=dLe;WA.httpOverHttps=fLe;WA.httpsOverHttps=pLe;functionhLe(t){vare=neweu(t);returne.request=yk.request,e}o(hLe,"httpOverHttp");functiondLe(t){vare=neweu(t);returne.request=yk.request,e.createSocket=IX,e.defaultPort=443,e}o(dLe,"httpsOverHttp");functionfLe(t){vare=neweu(t);returne.request=CX.request,e}o(fLe,"httpOverHttps");functionpLe(t){vare=neweu(t);returne.request=CX.request,e.createSocket=IX,e.defaultPort=443,e}o(pLe,"httpsOverHttps");functioneu(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||yk.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",o(function(s,i,n,a){for(varc=bX(i,n,a),l=0,u=e.requests.length;l<u;++l){varh=e.requests[l];if(h.host===c.host&&h.port===c.port){e.requests.splice(l,1),h.request.onSocket(s);return}}s.destroy(),e.removeSocket(s)},"onFree"))}o(eu,"TunnelingAgent");uLe.inherits(eu,lLe.EventEmitter);eu.prototype.addRequest=o(function(e,r,s,i){varn=this,a=Ek({request:e},n.options,bX(r,s,i));if(n.sockets.length>=this.maxSockets){n.requests.push(a);return}n.createSocket(a,function(c){c.on("free",l),c.on("close",u),c.on("agentRemove",u),e.onSocket(c);functionl(){n.emit("free",c,a)}o(l,"onFree");functionu(h){n.removeSocket(c),c.removeListener("free",l),c.removeListener("close",u),c.removeListener("agentRemove",u)}o(u,"onCloseOrRemove")})},"addRequest");eu.prototype.createSocket=o(function(e,r){vars=this,i={};s.sockets.push(i);varn=Ek({},s.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(n.localAddress=e.localAddress),n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+newBuffer(n.proxyAuth).toString("base64")),kh("making CONNECT request");vara=s.request(n);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",l),a.once("connect",u),a.once("error",h),a.end();functionc(d){d.upgrade=!0}o(c,"onResponse");functionl(d,f,p){process.nextTick(function(){u(d,f,p)})}o(l,"onUpgrade");functionu(d,f,p){if(a.removeAllListeners(),f.removeAllListeners(),d.statusCode!==200){kh("tunneling socket could not be established, statusCode=%d",d.statusCode),f.destroy();varA=newError("tunneling socket could not be established, statusCode="+d.statusCode);A.code="ECONNRESET",e.request.emit("error",A),s.removeSocket(i);return}if(p.length>0){kh("got illegal response body from proxy"),f.destroy();varA=newError("got illegal response body from proxy");A.code="ECONNRESET",e.request.emit("error",A),s.removeSocket(i);return}returnkh("tunneling connection has established"),s.sockets[s.sockets.indexOf(i)]=f,r(f)}o(u,"onConnect");functionh(d){a.removeAllListeners(),kh(`tunneling socket could not be established, cause=%s
`);f.push(g),n+=g.byteLength,A&&(n=null),i=t,s=o(async function*(){for(let C of f)C.stream?yield*C.stream():yield C},"action"),a=`multipart/form-data;boundary=${l}`}else if(_7(t))i=t,n=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(bC.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:QUe(t)}if((typeof i=="string"||bC.isBuffer(i))&&(n=Buffer.byteLength(i)),s!=null){let l;r=new ReadableStream({async start(){l=s(t)[Symbol.asyncIterator]()},async pull(u){let{value:h,done:d}=await l.next();if(d)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!D7(r)){let f=new Uint8Array(h);f.byteLength&&u.enqueue(f)}return u.desiredSize>0},async cancel(u){await l.return()},type:"bytes"})}return[{stream:r,source:i,length:n},a]}o(L7,"extractBody");function zUe(t,e=!1){return t instanceof ReadableStream&&(wM(!bC.isDisturbed(t),"The body has already been consumed."),wM(!t.locked,"The stream is locked.")),L7(t,e)}o(zUe,"safelyExtractBody");function $Ue(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}o($Ue,"cloneBody");function jUe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(jUe,"throwIfAborted");function JUe(t){return{blob(){return lm(this,r=>{let s=P7(this);return s===null?s="":s&&(s=GUe(s)),new FUe([r],{type:s})},t)},arrayBuffer(){return lm(this,r=>new Uint8Array(r).buffer,t)},text(){return lm(this,O7,t)},json(){return lm(this,WUe,t)},formData(){return lm(this,r=>{let s=P7(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let i=HUe(r,s);if(i==="failure")throw new TypeError("Failed to parse body as FormData.");let n=new Q7;return n[um]=i,n}case"application/x-www-form-urlencoded":{let i=new URLSearchParams(r.toString()),n=new Q7;for(let[a,c]of i)n.append(a,c);return n}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return lm(this,r=>new Uint8Array(r),t)}}}o(JUe,"bodyMixinMethods");function YUe(t){Object.assign(t.prototype,JUe(t))}o(YUe,"mixinBody");async function lm(t,e,r){if(LUe.brandCheck(t,r),F7(t))throw new TypeError("Body is unusable: Body has already been read");jUe(t[um]);let s=DUe(),i=o(a=>s.reject(a),"errorSteps"),n=o(a=>{try{s.resolve(e(a))}catch(c){i(c)}},"successSteps");return t[um].body==null?(n(Buffer.allocUnsafe(0)),s.promise):(await kUe(t[um].body,n,i),s.promise)}o(lm,"consumeBody");function F7(t){let e=t[um].body;return e!=null&&(e.stream.locked||bC.isDisturbed(e.stream))}o(F7,"bodyUnusable");function WUe(t){return JSON.parse(O7(t))}o(WUe,"parseJSONFromBytes");function P7(t){let e=t[um].headersList,r=MUe(e);return r==="failure"?null:r}o(P7,"bodyMimeType");U7.exports={extractBody:L7,safelyExtractBody:zUe,cloneBody:$Ue,mixinBody:YUe,streamRegistry:M7,hasFinalizationRegistry:k7,bodyUnusable:F7}});var K7=m((EMt,W7)=>{"use strict";var Pe=require("node:assert"),Ge=it(),{channels:q7}=XA(),BM=oM(),{RequestContentLengthMismatchError:xf,ResponseContentLengthMismatchError:KUe,RequestAbortedError:j7,HeadersTimeoutError:XUe,HeadersOverflowError:ZUe,SocketError:SB,InformationalError:dm,BodyTimeoutError:eqe,HTTPParserError:tqe,ResponseExceededMaxSizeError:rqe}=yt(),{kUrl:J7,kReset:an,kClient:RM,kParser:yr,kBlocking:BC,kRunning:Zs,kPending:sqe,kSize:G7,kWriting:Fh,kQueue:Ra,kNoRef:wC,kKeepAliveDefaultTimeout:iqe,kHostHeader:nqe,kPendingIdx:oqe,kRunningIdx:To,kError:_o,kPipelining:bB,kSocket:fm,kKeepAliveTimeoutValue:BB,kMaxHeadersSize:xM,kKeepAliveMaxTimeout:aqe,kKeepAliveTimeoutThreshold:cqe,kHeadersTimeout:lqe,kBodyTimeout:uqe,kStrictContentLength:TM,kMaxRequests:H7,kCounter:hqe,kMaxResponseSize:dqe,kOnError:fqe,kResume:Lh,kHTTPContext:Y7}=or(),Ac=MZ(),pqe=Buffer.alloc(0),EB=Buffer[Symbol.species],CB=Ge.addListener,Aqe=Ge.removeAllListeners,NM;async function mqe(){let t=process.env.JEST_WORKER_ID?lM():void 0,e;try{e=await WebAssembly.compile(UZ())}catch{e=await WebAssembly.compile(t||lM())}return awa
`}return q7.sendHeaders.hasSubscribers&&q7.sendHeaders.publish({request:e,headers:g,socket:p}),!l||f===0?z7(A,null,t,e,p,h,g,d):Ge.isBuffer(l)?z7(A,l,t,e,p,h,g,d):Ge.isBlobLike(l)?typeof l.stream=="function"?$7(A,l.stream(),t,e,p,h,g,d):wqe(A,l,t,e,p,h,g,d):Ge.isStream(l)?bqe(A,l,t,e,p,h,g,d):Ge.isIterable(l)?$7(A,l,t,e,p,h,g,d):Pe(!1),!0}o(Iqe,"writeH1");function bqe(t,e,r,s,i,n,a,c){Pe(n!==0||r[Zs]===0,"stream body cannot be pipelined");let l=!1,u=new xB({abort:t,socket:i,request:s,contentLength:n,client:r,expectsPayload:c,header:a}),h=o(function(A){if(!l)try{!u.write(A)&&this.pause&&this.pause()}catch(g){Ge.destroy(this,g)}},"onData"),d=o(function(){l||e.resume&&e.resume()},"onDrain"),f=o(function(){if(queueMicrotask(()=>{e.removeListener("error",p)}),!l){let A=new j7;queueMicrotask(()=>p(A))}},"onClose"),p=o(function(A){if(!l){if(l=!0,Pe(i.destroyed||i[Fh]&&r[Zs]<=1),i.off("drain",d).off("error",p),e.removeListener("data",h).removeListener("end",p).removeListener("close",f),!A)try{u.end()}catch(g){A=g}u.destroy(A),A&&(A.code!=="UND_ERR_INFO"||A.message!=="reset")?Ge.destroy(e,A):Ge.destroy(e)}},"onFinished");e.on("data",h).on("end",p).on("error",p).on("close",f),e.resume&&e.resume(),i.on("drain",d).on("error",p),e.errorEmitted??e.errored?setImmediate(()=>p(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>p(null)),(e.closeEmitted??e.closed)&&setImmediate(f)}o(bqe,"writeStream");function z7(t,e,r,s,i,n,a,c){try{e?Ge.isBuffer(e)&&(Pe(n===e.byteLength,"buffer body must have content length"),i.cork(),i.write(`${a}content-length:${n}\r
`,"latin1"):(Pe(n===null,"no body must not have content length"),i.write(`${a}\r
`,"latin1")),s.onRequestSent(),r[Lh]()}catch(l){t(l)}}o(z7,"writeBuffer");async function wqe(t,e,r,s,i,n,a,c){Pe(n===e.size,"blob body must have content length");try{if(n!=null&&n!==e.size)throw new xf;let l=Buffer.from(await e.arrayBuffer());i.cork(),i.write(`${a}content-length:${n}\r
`,"latin1"),i.write(l),i.uncork(),s.onBodySent(l),s.onRequestSent(),!c&&s.reset!==!1&&(i[an]=!0),r[Lh]()}catch(l){t(l)}}o(wqe,"writeBlob");async function $7(t,e,r,s,i,n,a,c){Pe(n!==0||r[Zs]===0,"iterator body cannot be pipelined");let l=null;function u(){if(l){let f=l;l=null,f()}}o(u,"onDrain");let h=o(()=>new Promise((f,p)=>{Pe(l===null),i[_o]?p(i[_o]):l=f}),"waitForDrain");i.on("close",u).on("drain",u);let d=new xB({abort:t,socket:i,request:s,contentLength:n,client:r,expectsPayload:c,header:a});try{for await(let f of e){if(i[_o])throw i[_o];d.write(f)||await h()}d.end()}catch(f){d.destroy(f)}finally{i.off("close",u).off("drain",u)}}o($7,"writeIterable");var xB=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:s,contentLength:i,client:n,expectsPayload:a,header:c}){this.socket=r,this.request=s,this.contentLength=i,this.client=n,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[Fh]=!0}write(e){let{socket:r,request:s,contentLength:i,client:n,bytesWritten:a,expectsPayload:c,header:l}=this;if(r[_o])throw r[_o];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(i!==null&&a+u>i){if(n[TM])throw new xf;process.emitWarning(new xf)}r.cork(),a===0&&(!c&&s.reset!==!1&&(r[an]=!0),i===null?r.write(`${l}transfer-encoding:chunked\r
`,"latin1"),r!==null&&i!==r){if(s[TM])throw new xf;process.emitWarning(new xf)}e[yr].timeout&&e[yr].timeoutType===pm&&e[yr].timeout.refresh&&e[yr].timeout.refresh(),s[Lh]()}}destroy(e){let{socket:r,client:s,abort:i}=this;r[Fh]=!1,e&&(Pe(s[Zs]<=1,"pipeline should only contain this request"),i(e))}};W7.exports=yqe});var nee=m((IMt,iee)=>{"use strict";var Qo=require("node:assert"),{pipeline:Sqe}=require("node:stream"),lt=it(),{RequestContentLengthMismatchError:OM,RequestAbortedError:X7,SocketError:xC,InformationalError:DM}=yt(),{kUrl:NB,kReset:RB,kClient:Am,kRunning:TB,kPending:Bqe,kQueue:Uh,kPendingIdx:kM,kRunningIdx:Ta,kError:Qa,kSocket:gs,kStrictContentLength:xqe,kOnError:MM,kMaxConcurrentStreams:see,kHTTP2Session:_a,kResume:qh,kSize:Nqe,kHTTPContext:vqe}=or(),ou=Symbol("open streams"),Z7,eee=!1,vB;try{vB=require("node:http2")}catch{vB={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:Rqe,HTTP2_HEADER_METHOD:Tqe,HTTP2_HEADER_PATH:_qe,HTTP2_HEADER_SCHEME:Qqe,HTTP2_HEADER_CONTENT_LENGTH:Pqe,HTTP2_HEADER_EXPECT:Oqe,HTTP2_HEADER_STATUS:Dqe}}=vB;function kqe(t){let e=[];for(let[r,s]of Object.entries(t))if(Array.isArray(s))for(let i of s)e.push(Buffer.from(r),Buffer.from(i));else e.push(Buffer.from(r),Buffer.from(s));return e}o(kqe,"parseH2Headers");async function Mqe(t,e){t[gs]=e,eee||(eee=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=vB.connect(t[NB],{createConnection:o(()=>e,"createConnection"),peerMaxConcurrentStreams:t[see]});r[ou]=0,r[Am]=t,r[gs]=e,lt.addListener(r,"error",Fqe),lt.addListener(r,"frameError",Uqe),lt.addListener(r,"end",qqe),lt.addListener(r,"goaway",Gqe),lt.addListener(r,"close",function(){let{[Am]:i}=this,{[gs]:n}=i,a=this[gs][Qa]||this[Qa]||new xC("closed",lt.getSocketInfo(n));if(i[_a]=null,i.destroyed){Qo(i[Bqe]===0);let c=i[Uh].splice(i[Ta]);for(let l=0;l<c.length;l++){let u=c[l];lt.errorRequest(i,u,a)}}}),r.unref(),t[_a]=r,e[_a]=r,lt.addListener(e,"error",function(i){Qo(i.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Qa]=i,this[Am][MM](i)}),lt.addListener(e,"end",function(){lt.destroy(this,new xC("other side closed",lt.getSocketInfo(this)))}),lt.addListener(e,"close",function(){let i=this[Qa]||new xC("closed",lt.getSocketInfo(this));t[gs]=null,this[_a]!=null&&this[_a].destroy(i),t[kM]=t[Ta],Qo(t[TB]===0),t.emit("disconnect",t[NB],[t],i),t[qh]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...i){return Vqe(t,...i)},resume(){Lqe(t)},destroy(i,n){s?queueMicrotask(n):e.destroy(i).on("close",n)},get destroyed(){return e.destroyed},busy(){return!1}}}o(Mqe,"connectH2");function Lqe(t){let e=t[gs];e?.destroyed===!1&&(t[Nqe]===0&&t[see]===0?(e.unref(),t[_a].unref()):(e.ref(),t[_a].ref()))}o(Lqe,"resumeH2");function Fqe(t){Qo(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[gs][Qa]=t,this[Am][MM](t)}o(Fqe,"onHttp2SessionError");function Uqe(t,e,r){if(r===0){let s=new DM(`HTTP/2:"frameError"received-type${t},code${e}`);this[gs][Qa]=s,this[Am][MM](s)}}o(Uqe,"onHttp2FrameError");function qqe(){let t=new xC("other side closed",lt.getSocketInfo(this[gs]));this.destroy(t),lt.destroy(this[gs],t)}o(qqe,"onHttp2SessionEnd");function Gqe(t){let e=this[Qa]||new xC(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,lt.getSocketInfo(this)),r=this[Am];if(r[gs]=null,r[vqe]=null,this[_a]!=null&&(this[_a].destroy(e),this[_a]=null),lt.destroy(this[gs],e),r[Ta]<r[Uh].length){let s=r[Uh][r[Ta]];r[Uh][r[Ta]++]=null,lt.errorRequest(r,s,e),r[kM]=r[Ta]}Qo(r[TB]===0),r.emit("disconnect",r[NB],[r],e),r[qh]()}o(Gqe,"onHTTP2GoAway");function Hqe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(Hqe,"shouldSendContentLength");function Vqe(t,e){let r=t[_a],{method:s,path:i,host:n,upgrade:a,expectContinue:c,signal:l,headers:u}=e,{body:h}=e;if(a)return lt.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let d={};for(let x=0;x<u.length;x+=2){let v=u[x+0],D=u[x+1];if(Array.isArray(D))for(let O=0;O<D.length;O++)d[v]?d[v]+=`,${D[O]}`:d[v]=D[O];else d[v]=D}let f,{hostname:p,port:A}=t[NB];d[Rqe]=
`);if(f===-1){ev("have not received end of HTTP headers yet..."),n();return}let p=d.slice(0,f).toString("ascii").split(`\r
`),A=p.shift();if(!A)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=A.split(" "),C=+g[1],E=g.slice(2).join(" "),I={};for(let S of p){if(!S)continue;let x=S.indexOf(":");if(x===-1)return t.destroy(),r(new Error(`InvalidheaderfromproxyCONNECTresponse:"${S}"`));let v=S.slice(0,x).toLowerCase(),D=S.slice(x+1).trimStart(),O=I[v];typeof O=="string"?I[v]=[O,D]:Array.isArray(O)?O.push(D):I[v]=D}ev("got proxy server response: %o %o",A,I),a(),e({connect:{statusCode:C,statusText:E,headers:I},buffered:d})}o(u,"ondata"),t.on("error",l),t.on("end",c),n()})}o(tZe,"parseProxyResponse");pg.parseProxyResponse=tZe});var rde=m($o=>{"use strict";var rZe=$o&&$o.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,i)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),sZe=$o&&$o.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),ede=$o&&$o.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&rZe(e,t,r);return sZe(e,t),e},tde=$o&&$o.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($o,"__esModule",{value:!0});$o.HttpsProxyAgent=void 0;var tv=ede(require("net")),Khe=ede(require("tls")),iZe=tde(require("assert")),nZe=tde(op()),oZe=Yhe(),aZe=require("url"),cZe=Whe(),YI=(0,nZe.default)("https-proxy-agent"),Xhe=o(t=>t.servername===void 0&&t.host&&!tv.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),rv=class extends oZe.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new aZe.URL(e):e,this.proxyHeaders=r?.headers??{},YI("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let s=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?Zhe(r,"headers"):null,host:s,port:i}}async connect(e,r){let{proxy:s}=this;if(!r.host)throw new TypeError('No "host" provided');let i;s.protocol==="https:"?(YI("Creating `tls.Socket`: %o",this.connectOpts),i=Khe.connect(Xhe(this.connectOpts))):(YI("Creating `net.Socket`: %o",this.connectOpts),i=tv.connect(this.connectOpts));let n=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=tv.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT${a}:${r.port}HTTP/1.1\r
`;if(s.username||s.password){let f=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;n["Proxy-Authorization"]=`Basic${Buffer.from(f).toString("base64")}`}n.Host=`${a}:${r.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let f of Object.keys(n))c+=`${f}:${n[f]}\r
`)+4,e.outputData[0].data=e._header+s.substring(i),Ag("Output buffer: %o",e.outputData[0].data));let n;return this.proxy.protocol==="https:"?(Ag("Creating `tls.Socket`: %o",this.connectOpts),n=SZe.connect(this.connectOpts)):(Ag("Creating `net.Socket`: %o",this.connectOpts),n=wZe.connect(this.connectOpts)),await(0,xZe.once)(n,"connect"),n}};sv.protocols=["http","https"];jo.HttpProxyAgent=sv;function vZe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}o(vZe,"omit")});var Qde=m(gv=>{"use strict";Object.defineProperty(gv,"__esModule",{value:!0});gv.state=void 0;gv.state={instrumenterImplementation:void 0}});var Yde=m(bv=>{"use strict";Object.defineProperty(bv,"__esModule",{value:!0});bv.state=void 0;bv.state={operationRequestMap:new WeakMap}});var NAe=m(Pg=>{"use strict";Object.defineProperty(Pg,"__esModule",{value:!0});var Wst=require("os"),Kst=require("util");function Xst(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}o(Xst,"_interopDefaultLegacy");var Zst=Xst(Kst);function eit(t,...e){process.stderr.write(`${Zst.default.format(t,...e)}${Wst.EOL}`)}o(eit,"log");var gAe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,EAe,I8=[],b8=[],qR=[];gAe&&w8(gAe);var CAe=Object.assign(t=>IAe(t),{enable:w8,enabled:S8,disable:tit,log:eit});function w8(t){EAe=t,I8=[],b8=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?b8.push(new RegExp(`^${s.substr(1)}$`)):I8.push(new RegExp(`^${s}$`));for(let s of qR)s.enabled=S8(s.namespace)}o(w8,"enable");function S8(t){if(t.endsWith("*"))return!0;for(let e of b8)if(e.test(t))return!1;for(let e of I8)if(e.test(t))return!0;return!1}o(S8,"enabled");function tit(){let t=EAe||"";return w8(""),t}o(tit,"disable");function IAe(t){let e=Object.assign(r,{enabled:S8(t),destroy:rit,log:CAe.log,namespace:t,extend:sit});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return o(r,"debug"),qR.push(e),e}o(IAe,"createDebugger");function rit(){let t=qR.indexOf(this);return t>=0?(qR.splice(t,1),!0):!1}o(rit,"destroy");function sit(t){let e=IAe(`${this.namespace}:${t}`);return e.log=this.log,e}o(sit,"extend");var M0=CAe,bAe=new Set,FR=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,GR,HR=M0("azure");HR.log=(...t)=>{M0.log(...t)};var B8=["verbose","info","warning","error"];FR&&(xAe(FR)?wAe(FR):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${FR}';loggingisnotenabled.Acceptablevalues:${B8.join(", ")}.`));function wAe(t){if(t&&!xAe(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${B8.join(",")}`);GR=t;let e=[];for(let r of bAe)BAe(r)&&e.push(r.namespace);M0.enable(e.join(","))}o(wAe,"setLogLevel");function iit(){return GR}o(iit,"getLogLevel");var yAe={verbose:400,info:300,warning:200,error:100};function nit(t){let e=HR.extend(t);return SAe(HR,e),{error:UR(e,"error"),warning:UR(e,"warning"),info:UR(e,"info"),verbose:UR(e,"verbose")}}o(nit,"createClientLogger");function SAe(t,e){e.log=(...r)=>{t.log(...r)}}o(SAe,"patchLogMethod");function UR(t,e){let r=Object.assign(t.extend(e),{level:e});if(SAe(t,r),BAe(r)){let s=M0.disable();M0.enable(s+","+r.namespace)}return bAe.add(r),r}o(UR,"createLogger");function BAe(t){return!!(GR&&yAe[t.level]<=yAe[GR])}o(BAe,"shouldEnable");function xAe(t){return B8.includes(t)}o(xAe,"isAzureLogLevel");Pg.AzureLogger=HR;Pg.createClientLogger=nit;Pg.getLogLevel=iit;Pg.setLogLevel=wAe});var v8=m(F0=>{"use strict";Object.defineProperty(F0,"__esModule",{value:!0});var Og=new WeakMap,VR=new WeakMap,L0=class t{static{o(this,"AbortSignal")}constructor(){this.onabort=null,Og.set(this,[]),VR.set(this,!1)}get aborted(){if(!VR.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return VR.get(this)}static get none(){return new t}addEventListener(e,r){if(!Og.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Og.get(this).push(r)}removeEventListener(e,r){if(!Og.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=Og.get(this),i=s.indexOf(r);i>-
Seehttps://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}o(zht,"logUnexpecedPropertyAccessOnce");function $ht(){Object.keys(b_).forEach(function(t){delete b_[t]})}o($ht,"resetLoggedProperties")});var S_=m(dl=>{"use strict";dl.__esModule=!0;dl.HandlebarsEnvironment=Yz;function hCe(t){return t&&t.__esModule?t:{default:t}}o(hCe,"_interopRequireDefault");var Dp=Fi(),jht=ho(),jz=hCe(jht),Jht=Hz(),Yht=aCe(),Wht=zz(),w_=hCe(Wht),Kht=$z(),Xht="4.7.9";dl.VERSION=Xht;var Zht=8;dl.COMPILER_REVISION=Zht;var edt=7;dl.LAST_COMPATIBLE_COMPILER_REVISION=edt;var tdt={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"};dl.REVISION_CHANGES=tdt;var Jz="[object Object]";function Yz(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Jht.registerDefaultHelpers(this),Yht.registerDefaultDecorators(this)}o(Yz,"HandlebarsEnvironment");Yz.prototype={constructor:Yz,logger:w_.default,log:w_.default.log,registerHelper:o(function(e,r){if(Dp.toString.call(e)===Jz){if(r)throw new jz.default("Arg not supported with multiple helpers");Dp.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(Dp.toString.call(e)===Jz)Dp.extend(this.partials,e);else{if(typeof r>"u")throw new jz.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(Dp.toString.call(e)===Jz){if(r)throw new jz.default("Arg not supported with multiple decorators");Dp.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:o(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:o(function(){Kht.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var rdt=w_.default.log;dl.log=rdt;dl.createFrame=Dp.createFrame;dl.logger=w_.default});var fCe=m((B_,dCe)=>{"use strict";B_.__esModule=!0;function Wz(t){this.string=t}o(Wz,"SafeString");Wz.prototype.toString=Wz.prototype.toHTML=function(){return""+this.string};B_.default=Wz;dCe.exports=B_.default});var pCe=m(Kz=>{"use strict";Kz.__esModule=!0;Kz.wrapHelper=sdt;function sdt(t,e){if(typeof t!="function")return t;var r=o(function(){var i=arguments[arguments.length-1];return arguments[arguments.length-1]=e(i),t.apply(this,arguments)},"wrapper");return r}o(sdt,"wrapHelper")});var CCe=m(vd=>{"use strict";vd.__esModule=!0;vd.checkRevision=ldt;vd.template=udt;vd.wrapProgram=x_;vd.resolvePartial=hdt;vd.invokePartial=ddt;vd.noop=yCe;function idt(t){return t&&t.__esModule?t:{default:t}}o(idt,"_interopRequireDefault");function ndt(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(ndt,"_interopRequireWildcard");var odt=Fi(),ay=ndt(odt),adt=ho(),Lu=idt(adt),Fu=S_(),ACe=Hz(),cdt=pCe(),mCe=$z();function ldt(t){var e=t&&t[0]||1,r=Fu.COMPILER_REVISION;if(!(e>=Fu.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Fu.COMPILER_REVISION))if(e<Fu.LAST_COMPATIBLE_COMPILER_REVISION){var s=Fu.REVISION_CHANGES[r],i=Fu.REVISION_CHANGES[e];throw new Lu.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 ("+i+").")}else throw new Lu.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(ldt,"checkRevision");function udt(t,e){if(!e)throw new Lu.default("No environment passed to template");if(!t||!t.main)throw new Lu.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,l){l.hash&&(c=ay.extend({},c,l.hash),l.ids&&(l.ids[0]=!0)),a=e.VM.res
Expecting`+j.join(", ")+", got '"+(this.terminals_[x]||x)+"'":se="Parse error on line "+(d+1)+": Unexpected "+(x==1?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(se,{text:this.lexer.match,token:this.terminals_[x]||x,line:this.lexer.yylineno,loc:C,expected:j})}}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+x);switch(O[0]){case 1:a.push(x),c.push(this.lexer.yytext),l.push(this.lexer.yylloc),a.push(O[1]),x=null,v?(x=v,v=null):(f=this.lexer.yyleng,h=this.lexer.yytext,d=this.lexer.yylineno,C=this.lexer.yylloc,p>0&&p--);break;case 2:if(q=this.productions_[O[1]][1],ee.$=c[c.length-q],ee._$={first_line:l[l.length-(q||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(q||1)].first_column,last_column:l[l.length-1].last_column},E&&(ee._$.range=[l[l.length-(q||1)].range[0],l[l.length-1].range[1]]),z=this.performAction.call(ee,h,f,d,this.yy,O[1],c,l),typeof z<"u")return z;q&&(a=a.slice(0,-1*q*2),c=c.slice(0,-1*q),l=l.slice(0,-1*q)),a.push(this.productions_[O[1]][0]),c.push(ee.$),l.push(ee._$),V=u[a[a.length-2]][a[a.length-1]],a.push(V);break;case 3:return!0}}return!0},"parse")},e=(function(){var s={EOF:1,parseError:o(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:o(function(n){return this._input=n,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:o(function(n){var a=n.length,c=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===l.length?this.yylloc.first_column:0)+l[l.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-a]),this},"unput"),more:o(function(){return this._more=!0,this},"more"),less:o(function(n){this.unput(this.match.slice(n))},"less"),pastInput:o(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
`+a+"^"},"showPosition"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,a,c,l,u,h;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),f=0;f<d.length&&(c=this._input.match(this.rules[d[f]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,l=f,!this.options.flex)));f++);return a?(h=a[0].match(/(?:\r\n?|\n).*/g),h&&(this.yylineno+=h.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:h?h[h.length-1].length-h[h.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],n=this.performAction.call(this,this.yy,this,d[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`.Unrecognizedtext.
${lP(u)}${u}`)}catch(u){if(u.code==="ENOENT")return;throw u}return uP(t,l)}o(bve,"insert");Io.exports.find=Owt;async function Owt(t,e){let r=Qw(t,e);try{return(await cP(r)).reduce((i,n)=>n&&n.key===e?uP(t,n):i,null)}catch(s){if(s.code==="ENOENT")return null;throw s}}o(Owt,"find");Io.exports.delete=Dwt;function Dwt(t,e,r={}){if(!r.removeFully)return bve(t,e,null,r);let s=Qw(t,e);return Ive(s,{recursive:!0,force:!0})}o(Dwt,"del");Io.exports.lsStream=wve;function wve(t){let e=J6(t),r=new xwt({objectMode:!0});return Promise.resolve().then(async()=>{let{default:s}=await Promise.resolve().then(()=>(aP(),oP)),i=await $6(e);return await s(i,async n=>{let a=Ql.join(e,n),c=await $6(a);await s(c,async l=>{let u=Ql.join(a,l),h=await $6(u);await s(h,async d=>{let f=Ql.join(u,d);try{let A=(await cP(f)).reduce((g,C)=>(g.set(C.key,C),g),new Map);for(let g of A.values()){let C=uP(t,g);C&&r.write(C)}}catch(p){if(p.code==="ENOENT")return;throw p}},{concurrency:z6})},{concurrency:z6})},{concurrency:z6}),r.end(),r}).catch(s=>r.emit("error",s)),r}o(wve,"lsStream");Io.exports.ls=kwt;async function kwt(t){return(await wve(t).collect()).reduce((r,s)=>(r[s.key]=s,r),{})}o(kwt,"ls");Io.exports.bucketEntries=cP;async function cP(t,e){let r=await wwt(t,"utf8");return Mwt(r,e)}o(cP,"bucketEntries");function Mwt(t){let e=[];return t.split(`
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||lP(s[1])!==s[0])return;let i;try{i=JSON.parse(s[1])}catch{}i&&e.push(i)}),e}o(Mwt,"_bucketEntries");Io.exports.bucketDir=J6;function J6(t){return Ql.join(t,`index-v${_wt}`)}o(J6,"bucketDir");Io.exports.bucketPath=Qw;function Qw(t,e){let r=Sve(e);return Ql.join.apply(Ql,[J6(t)].concat(Twt(r)))}o(Qw,"bucketPath");Io.exports.hashKey=Sve;function Sve(t){return Bve(t,"sha256")}o(Sve,"hashKey");Io.exports.hashEntry=lP;function lP(t){return Bve(t,"sha1")}o(lP,"hashEntry");function Bve(t,e){return Iwt.createHash(e).update(t).digest("hex")}o(Bve,"hash");function uP(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?Rwt(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}o(uP,"formatEntry");function $6(t){return Swt(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}o($6,"readdirOrEmpty")});var Ow=m(fP=>{"use strict";Object.defineProperty(fP,"__esModule",{value:!0});fP.LRUCache=void 0;var Lwt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Nve=new Set,Y6=typeof process=="object"&&process?process:{},vve=o((t,e,r,s)=>{typeof Y6.emitWarning=="function"?Y6.emitWarning(t,e,r,s):console.error(`[${r}]${e}:${t}`)},"I"),dP=globalThis.AbortController,xve=globalThis.AbortSignal;if(typeof dP>"u"){xve=class{static{o(this,"L")}onabort;_onabort=[];reason;aborted=!1;addEventListener(r,s){this._onabort.push(s)}},dP=class{static{o(this,"C")}constructor(){e()}signal=new xve;abort(r){if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(let s of this.signal._onabort)s(r);this.signal.onabort?.(r)}}};let t=Y6.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{t&&(t=!1,vve("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))},"t")}var Fwt=o(t=>!Nve.has(t),"G"),Yd=o(t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),"y"),Rve=o(t=>Yd(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?hP:null:null,"M"),hP=class extends Array{static{o(this,"z")}constructor(t){super(t),this.fill(0)}},Uwt=class Pw{static{o(this,"a")}heap;length;static#e=!1;static create(e){let r=Rve(e);if(!r)return[];Pw.#e=!0;let s=new Pw(e,r);return Pw.#e=!1,s}constructor(e,r){if(!Pw.#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]}},qwt=class Tve{static{o(this,"a")}#e;#t;#s;#r;#i;#n;#u;#l;get perf(){return this.#l}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#a;#f;#p;#h;#o;#y;#I;#g;#A;#x;#m;#S;#B;#E;#C;#b;#v;#c;#O;static unsafeExposeInternals(e){return{starts:e.#B,ttls:e.#E,autopurgeTimers:e.#C,sizes:e.#S,keyMap:e.#p,keyList:e.#h,valList:e.#o,next:e.#y,prev:e.#I,get head(){return e.#g},get tail(){return e.#A},free:e.#x,isBackgroundFetch:o(r=>e.#d(r),"isBackgroundFetch"),backgroundFetch:o((r,s,i,n)=>e.#G(r,s,i,n),"backgroundFetch"),moveToTail:o(r=>e.#P(r),"moveToTail"),indexes:o(r=>e.#R(r),"indexes"),rindexes:o(r=>e.#T(r),"rindexes"),isStale:o(r=>e.#w(r),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#f}get size(){return this.#a}get fetchMethod(){return this.#n}get memoMethod(){return this.#u}get dispose(){return this.#s}get onInsert(){return this.#r}get disposeAfter(){return this.#i}constructor(e){let{max:r=0,ttl:s,ttlResolution:i=1,ttlAutopurge:n,updateAgeOnGet:a,updateAgeOnHas:c,allowS
globstarwhile`,T,te,P,ke,ot),this.matchOne(T.slice(te),P.slice(ke),M))return this.debug("globstar found match!",te,R,ot),!0;if(ot==="."||ot===".."||!G.dot&&ot.charAt(0)==="."){this.debug("dot detected!",T,te,P,ke);break}this.debug("globstar swallow a segment, and continue"),te++}return!!(M&&(this.debug(`
>>>nomatch,partial?`,T,te,P,ke),te===R))}let st;if(typeof J=="string"?(st=ge===J,this.debug("string match",J,ge,st)):(st=J.test(ge),this.debug("pattern match",J,ge,st)),!st)return!1}if(y===R&&B===F)return!0;if(y===R)return M;if(B===F)return y===R-1&&T[y]==="";throw new Error("wtf?")}braceExpand(){return(0,t.braceExpand)(this.pattern,this.options)}parse(T){(0,r.assertValidPattern)(T);let P=this.options;if(T==="**")return t.GLOBSTAR;if(T==="")return"";let M,G=null;(M=T.match(E))?G=P.dot?S:I:(M=T.match(c))?G=(P.nocase?P.dot?d:h:P.dot?u:l)(M[1]):(M=T.match(x))?G=(P.nocase?P.dot?D:v:P.dot?O:L)(M):(M=T.match(f))?G=P.dot?A:p:(M=T.match(g))&&(G=C);let W=s.AST.fromGlob(T,this.options).toMMPattern();return G&&typeof W=="object"&&Reflect.defineProperty(W,"test",{value:G}),W}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let T=this.set;if(!T.length)return this.regexp=!1,this.regexp;let P=this.options,M=P.noglobstar?j:P.dot?se:Qe,G=new Set(P.nocase?["i"]:[]),W=T.map(R=>{let F=R.map(ge=>{if(ge instanceof RegExp)for(let te of ge.flags.split(""))G.add(te);return typeof ge=="string"?Vt(ge):ge===t.GLOBSTAR?t.GLOBSTAR:ge._src});F.forEach((ge,te)=>{let ke=F[te+1],ot=F[te-1];ge!==t.GLOBSTAR||ot===t.GLOBSTAR||(ot===void 0?ke!==void 0&&ke!==t.GLOBSTAR?F[te+1]="(?:\\/|"+M+"\\/)?"+ke:F[te]=M:ke===void 0?F[te-1]=ot+"(?:\\/|\\/"+M+")?":ke!==t.GLOBSTAR&&(F[te-1]=ot+"(?:\\/|\\/"+M+"\\/)"+ke,F[te+1]=t.GLOBSTAR))});let J=F.filter(ge=>ge!==t.GLOBSTAR);if(this.partial&&J.length>=1){let ge=[];for(let te=1;te<=J.length;te++)ge.push(J.slice(0,te).join("/"));return"(?:"+ge.join("|")+")"}return J.join("/")}).join("|"),[y,B]=T.length>1?["(?:",")"]:["",""];W="^"+y+W+B+"$",this.partial&&(W="^(?:\\/|"+y+W.slice(1,-1)+B+")$"),this.negate&&(W="^(?!"+W+").+$");try{this.regexp=new RegExp(W,[...G].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(T){return this.preserveMultipleSlashes?T.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(T)?["",...T.split(/\/+/)]:T.split(/\/+/)}match(T,P=this.partial){if(this.debug("match",T,this.pattern),this.comment)return!1;if(this.empty)return T==="";if(T==="/"&&P)return!0;let M=this.options;this.isWindows&&(T=T.split("\\").join("/"));let G=this.slashSplit(T);this.debug(this.pattern,"split",G);let W=this.set;this.debug(this.pattern,"set",W);let y=G[G.length-1];if(!y)for(let B=G.length-2;!y&&B>=0;B--)y=G[B];for(let B=0;B<W.length;B++){let R=W[B],F=G;if(M.matchBase&&R.length===1&&(F=[y]),this.matchOne(F,R,P))return M.flipNegate?!0:!this.negate}return M.flipNegate?!1:this.negate}static defaults(T){return t.minimatch.defaults(T).Minimatch}};t.Minimatch=ss;var Mn=Zve();Object.defineProperty(t,"AST",{enumerable:!0,get:o(function(){return Mn.AST},"get")});var vt=eRe();Object.defineProperty(t,"escape",{enumerable:!0,get:o(function(){return vt.escape},"get")});var Bo=uJ();Object.defineProperty(t,"unescape",{enumerable:!0,get:o(function(){return Bo.unescape},"get")}),t.minimatch.AST=s.AST,t.minimatch.Minimatch=ss,t.minimatch.escape=i.escape,t.minimatch.unescape=n.unescape}),QSt=Ws(t=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=void 0;var e=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,r=new Set,s=typeof process=="object"&&process?process:{},i=o((p,A,g,C)=>{typeof s.emitWarning=="function"?s.emitWarning(p,A,g,C):console.error(`[${g}]${A}:${p}`)},"ls"),n=globalThis.AbortController,a=globalThis.AbortSignal;if(typeof n>"u"){a=class{static{o(this,"os")}onabort;_onabort=[];reason;aborted=!1;addEventListener(g,C){this._onabort.push(C)}},n=class{static{o(this,"Lt")}constructor(){A()}signal=new a;abort(g){if(!this.signal.aborted){this.signal.reason=g,this.signal.aborted=!0;for(let C of this.signal._onabort)C(g);this.signal.onabort?.(g)}}};let p=s.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",A=o(()=>{p&&(p=!1,i("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 conte
`);if(f===-1){TP("have not received end of HTTP headers yet..."),n();return}let p=d.slice(0,f).toString("ascii").split(`\r
`),A=p.shift();if(!A)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=A.split(" "),C=+g[1],E=g.slice(2).join(" "),I={};for(let S of p){if(!S)continue;let x=S.indexOf(":");if(x===-1)return t.destroy(),r(new Error(`InvalidheaderfromproxyCONNECTresponse:"${S}"`));let v=S.slice(0,x).toLowerCase(),D=S.slice(x+1).trimStart(),O=I[v];typeof O=="string"?I[v]=[O,D]:Array.isArray(O)?O.push(D):I[v]=D}TP("got proxy server response: %o %o",A,I),a(),e({connect:{statusCode:C,statusText:E,headers:I},buffered:d})}o(u,"ondata"),t.on("error",l),t.on("end",c),n()})}o(cxt,"parseProxyResponse");hE.parseProxyResponse=cxt});var nTe=m(ga=>{"use strict";var lxt=ga&&ga.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,s,i)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),uxt=ga&&ga.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),sTe=ga&&ga.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&lxt(e,t,r);return uxt(e,t),e},iTe=ga&&ga.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ga,"__esModule",{value:!0});ga.HttpsProxyAgent=void 0;var $w=sTe(require("net")),tTe=sTe(require("tls")),hxt=iTe(require("assert")),dxt=iTe(op()),fxt=WI(),pxt=require("url"),Axt=eTe(),jw=(0,dxt.default)("https-proxy-agent"),_P=class extends fxt.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new pxt.URL(e):e,this.proxyHeaders=r?.headers??{},jw("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let s=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),i=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?rTe(r,"headers"):null,host:s,port:i}}async connect(e,r){let{proxy:s}=this;if(!r.host)throw new TypeError('No "host" provided');let i;if(s.protocol==="https:"){jw("Creating `tls.Socket`: %o",this.connectOpts);let f=this.connectOpts.servername||this.connectOpts.host;i=tTe.connect({...this.connectOpts,servername:f&&$w.isIP(f)?void 0:f})}else jw("Creating `net.Socket`: %o",this.connectOpts),i=$w.connect(this.connectOpts);let n=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=$w.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT${a}:${r.port}HTTP/1.1\r
`;if(s.username||s.password){let f=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;n["Proxy-Authorization"]=`Basic${Buffer.from(f).toString("base64")}`}n.Host=`${a}:${r.port}`,n["Proxy-Connection"]||(n["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let f of Object.keys(n))c+=`${f}:${n[f]}\r
`);let{connect:u,buffered:h}=await l;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200){if(e.once("socket",mxt),r.secureEndpoint){jw("Upgrading socket connection to TLS");let f=r.servername||r.host;return tTe.connect({...rTe(r,"host","path","port"),socket:i,servername:$w.isIP(f)?void 0:f})}return i}i.destroy();let d=new $w.Socket({writable:!1});return d.readable=!0,e.once("socket",f=>{jw("Replaying proxy buffer for failed request"),(0,hxt.default)(f.listenerCount("data")>0),f.push(h),f.push(null)}),d}};_P.protocols=["http","https"];ga.HttpsProxyAgent=_P;function mxt(t){t.resume()}o(mxt,"resume");function rTe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}o(rTe,"omit")});var lTe=m(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var oTe=require("buffer"),bA={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."};wh.ERRORS=bA;function gxt(t){if(!oTe.Buffer.isEncoding(t))throw new Error(bA.INVALID_ENCODING)}o(gxt,"checkEncoding");wh.checkEncoding=gxt;function aTe(t){return typeof t=="number"&&isFinite(t)&&Ixt(t)}o(aTe,"isFiniteInteger");wh.isFiniteInteger=aTe;function cTe(t,e){if(typeof t=="number"){if(!aTe(t)||t<0)throw new Error(e?bA.INVALID_OFFSET:bA.INVALID_LENGTH)}else throw new Error(e?bA.INVALID_OFFSET_NON_NUMBER:bA.INVALID_LENGTH_NON_NUMBER)}o(cTe,"checkOffsetOrLengthValue");function yxt(t){cTe(t,!1)}o(yxt,"checkLengthValue");wh.checkLengthValue=yxt;function Ext(t){cTe(t,!0)}o(Ext,"checkOffsetValue");wh.checkOffsetValue=Ext;function Cxt(t,e){if(t<0||t>e.length)throw new Error(bA.INVALID_TARGET_OFFSET)}o(Cxt,"checkTargetOffset");wh.checkTargetOffset=Cxt;function Ixt(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}o(Ixt,"isInteger");function bxt(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof oTe.Buffer.prototype[t]>"u")throw new Error(`PlatformdoesnotsupportBuffer.prototype.${t}.`)}o(bxt,"bigIntAndBufferInt64Check");wh.bigIntAndBufferInt64Check=bxt});var hTe=m(OJ=>{"use strict";Object.defineProperty(OJ,"__esModule",{value:!0});var rt=lTe(),uTe=4096,wxt="utf8",PJ=class t{static{o(this,"SmartBuffer")}constructor(e){if(this.length=0,this._encoding=wxt,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(rt.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(rt.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(rt.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(rt.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(uTe);else{if(typeof e<"u")throw new Error(rt.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(uTe)}}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)}read
`,TDt=/\u2014 (\S+) (\S+)\n/g;function _Dt(t,e){let r=t.inclusionProof,s=rK.fromString(r.checkpoint.envelope),i=RD.fromString(s.note);if(!QDt(s,e))throw new xS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return i}o(_Dt,"verifyCheckpoint");function QDt(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let i=e.find(n=>UPe.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint)&&n.baseURL.match(s.name));return i?UPe.crypto.verify(r,i.publicKey,s.signature):!1})}o(QDt,"verifySignedNote");var rK=class t{static{o(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(tK))throw new xS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(tK),s=e.slice(0,r+1),n=e.slice(r+tK.length).matchAll(TDt),a=Array.from(n,c=>{let[,l,u]=c,h=Buffer.from(u,"base64");if(h.length<5)throw new xS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:l,keyHint:h.subarray(0,4),signature:h.subarray(4)}});if(a.length===0)throw new xS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,a)}},RD=class t{static{o(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,s,i){this.origin=e,this.logSize=r,this.logHash=s,this.rest=i}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new xS.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],i=BigInt(r[1]),n=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(s,i,n,a)}};NS.LogCheckpoint=RD});var GPe=m(oK=>{"use strict";Object.defineProperty(oK,"__esModule",{value:!0});oK.verifyMerkleInclusion=DDt;var nK=cc(),sK=Ii(),PDt=Buffer.from([0]),ODt=Buffer.from([1]);function DDt(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),i=BigInt(e.logSize);if(s<0n||s>=i)throw new sK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${s}`});let{inner:n,border:a}=kDt(s,i);if(r.hashes.length!==n+a)throw new sK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,n),l=r.hashes.slice(n),u=GDt(t.canonicalizedBody),h=LDt(MDt(u,c,s),l);if(!nK.crypto.bufferEqual(h,e.logHash))throw new sK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}o(DDt,"verifyMerkleInclusion");function kDt(t,e){let r=FDt(t,e),s=UDt(t>>BigInt(r));return{inner:r,border:s}}o(kDt,"decompInclProof");function MDt(t,e,r){return e.reduce((s,i,n)=>r>>BigInt(n)&BigInt(1)?iK(i,s):iK(s,i),t)}o(MDt,"chainInner");function LDt(t,e){return e.reduce((r,s)=>iK(s,r),t)}o(LDt,"chainBorderRight");function FDt(t,e){return qDt(t^e-BigInt(1))}o(FDt,"innerProofSize");function UDt(t){return t.toString(2).split("1").length-1}o(UDt,"onesCount");function qDt(t){return t===0n?0:t.toString(2).length}o(qDt,"bitLength");function iK(t,e){return nK.crypto.digest("sha256",ODt,t,e)}o(iK,"hashChildren");function GDt(t){return nK.crypto.digest("sha256",PDt,t)}o(GDt,"hashLeaf")});var VPe=m(aK=>{"use strict";Object.defineProperty(aK,"__esModule",{value:!0});aK.verifyTLogSET=zDt;var HPe=cc(),HDt=Ii(),VDt=WE();function zDt(t,e){if(!(0,VDt.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(i=>{let n=$Dt(t),a=Buffer.from(HPe.json.canonicalize(n),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return HPe.crypto.verify(a,i.publicKey,c)}))throw new HDt.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}o(zDt,"verifyTLogSET");function $Dt(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:i}=t;return{body:i.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString("hex")}}o($Dt,"toVerificationPayload")});var $Pe=m(TD=>{"use strict";Object.defineProperty(TD,"__esModule",{value:!0});TD.verifyTLogBody=KDt;TD.verifyTLogInclusion=XDt;var zPe=vY(),uK=Ii(),cK=MPe(),lK=LPe(),jDt=FPe(),JDt=qPe(),YDt=GPe(),WDt=VPe();function KDt(t,e){let{kind:r,version:s}=t.kindVersion,i=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==i.kind||s!==i.apiVersion)throw new uK.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${s},received:${i.kind}/${i.apiVersion}`});switch(r){case"dsse":if(s==cK.DSSE_API_VERSION_V1)return(0,cK.verifyDSSETLogBody)(i,e);{let n=zPe.Entry.fromJSON(i);return(0,cK.verifyDSSETLogBodyV2)(n,e)}case"intoto":return(0,jDt.verifyIntotoTLogBody)(i,e);case"hashedrekord":if(s==lK.HASHEDREKORD_API_VERSION_V1)return(0,lK.verifyHashedRekordTLogBody)(i,e);{let n=zPe.Entry.fromJSON(i);return(0,lK.verifyHashedRekordTLogBodyV2)(n,e)}default:throw new uK.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}o(KDt,"verifyTLogBody");function XDt(t,e){let r=!1;if(ZDt(t)&&((0,WDt.verifyTLogSET)(t,e),r=!0),ekt(t)){let s=(0,JDt.verifyCheckpoint)(t,e);(0,YDt.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new uK.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}o(XDt,"verifyTLogInclusion");function ZDt(t){return t.inclusionPromise!==void 0}o(ZDt,"isTLogEntryWithInclusionPromise");function ekt(t){return t.inclusionProof!==void 0}o(ekt,"isTLogEntryWithInclusionProof")});var KPe=m(_D=>{"use strict";Object.defineProperty(_D,"__esModule",{value:!0});_D.Verifier=void 0;var tkt=require("util"),K
`;return c.replace(/\n$/,"")}o(zDe,"makeSnippet");var $De=zDe,jDe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],JDe=["scalar","sequence","mapping"];function YDe(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(s){e[String(s)]=r})}),e}o(YDe,"compileStyleAliases");function WDe(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(jDe.indexOf(r)===-1)throw new sn('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=YDe(e.styleAliases||null),JDe.indexOf(this.kind)===-1)throw new sn('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}o(WDe,"Type$1");var Ks=WDe;function RK(t,e){var r=[];return t[e].forEach(function(s){var i=r.length;r.forEach(function(n,a){n.tag===s.tag&&n.kind===s.kind&&n.multi===s.multi&&(i=a)}),r[i]=s}),r}o(RK,"compileList");function KDe(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function s(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(o(s,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(s);return t}o(KDe,"compileMap");function sk(t){return this.extend(t)}o(sk,"Schema$1");sk.prototype.extend=o(function(e){var r=[],s=[];if(e instanceof Ks)s.push(e);else if(Array.isArray(e))s=s.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(s=s.concat(e.explicit));else throw new sn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(n){if(!(n instanceof Ks))throw new sn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new sn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new sn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),s.forEach(function(n){if(!(n instanceof Ks))throw new sn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(sk.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(s),i.compiledImplicit=RK(i,"implicit"),i.compiledExplicit=RK(i,"explicit"),i.compiledTypeMap=KDe(i.compiledImplicit,i.compiledExplicit),i},"extend");var XDe=sk,ZDe=new Ks("tag:yaml.org,2002:str",{kind:"scalar",construct:o(function(t){return t!==null?t:""},"construct")}),eke=new Ks("tag:yaml.org,2002:seq",{kind:"sequence",construct:o(function(t){return t!==null?t:[]},"construct")}),tke=new Ks("tag:yaml.org,2002:map",{kind:"mapping",construct:o(function(t){return t!==null?t:{}},"construct")}),rke=new XDe({explicit:[ZDe,eke,tke]});function ske(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}o(ske,"resolveYamlNull");function ike(){return null}o(ike,"constructYamlNull");function nke(t){return t===null}o(nke,"isNull");var oke=new Ks("tag:yaml.org,2002:null",{kind:"scalar",resolve:ske,construct:ike,predicate:nke,represent:{canonical:o(function(){return"~"},"canonical"),lowercase:o(function(){return"null"},"lowercase"),uppercase:o(function(){return"NULL"},"uppercase"),camelcase:o(function(){return"Null"},"camelcase"),empty:o(function(){return""},"empty")},defaultStyle:"lowercase"});function ake(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}o(ake,"resolveYamlBoolean");function cke(t){r
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}o(QK,"simpleEscapeSequence");function iMe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}o(iMe,"charFromCodepoint");function ZK(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}o(ZK,"setProperty");var eX=new Array(256),tX=new Array(256);for(Cf=0;Cf<256;Cf++)eX[Cf]=QK(Cf)?1:0,tX[Cf]=QK(Cf);var Cf;function nMe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||JK,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}o(nMe,"State$1");function rX(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=$De(r),new sn(e,r)}o(rX,"generateError");function Be(t,e){throw rX(t,e)}o(Be,"throwError");function US(t,e){t.onWarning&&t.onWarning.call(null,rX(t,e))}o(US,"throwWarning");var PK={YAML:o(function(e,r,s){var i,n,a;e.version!==null&&Be(e,"duplication of %YAML directive"),s.length!==1&&Be(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(s[0]),i===null&&Be(e,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),a=parseInt(i[2],10),n!==1&&Be(e,"unacceptable YAML version of the document"),e.version=s[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&US(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:o(function(e,r,s){var i,n;s.length!==2&&Be(e,"TAG directive accepts exactly two arguments"),i=s[0],n=s[1],KK.test(i)||Be(e,"ill-formed tag handle (first argument) of the TAG directive"),Dh.call(e.tagMap,i)&&Be(e,'there is a previously declared suffix for "'+i+'" tag handle'),XK.test(n)||Be(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{Be(e,"tag prefix is malformed: "+n)}e.tagMap[i]=n},"handleTagDirective")};function Oh(t,e,r,s){var i,n,a,c;if(e<r){if(c=t.input.slice(e,r),s)for(i=0,n=c.length;i<n;i+=1)a=c.charCodeAt(i),a===9||32<=a&&a<=1114111||Be(t,"expected valid JSON character");else Xke.test(c)&&Be(t,"the stream contains non-printable characters");t.result+=c}}o(Oh,"captureSegment");function OK(t,e,r,s){var i,n,a,c;for(is.isObject(r)||Be(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),a=0,c=i.length;a<c;a+=1)n=i[a],Dh.call(e,n)||(ZK(e,n,r[n]),s[n]=!0)}o(OK,"mergeMappings");function JA(t,e,r,s,i,n,a,c,l){var u,h;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),u=0,h=i.length;u<h;u+=1)Array.isArray(i[u])&&Be(t,"nested arrays are not supported inside keys"),typeof i=="object"&&_K(i[u])==="[object Object]"&&(i[u]="[object Object]");if(typeof i=="object"&&_K(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),s==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(u=0,h=n.length;u<h;u+=1)OK(t,e,n[u],r);else OK(t,e,n,r);else!t.json&&!Dh.call(r,i)&&Dh.call(e,i)&&(t.line=a||t.line,t.lineStart=c||t.lineStart,t.position=l||t.position,Be(t,"duplicated mapping key")),ZK(e,i,n),delete r[i];return e}o(JA,"storeMappingPair");function lk(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Be(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}o(lk,"readLineBreak");function Jr(t,e,r){for(var s=0,i=t.input.charCodeAt(t.position);i!==0;){for(;If(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(hc(i))for(lk(t),i=t.input.charCodeAt(t.position),s++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCo
`,e-1))}o(uk,"writeFoldedLines");function oMe(t,e,r){var s,i,n,a,c,l,u,h,d=t.kind,f=t.result,p;if(p=t.input.charCodeAt(t.position),nn(p)||jA(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=t.input.charCodeAt(t.position+1),nn(i)||r&&jA(i)))return!1;for(t.kind="scalar",t.result="",n=a=t.position,c=!1;p!==0;){if(p===58){if(i=t.input.charCodeAt(t.position+1),nn(i)||r&&jA(i))break}else if(p===35){if(s=t.input.charCodeAt(t.position-1),nn(s))break}else{if(t.position===t.lineStart&&HS(t)||r&&jA(p))break;if(hc(p))if(l=t.line,u=t.lineStart,h=t.lineIndent,Jr(t,!1,-1),t.lineIndent>=e){c=!0,p=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=u,t.lineIndent=h;break}}c&&(Oh(t,n,a,!1),uk(t,t.line-l),n=a=t.position,c=!1),If(p)||(a=t.position+1),p=t.input.charCodeAt(++t.position)}return Oh(t,n,a,!1),t.result?!0:(t.kind=d,t.result=f,!1)}o(oMe,"readPlainScalar");function aMe(t,e){var r,s,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,s=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Oh(t,s,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)s=t.position,t.position++,i=t.position;else return!0;else hc(r)?(Oh(t,s,i,!0),uk(t,Jr(t,!1,e)),s=i=t.position):t.position===t.lineStart&&HS(t)?Be(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Be(t,"unexpected end of the stream within a single quoted scalar")}o(aMe,"readSingleQuotedScalar");function cMe(t,e){var r,s,i,n,a,c;if(c=t.input.charCodeAt(t.position),c!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=s=t.position;(c=t.input.charCodeAt(t.position))!==0;){if(c===34)return Oh(t,r,t.position,!0),t.position++,!0;if(c===92){if(Oh(t,r,t.position,!0),c=t.input.charCodeAt(++t.position),hc(c))Jr(t,!1,e);else if(c<256&&eX[c])t.result+=tX[c],t.position++;else if((a=rMe(c))>0){for(i=a,n=0;i>0;i--)c=t.input.charCodeAt(++t.position),(a=tMe(c))>=0?n=(n<<4)+a:Be(t,"expected hexadecimal character");t.result+=iMe(n),t.position++}else Be(t,"unknown escape sequence");r=s=t.position}else hc(c)?(Oh(t,r,s,!0),uk(t,Jr(t,!1,e)),r=s=t.position):t.position===t.lineStart&&HS(t)?Be(t,"unexpected end of the document within a double quoted scalar"):(t.position++,s=t.position)}Be(t,"unexpected end of the stream within a double quoted scalar")}o(cMe,"readDoubleQuotedScalar");function lMe(t,e){var r=!0,s,i,n,a=t.tag,c,l=t.anchor,u,h,d,f,p,A=Object.create(null),g,C,E,I;if(I=t.input.charCodeAt(t.position),I===91)h=93,p=!1,c=[];else if(I===123)h=125,p=!0,c={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=c),I=t.input.charCodeAt(++t.position);I!==0;){if(Jr(t,!0,e),I=t.input.charCodeAt(t.position),I===h)return t.position++,t.tag=a,t.anchor=l,t.kind=p?"mapping":"sequence",t.result=c,!0;r?I===44&&Be(t,"expected the node content, but found ','"):Be(t,"missed comma between flow collection entries"),C=g=E=null,d=f=!1,I===63&&(u=t.input.charCodeAt(t.position+1),nn(u)&&(d=f=!0,t.position++,Jr(t,!0,e))),s=t.line,i=t.lineStart,n=t.position,YA(t,e,LS,!1,!0),C=t.tag,g=t.result,Jr(t,!0,e),I=t.input.charCodeAt(t.position),(f||t.line===s)&&I===58&&(d=!0,I=t.input.charCodeAt(++t.position),Jr(t,!0,e),YA(t,e,LS,!1,!0),E=t.result),p?JA(t,c,A,C,g,E,s,i,n):d?c.push(JA(t,null,A,C,g,E,s,i,n)):c.push(g),Jr(t,!0,e),I=t.input.charCodeAt(t.position),I===44?(r=!0,I=t.input.charCodeAt(++t.position)):r=!1}Be(t,"unexpected end of the stream within a flow collection")}o(lMe,"readFlowCollection");function uMe(t,e){var r,s,i=rk,n=!1,a=!1,c=e,l=0,u=!1,h,d;if(d=t.input.charCodeAt(t.position),d===124)s=!1;else if(d===62)s=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)rk===i?i=d===43?TK:Kke:Be(t,"repeat of a chomping mode identifier");else if((h=sMe(d))>=0)h===0?Be(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Be(t,"repeat of an indentation width identifier"):(c=e+h-1,a=!0);else break;if(If(d)){do d=t.input.charCodeAt(++t.position);wh
`,n?1+l:l),n=!0,a=!0,l=0,r=t.position;!hc(d)&&d!==0;)d=t.input.charCodeAt(++t.position);Oh(t,r,t.position,!1)}return!0}o(uMe,"readBlockScalar");function DK(t,e){var r,s=t.tag,i=t.anchor,n=[],a,c=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Be(t,"tab characters must not be used in indentation")),!(l!==45||(a=t.input.charCodeAt(t.position+1),!nn(a))));){if(c=!0,t.position++,Jr(t,!0,-1)&&t.lineIndent<=e){n.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,YA(t,e,WK,!1,!0),n.push(t.result),Jr(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)Be(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return c?(t.tag=s,t.anchor=i,t.kind="sequence",t.result=n,!0):!1}o(DK,"readBlockSequence");function hMe(t,e,r){var s,i,n,a,c,l,u=t.tag,h=t.anchor,d={},f=Object.create(null),p=null,A=null,g=null,C=!1,E=!1,I;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=d),I=t.input.charCodeAt(t.position);I!==0;){if(!C&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Be(t,"tab characters must not be used in indentation")),s=t.input.charCodeAt(t.position+1),n=t.line,(I===63||I===58)&&nn(s))I===63?(C&&(JA(t,d,f,p,A,null,a,c,l),p=A=g=null),E=!0,C=!0,i=!0):C?(C=!1,i=!0):Be(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,I=s;else{if(a=t.line,c=t.lineStart,l=t.position,!YA(t,r,YK,!1,!0))break;if(t.line===n){for(I=t.input.charCodeAt(t.position);If(I);)I=t.input.charCodeAt(++t.position);if(I===58)I=t.input.charCodeAt(++t.position),nn(I)||Be(t,"a whitespace character is expected after the key-value separator within a block mapping"),C&&(JA(t,d,f,p,A,null,a,c,l),p=A=g=null),E=!0,C=!1,i=!1,p=t.tag,A=t.result;else if(E)Be(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=u,t.anchor=h,!0}else if(E)Be(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=u,t.anchor=h,!0}if((t.line===n||t.lineIndent>e)&&(C&&(a=t.line,c=t.lineStart,l=t.position),YA(t,e,FS,!0,i)&&(C?A=t.result:g=t.result),C||(JA(t,d,f,p,A,g,a,c,l),p=A=g=null),Jr(t,!0,-1),I=t.input.charCodeAt(t.position)),(t.line===n||t.lineIndent>e)&&I!==0)Be(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return C&&JA(t,d,f,p,A,null,a,c,l),E&&(t.tag=u,t.anchor=h,t.kind="mapping",t.result=d),E}o(hMe,"readBlockMapping");function dMe(t){var e,r=!1,s=!1,i,n,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&Be(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(r=!0,a=t.input.charCodeAt(++t.position)):a===33?(s=!0,i="!!",a=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(n=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):Be(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!nn(a);)a===33&&(s?Be(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),KK.test(i)||Be(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),eMe.test(n)&&Be(t,"tag suffix cannot contain flow indicator characters")}n&&!XK.test(n)&&Be(t,"tag name cannot contain such characters: "+n);try{n=decodeURIComponent(n)}catch{Be(t,"tag name is malformed: "+n)}return r?t.tag=n:Dh.call(t.tagMap,i)?t.tag=t.tagMap[i]+n:i==="!"?t.tag="!"+n:i==="!!"?t.tag="tag:yaml.org,2002:"+n:Be(t,'undeclared tag handle "'+i+'"'),!0}o(dMe,"readTagProperty");function fMe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Be(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!nn(r)&&!jA(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Be(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new nMe(t,e),s=t.indexOf("\0");for(s!==-1&&(r.position=s,Be(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)AMe(r);return r.documents}o(sX,"loadDocuments");function mMe(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var s=sX(t,r);if(typeof e!="function")return s;for(var i=0,n=s.length;i<n;i+=1)e(s[i])}o(mMe,"loadAll$1");function gMe(t,e){var r=sX(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new sn("expected a single document in the stream, but found more")}}o(gMe,"load$1");var yMe=mMe,EMe=gMe,iX={loadAll:yMe,load:EMe},nX=Object.prototype.toString,oX=Object.prototype.hasOwnProperty,hk=65279,CMe=9,aC=10,IMe=13,bMe=32,wMe=33,SMe=34,ik=35,BMe=37,xMe=38,NMe=39,vMe=42,aX=44,RMe=45,qS=58,TMe=61,_Me=62,QMe=63,PMe=64,cX=91,lX=93,OMe=96,uX=123,DMe=124,hX=125,Xs={};Xs[0]="\\0";Xs[7]="\\a";Xs[8]="\\b";Xs[9]="\\t";Xs[10]="\\n";Xs[11]="\\v";Xs[12]="\\f";Xs[13]="\\r";Xs[27]="\\e";Xs[34]='\\"';Xs[92]="\\\\";Xs[133]="\\N";Xs[160]="\\_";Xs[8232]="\\L";Xs[8233]="\\P";var kMe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],MMe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function LMe(t,e){var r,s,i,n,a,c,l;if(e===null)return{};for(r={},s=Object.keys(e),i=0,n=s.length;i<n;i+=1)a=s[i],c=String(e[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=t.compiledTypeMap.fallback[a],l&&oX.call(l.styleAliases,c)&&(c=l.styleAliases[c]),r[a]=c;return r}o(LMe,"compileStyleMap");function FMe(t){var e,r,s;if(e=t.toString(16).toUpperCase(),t<=255)r="x",s=2;else if(t<=65535)r="u",s=4;else if(t<=4294967295)r="U",s=8;else throw new sn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+is.repeat("0",s-e.length)+e}o(FMe,"encodeHex");var UMe=1,cC=2;function qMe(t){this.schema=t.schema||JK,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=is.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=LMe(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?cC:UMe,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}o(qMe,"State");function kK(t,e){for(var r=is.repeat(" ",e),s=0,i=-1,n="",a,c=t.length;s<c;)i=t.indexOf(`
`+t.slice(a+1):l+=t.slice(i),l.slice(1)}o(qK,"foldLine");function JMe(t){for(var e="",r=0,s,i=0;i<t.length;r>=65536?i+=2:i++)r=nC(t,i),s=Xs[r],!s&&lC(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=s||FMe(r);return e}o(JMe,"escapeString");function YMe(t,e,r){var s="",i=t.tag,n,a,c;for(n=0,a=r.length;n<a;n+=1)c=r[n],t.replacer&&(c=t.replacer.call(r,String(n),c)),(Kl(t,e,c,!1,!1)||typeof c>"u"&&Kl(t,e,null,!1,!1))&&(s!==""&&(s+=","+(t.condenseFlow?"":" ")),s+=t.dump);t.tag=i,t.dump="["+s+"]"}o(YMe,"writeFlowSequence");function GK(t,e,r,s){var i="",n=t.tag,a,c,l;for(a=0,c=r.length;a<c;a+=1)l=r[a],t.replacer&&(l=t.replacer.call(r,String(a),l)),(Kl(t,e+1,l,!0,!0,!1,!0)||typeof l>"u"&&Kl(t,e+1,null,!0,!0,!1,!0))&&((!s||i!=="")&&(i+=nk(t,e)),t.dump&&aC===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=n,t.dump=i||"[]"}o(GK,"writeBlockSequence");function WMe(t,e,r){var s="",i=t.tag,n=Object.keys(r),a,c,l,u,h;for(a=0,c=n.length;a<c;a+=1)h="",s!==""&&(h+=", "),t.condenseFlow&&(h+='"'),l=n[a],u=r[l],t.replacer&&(u=t.replacer.call(r,l,u)),Kl(t,e,l,!1,!1)&&(t.dump.length>1024&&(h+="? "),h+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Kl(t,e,u,!1,!1)&&(h+=t.dump,s+=h));t.tag=i,t.dump="{"+s+"}"}o(WMe,"writeFlowMapping");function KMe(t,e,r,s){var i="",n=t.tag,a=Object.keys(r),c,l,u,h,d,f;if(t.sortKeys===!0)a.sort();else if(typeof t.sortKeys=="function")a.sort(t.sortKeys);else if(t.sortKeys)throw new sn("sortKeys must be a boolean or a function");for(c=0,l=a.length;c<l;c+=1)f="",(!s||i!=="")&&(f+=nk(t,e)),u=a[c],h=r[u],t.replacer&&(h=t.replacer.call(r,u,h)),Kl(t,e+1,u,!0,!0,!0)&&(d=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,d&&(t.dump&&aC===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,d&&(f+=nk(t,e)),Kl(t,e+1,h,!0,d)&&(t.dump&&aC===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,i+=f));t.tag=n,t.dump=i||"{}"}o(KMe,"writeBlockMapping");function HK(t,e,r){var s,i,n,a,c,l;for(i=r?t.explicitTypes:t.implicitTypes,n=0,a=i.length;n<a;n+=1)if(c=i[n],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof e=="object"&&e instanceof c.instanceOf)&&(!c.predicate||c.predicate(e))){if(r?c.multi&&c.representName?t.tag=c.representName(e):t.tag=c.tag:t.tag="?",c.represent){if(l=t.styleMap[c.tag]||c.defaultStyle,nX.call(c.represent)==="[object Function]")s=c.represent(e,l);else if(oX.call(c.represent,l))s=c.represent[l](e,l);else throw new sn("!<"+c.tag+'> tag resolver accepts not "'+l+'" style');t.dump=s}return!0}return!1}o(HK,"detectType");function Kl(t,e,r,s,i,n,a){t.tag=null,t.dump=r,HK(t,r,!1)||HK(t,r,!0);var c=nX.call(t.dump),l=s,u;s&&(s=t.flowLevel<0||t.flowLevel>e);var h=c==="[object Object]"||c==="[object Array]",d,f;if(h&&(d=t.duplicates.indexOf(r),f=d!==-1),(t.tag!==null&&t.tag!=="?"||f||t.indent!==2&&e>0)&&(i=!1),f&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(h&&f&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),c==="[object Object]")s&&Object.keys(t.dump).length!==0?(KMe(t,e,t.dump,i),f&&(t.dump="&ref_"+d+t.dump)):(WMe(t,e,t.dump),f&&(t.dump="&ref_"+d+" "+t.dump));else if(c==="[object Array]")s&&t.dump.length!==0?(t.noArrayIndent&&!a&&e>0?GK(t,e-1,t.dump,i):GK(t,e,t.dump,i),f&&(t.dump="&ref_"+d+t.dump)):(YMe(t,e,t.dump),f&&(t.dump="&ref_"+d+" "+t.dump));else if(c==="[object String]")t.tag!=="?"&&$Me(t,t.dump,e,n,l);else{if(c==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new sn("unacceptable kind of an object to dump "+c)}t.tag!==null&&t.tag!=="?"&&(u=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",t.dump=u+" "+t.dump)}return!0}o(Kl,"writeNode");function XMe(t,e){var r=[],s=[],i,n;for(ak(t,r,s),i=0,n=s.length;i<n;i+=1)e.duplicates.push(r[s[i]]);e.usedDuplicates=new Array(n)}o(XMe,"getDuplicateReferences");function ak(t,e,r){var s,i,n;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,n=t.length;i<n;i+=1)ak(t[i],e,r);else for(s=Object.keys(t),i=0,n=s.length;i<n;i+=1)ak(t[s[i]],e,r)}o(ak,"inspectNode");function ZMe(t,e){e=e||
`:""}o(ZMe,"dump$1");var eLe=ZMe,tLe={dump:eLe};function dk(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}o(dk,"renamed");var mX=iX.load,ukt=iX.loadAll,hkt=tLe.dump;var dkt=dk("safeLoad","load"),fkt=dk("safeLoadAll","loadAll"),pkt=dk("safeDump","dump");var yX=k(require("os"),1);function Xl(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(Xl,"toCommandValue");function fk(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}o(fk,"toCommandProperties");function Zl(t,e,r){let s=new pk(t,e,r);process.stdout.write(s.toString()+yX.EOL)}o(Zl,"issueCommand");function Ak(t,e=""){Zl(t,{},e)}o(Ak,"issue");var gX="::",pk=class{static{o(this,"Command")}constructor(e,r,s){e||(e="missing.command"),this.command=e,this.properties=r,this.message=s}toString(){let e=gX+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let s in this.properties)if(this.properties.hasOwnProperty(s)){let i=this.properties[s];i&&(r?r=!1:e+=",",e+=`${s}=${iLe(i)}`)}}return e+=`${gX}${sLe(this.message)}`,e}};function sLe(t){return Xl(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(sLe,"escapeData");function iLe(t){return Xl(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(iLe,"escapeProperty");var EX=k(require("crypto"),1),zS=k(require("fs"),1),VS=k(require("os"),1);function $S(t,e){let r=process.env[`GITHUB_${t}`];if(!r)throw new Error(`Unabletofindenvironmentvariableforfilecommand${t}`);if(!zS.existsSync(r))throw new Error(`Missingfileatpath:${r}`);zS.appendFileSync(r,`${Xl(e)}${VS.EOL}`,{encoding:"utf8"})}o($S,"issueFileCommand");function mk(t,e){let r=`ghadelimiter_${EX.randomUUID()}`,s=Xl(e);if(t.includes(r))throw new Error(`Unexpectedinput:nameshouldnotcontainthedelimiter"${r}"`);if(s.includes(r))throw new Error(`Unexpectedinput:valueshouldnotcontainthedelimiter"${r}"`);return`${t}<<${r}${VS.EOL}${s}${VS.EOL}${r}`}o(mk,"prepareKeyValueMessage");var rF=k(require("os"),1),poe=k(require("path"),1);var hI=k(require("http"),1),H2=k(require("https"),1);function gk(t){let e=t.protocol==="https:";if(nLe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new jS(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new jS(`http://${r}`)}else return}o(gk,"getProxyUrl");function nLe(t){if(!t.hostname)return!1;let e=t.hostname;if(oLe(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let s;t.port?s=Number(t.port):t.protocol==="http:"?s=80:t.protocol==="https:"&&(s=443);let i=[t.hostname.toUpperCase()];typeof s=="number"&&i.push(`${i[0]}:${s}`);for(let n of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(n==="*"||i.some(a=>a===n||a.endsWith(`.${n}`)||n.startsWith(".")&&a.endsWith(`${n}`)))return!0;return!1}o(nLe,"checkBypass");function oLe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}o(oLe,"isLoopbackAddress");var jS=class extends URL{static{o(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var td=k(uC(),1),jne=k($m(),1);var Or=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(a){a(n)})}return o(i,"adopt"),new(r||(r=Promise))(function(n,a){function c(h){try{u(s.next(h))}catch(d){a(d)}}o(c,"fulfilled");function l(h){try{u(s.throw(h))}catch(d){a(d)}}o(l,"rejected");function u(h){h.done?n(h.value):i(h.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})},ko;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[
Supportbooleaninputlist:\`true | True | TRUE | false | False | FALSE\``)}o(Jf,"getBooleanInput");functiongI(t,e){if(process.env.GITHUB_OUTPUT||"")return$S("OUTPUT",mk(t,e));process.stdout.write(rF.EOL),Zl("set-output",{name:t},Xl(e))}o(gI,"setOutput");functionAoe(t){process.exitCode=tF.Failure,Ym(t)}o(Aoe,"setFailed");functionmu(){returnprocess.env.RUNNER_DEBUG==="1"}o(mu,"isDebug");functionQ(t){Zl("debug",{},t)}o(Q,"debug");functionYm(t,e={}){Zl("error",fk(e),tinstanceofError?t.toString():t)}o(Ym,"error");functionDt(t,e={}){Zl("warning",fk(e),tinstanceofError?t.toString():t)}o(Dt,"warning");functionH(t){process.stdout.write(t+rF.EOL)}o(H,"info");functionU$e(t){Ak("group",t)}o(U$e,"startGroup");functionq$e(){Ak("endgroup")}o(q$e,"endGroup");functionZt(t,e){returnF$e(this,void0,void0,function*(){U$e(t);letr;try{r=yielde()}finally{q$e()}returnr})}o(Zt,"group");functiondn(t,e){if(process.env.GITHUB_STATE||"")return$S("STATE",mk(t,e));Zl("save-state",{name:t},Xl(e))}o(dn,"saveState");functionmoe(t){returnprocess.env[`STATE_${t}`]||""}o(moe,"getState");varYT=k(require("fs"),1),uz=k(require("os"),1),hz=k(require("path"),1);varyoe=k(require("os"),1);functionyI(t){returnt==null?"":typeoft=="string"||tinstanceofString?t:JSON.stringify(t)}o(yI,"toCommandValue");functionEoe(t,e,r){lets=newsF(t,e,r);process.stdout.write(s.toString()+yoe.EOL)}o(Eoe,"issueCommand");vargoe="::",sF=class{static{o(this,"Command")}constructor(e,r,s){e||(e="missing.command"),this.command=e,this.properties=r,this.message=s}toString(){lete=goe+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";letr=!0;for(letsinthis.properties)if(this.properties.hasOwnProperty(s)){leti=this.properties[s];i&&(r?r=!1:e+=",",e+=`${s}=${H$e(i)}`)}}returne+=`${goe}${G$e(this.message)}`,e}};functionG$e(t){returnyI(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(G$e,"escapeData");functionH$e(t){returnyI(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(H$e,"escapeProperty");varwoe=k(require("os"),1);varIoe=require("os"),EI=require("fs");variF=function(t,e,r,s){functioni(n){returnninstanceofr?n:newr(function(a){a(n)})}returno(i,"adopt"),new(r||(r=Promise))(function(n,a){functionc(h){try{u(s.next(h))}catch(d){a(d)}}o(c,"fulfilled");functionl(h){try{u(s.throw(h))}catch(d){a(d)}}o(l,"rejected");functionu(h){h.done?n(h.value):i(h.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})},{access:V$e,appendFile:z$e,writeFile:$$e}=EI.promises,Coe="GITHUB_STEP_SUMMARY";varnF=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){returniF(this,void0,void0,function*(){if(this._filePath)returnthis._filePath;lete=process.env[Coe];if(!e)thrownewError(`Unable to find environment variable for $${Coe}. Check if your runtime environment supports job summaries.`);try{yieldV$e(e,EI.constants.R_OK|EI.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={}){leti=Object.entries(s).map(([n,a])=>`${n}="${a}"`).join("");returnr?`<${e}${i}>${r}</${e}>`:`<${e}${i}>`}write(e){returniF(this,void0,void0,function*(){letr=!!e?.overwrite,s=yieldthis.filePath();returnyield(r?$$e:z$e)(s,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){returniF(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(Ioe.EOL)}addCodeBlock(e,r){lets=Object.assign({},r&&{lang:r}),i=this.wrap("pre",this.wrap("code",e),s);returnthis.addRaw(i).addEOL()}addList(e,r=!1){lets=r?"ol":"ul",i=e.map(a=>this.wrap("li",a)).join(""),n=this.wrap(s,i);returnthis.addRaw(n).addEOL()}addTable(e){letr=e.map(i=>{letn=i.map(a=>{if(typeofa=="string")returnthis.wrap("td",a);l
${iXe.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function kN(t){return t instanceof Qi?!0:tp(t)&&t.name==="RestError"}o(kN,"isRestError");function fn(t,e){return Buffer.from(t,e)}o(fn,"stringToUint8Array");var MN=k(require("node:http"),1),LN=k(require("node:https"),1),RU=k(require("node:zlib"),1),ghe=require("node:stream");var Vo=$I("ts-http-runtime");var nXe={};function jI(t){return t&&typeof t.pipe=="function"}o(jI,"isReadableStream");function mhe(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(mhe,"isStreamComplete");function yhe(t){return t&&typeof t.byteLength=="number"}o(yhe,"isArrayBuffer");var FN=class extends ghe.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(i){s(i)}}constructor(e){super(),this.progressCallback=e}},TU=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 _c("The operation was aborted. Request has already been canceled.");s=o(u=>{u.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",s)}let i;e.timeout>0&&(i=setTimeout(()=>{let u=new Ga;Vo.info(`requestto'${u.sanitizeUrl(e.url)}'timedout.canceling...`),r.abort()},e.timeout));let n=e.headers.get("Accept-Encoding"),a=n?.includes("gzip")||n?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let u=lXe(c);u!==null&&e.headers.set("Content-Length",u)}let l;try{if(c&&e.onUploadProgress){let A=e.onUploadProgress,g=new FN(A);g.on("error",C=>{Vo.error("Error in upload progress",C)}),jI(c)?c.pipe(g):g.end(c),c=g}let u=await this.makeRequest(e,r,c);i!==void 0&&clearTimeout(i);let h=oXe(u),f={status:u.statusCode??0,headers:h,request:e};if(e.method==="HEAD")return u.resume(),f;l=a?aXe(u,h):u;let p=e.onDownloadProgress;if(p){let A=new FN(p);A.on("error",g=>{Vo.error("Error in download progress",g)}),l.pipe(A),l=A}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(f.status)?f.readableStreamBody=l:f.bodyAsText=await cXe(l),f}finally{if(e.abortSignal&&s){let u=Promise.resolve();jI(c)&&(u=mhe(c));let h=Promise.resolve();jI(l)&&(h=mhe(l)),Promise.all([u,h]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(d=>{Vo.warning("Error when cleaning up abortListener on httpRequest",d)})}}}makeRequest(e,r,s){let i=new URL(e.url),n=i.protocol!=="https:";if(n&&!e.allowInsecureConnection)throw new Error(`Cannotconnectto${e.url}whileallowInsecureConnectionisfalse.`);let c={agent:e.agent??this.getOrCreateAgent(e,n),hostname:i.hostname,path:`${i.pathname}${i.search}`,port:i.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((l,u)=>{let h=n?MN.default.request(c,l):LN.default.request(c,l);h.once("error",d=>{u(new Qi(d.message,{code:d.code??Qi.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let d=new _c("The operation was aborted. Rejecting from abort signal callback while making request.");h.destroy(d),u(d)}),s&&jI(s)?s.pipe(h):s?typeof s=="string"||Buffer.isBuffer(s)?h.end(s):yhe(s)?h.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(Vo.error("Unrecognized body type",s),u(new Qi("Unrecognized body type"))):h.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?MN.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new MN.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return LN.default.globalAgent;let i=e.tlsSettings??nXe,n=this.cachedHttpsAgents.get(i);return n&&n.options.keepAlive===!s||(Vo.info("No cached TLS Agent exi
`;return e}o(UZe,"encodeHeaders");function qZe(t){return t instanceof Uint8Array?t.byteLength:cv(t)?t.size===-1?void 0:t.size:void 0}o(qZe,"getLength");function GZe(t){let e=0;for(let r of t){let s=qZe(r);if(s===void 0)return;e+=s}return e}o(GZe,"getTotalLength");async function HZe(t,e,r){let s=[fn(`--${r}`,"utf-8"),...e.flatMap(n=>[fn(`\r
`,"utf-8")],i=GZe(s);i&&t.headers.set("Content-Length",i),t.body=await Cde(s)}o(HZe,"buildRequestBody");var KI="multipartPolicy",VZe=70,zZe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function $Ze(t){if(t.length>VZe)throw new Error(`Multipartboundary"${t}"exceedsmaximumlengthof70characters`);if(Array.from(t).some(e=>!zZe.has(e)))throw new Error(`Multipartboundary"${t}"containsinvalidcharacters`)}o($Ze,"assertValidBoundary");function uv(){return{name:KI,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",i=s.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Gotmultipartrequestbody,butcontent-typeheaderwasnotmultipart:${s}`);let[,n,a]=i;if(a&&r&&a!==r)throw new Error(`Multipartboundarywasspecifiedas${a}intheheader,butgot${r}intherequestbody`);return r??=a,r?$Ze(r):r=FZe(),t.headers.set("Content-Type",`${n};boundary=${r}`),await HZe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}o(uv,"multipartPolicy");function hv(){return DN()}o(hv,"createEmptyPipeline");var Ide=QN({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),t$t=Ide.logger;function Oc(t){return Ide.createClientLogger(t)}o(Oc,"createClientLogger");var Dc=Oc("core-rest-pipeline");function WU(t={}){return qN({logger:Dc.info,...t})}o(WU,"logPolicy");var KU=GN;function XU(t={}){return HN(t)}o(XU,"redirectPolicy");var dv=k(require("node:os"),1),fv=k(require("node:process"),1);function bde(){return"User-Agent"}o(bde,"getHeaderName");async function wde(t){if(fv.default&&fv.default.versions){let e=`${dv.default.type()}${dv.default.release()};${dv.default.arch()}`,r=fv.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(wde,"setPlatformSpecificData");var pv="1.22.2";function e7e(t){let e=[];for(let[r,s]of t){let i=s?`${r}/${s}`:r;e.push(i)}return e.join(" ")}o(e7e,"getUserAgentString");function Sde(){return bde()}o(Sde,"getUserAgentHeaderName");async function Av(t){let e=new Map;e.set("core-rest-pipeline",pv),await wde(e);let r=e7e(e);return t?`${t}${r}`:r}o(Av,"getUserAgentValue");var Bde=Sde(),xde="userAgentPolicy";function ZU(t={}){let e=Av(t.userAgentPrefix);return{name:xde,async sendRequest(r,s){return r.headers.has(Bde)||r.headers.set(Bde,await e),s(r)}}}o(ZU,"userAgentPolicy");var ro=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function eq(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:i}=e??{};return new Promise((n,a)=>{function c(){a(new ro(i??"The operation was aborted."))}o(c,"rejectOnAbort");function l(){s?.removeEventListener("abort",u)}o(l,"removeListeners");function u(){r?.(),l(),c()}if(o(u,"onAbort"),s?.aborted)return c();try{t(h=>{l(),n(h)},h=>{l(),a(h)})}catch(h){a(h)}s?.addEventListener("abort",u)})}o(eq,"createAbortablePromise");var n7e="The delay was aborted.";function XI(t,e){let r,{abortSignal:s,abortErrorMsg:i}=e??{};return eq(n=>{r=setTimeout(n,t)},{cleanupBeforeAbort:o(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:s,abortErrorMsg:i??n7e})}o(XI,"delay");function dd(t){if(tp(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(dd,"getErrorMessage");function Nde(t){return tp(t)}o(Nde,"isError");function mg(){return ep()}o(mg,"randomUUID");var xt=ip;var vde=Symbol("rawContent");function rq(t){return typeof t[vde]=="function"}o(rq,"hasRawContent");function Rde(t){return rq(t)?t[vde]():t}o(Rde,"getRawContent");var mv=KI;function sq(){let t=uv();return{name:mv,sendRequest:o(async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)rq(s.body)&&(s.body=Rde(s.body));return t.sendRequest(e,r)},"sendRequest")}}o(sq,"multipartPolicy");var iq=VN;function nq(){return zN()}o(nq,"decompressResponsePolicy");fun
`&&t[n]!=="\r";n++)l+=t[n];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),n--),!_et(l)){let d;return l.trim().length===0?d="Invalid space after '<'.":d="Tag '"+l+"' is an invalid name.",kr("InvalidTag",d,Pi(t,n))}let u=xet(t,n);if(u===!1)return kr("InvalidAttr","Attributes for '"+l+"' have open quote.",Pi(t,n));let h=u.value;if(n=u.index,h[h.length-1]==="/"){let d=n-h.length;h=h.substring(0,h.length-1);let f=pfe(h,e);if(f===!0)s=!0;else return kr(f.err.code,f.err.msg,Pi(t,d+f.err.line))}else if(c)if(u.tagClosed){if(h.trim().length>0)return kr("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",Pi(t,a));if(r.length===0)return kr("InvalidTag","Closing tag '"+l+"' has not been opened.",Pi(t,a));{let d=r.pop();if(l!==d.tagName){let f=Pi(t,d.tagStartPos);return kr("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+f.line+", col "+f.col+") instead of closing tag '"+l+"'.",Pi(t,a))}r.length==0&&(i=!0)}}else return kr("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",Pi(t,n));else{let d=pfe(h,e);if(d!==!0)return kr(d.err.code,d.err.msg,Pi(t,n-h.length+d.err.line));if(i===!0)return kr("InvalidXml","Multiple possible root nodes found.",Pi(t,n));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:a}),s=!0}for(n++;n<t.length;n++)if(t[n]==="<")if(t[n+1]==="!"){n++,n=ffe(t,n);continue}else if(t[n+1]==="?"){if(n=dfe(t,++n),n.err)return n}else break;else if(t[n]==="&"){let d=Ret(t,n);if(d==-1)return kr("InvalidChar","char '&' is not expected.",Pi(t,n));n=d}else if(i===!0&&!hfe(t[n]))return kr("InvalidXml","Extra text at the end",Pi(t,n));t[n]==="<"&&n--}}else{if(hfe(t[n]))continue;return kr("InvalidChar","char '"+t[n]+"' is not expected.",Pi(t,n))}if(s){if(r.length==1)return kr("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Pi(t,r[0].tagStartPos));if(r.length>0)return kr("InvalidXml","Invalid '"+JSON.stringify(r.map(n=>n.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return kr("InvalidXml","Start tag expected.",1);return!0}o(Rv,"validate");function hfe(t){return t===" "||t===" "||t===`
`||t==="\r"}o(hfe,"isWhiteSpace");function dfe(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 kr("InvalidXml","XML declaration allowed only at the start of the document.",Pi(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}o(dfe,"readPI");function ffe(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(ffe,"readCommentAndCDATA");var wet='"',Bet="'";function xet(t,e){let r="",s="",i=!1;for(;e<t.length;e++){if(t[e]===wet||t[e]===Bet)s===""?s=t[e]:s!==t[e]||(s="");else if(t[e]===">"&&s===""){i=!0;break}r+=t[e]}return s!==""?!1:{value:r,index:e,tagClosed:i}}o(xet,"readAttributeStr");var Net=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function pfe(t,e){let r=Nv(t,Net),s={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return kr("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",u0(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return kr("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",u0(r[i]));if(r[i][3]===void 0&&!e.allowBooleanAttributes)return kr("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",u0(r[i]));let n=r[i][2];if(!Tet(n))return kr("InvalidAttr","Attribute '"+n+"' is an invalid name.",u0(r[i]));if(!Object.prototype.hasOwnProperty.call(s,n))s[n]=1;else return kr("InvalidAttr","Attribute '"+n+"' is repeated.",u0(r[i]))}return!0}o(pfe,"validateAttributeString");function vet(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(vet,"validateNumberAmpersand");function Ret(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,vet(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(Ret,"validateAmpersand");function kr(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}o(kr,"getErrorObject");function Tet(t){return Tq(t)}o(Tet,"validateAttrName");function _et(t){return Tq(t)}o(_et,"validateTagName");function Pi(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}o(Pi,"getLineNumberForPosition");function u0(t){return t.startIndex+t[1].length}o(u0,"getPositionFromMatch");var Afe={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"},mfe={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 gn("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let i=this.options,n=new f0(i.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let u=t.charCodeAt(c+1);if(u===47){let h=bg(t,">",c,"Closing Tag is not closed."),d=t.substring(c+2,h).trim();if(i.removeNSPrefix){let p=d.indexOf(":");p!==-1&&(d=d.substr(p+1))}d=Lq(i.transformTagName,d,"",i).tagName,r&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher));let f=this.matcher.getCurrentTag();if(d&&i.unpairedTagsSet.has(d))throw new Error(`Unpairedtagcannotbeusedasclosingtag:</${d}>`);f&&i.unpairedTagsSet.has(f)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),s="",c=h}else if(u===63){let h=Fq(t,c,!1,"?>");if(!h)throw new Error("Pi Tag is not closed.");s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let d=this.buildAttributesMap(h.tagExp,this.matcher,h.tagName,!0);if(d){let f=d[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(f)||1),n.setXmlVersion(Number(f)||1)}if(!(i.ignoreDeclaration&&h.tagName==="?xml"||i.ignorePiTags)){let f=new gn(h.tagName);f.add(i.textNodeName,""),h.tagName!==h.tagExp&&h.attrExpPresent&&i.ignoreAttributes!==!0&&(f[":@"]=d),this.addChild(r,f,this.readonlyMatcher,c)}c=h.closeIndex+1}else if(u===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let h=bg(t,"-->",c+4,"Comment is not closed.");if(i.commentPropName){let d=t.substring(c+4,h-2);s=this.saveTextToParentTag(s,r,this.readonlyMatcher),r.add(i.commentPropName,[{[i.textNodeName]:d}])}c=h}else if(u===33&&t.charCodeAt(c+2)===68){let h=n.readDocType(t,c);this.entityDecoder.addInputEntities(h.entities),c=h.i}else if(u===33&&t.charCodeAt(c+2)===91){let h=bg(t,"]]>",c,"CDATA is not closed.")-2,d=t.substring(c+9,h);s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let f=this.parseTextData(d,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);f==null&&(f=""),i.cdataPropName?r.add(i.cdataPropName,[{[i.textNodeName]:d}]):r.add(i.textNodeName,f),c=h+2}else{let h=Fq(t,c,i.removeNSPrefix);if(!h){let D=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${D}"`)}let d=h.tagName,f=h.rawTagName,p=h.tagExp,A=h.attrExpPresent,g=h.closeIndex;if({tagName:d,tagExp:p}=Lq(i.transformTagName,d,p,i),i.strictReservedNames&&(d===i.commentPropName||d===i.cdataPropName||d===i.textNodeName||d===i.attributesGroupName))throw new Error(`Invalid tag name: ${d}`);r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher,!1));let C=r;C&&i.unpairedTagsSet.has(C.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;p.length>0&&p.lastIndexOf("/")===p.length-1&&(E=!0,d[d.length-1]==="/"?(d=d.substr(0,d.length-1),p=d):p=p.substr(0,p.length-1),A=d!==p);let I=null,S={},x;x=ett(f),d!==e.tagname&&this.matcher.push(d,{},x),d!==p&&A&&(I=this.buildAttributesMap(p,this.matcher,d),I&&(S=Zet(I,i))),d!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let v=c;if(this.isCurrentNodeStopNode){let D="";if(E)c=h.closeIndex;else if(i.unpairedTagsSet.has(d))c=h.closeIndex;else{let L=this.readStopNodeData(t,f,g+1);if(!L)throw new Error(`Unexpected end of ${f}`);c=L.i,D=L.tagContent}let O=new gn(d);I&&(O[":@"]=I),O.add(i.textNodeName,D),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,O,this.readonlyMatcher,v)}else{if(E){({tagName:d,tagExp:p}=Lq(i.transformTagName,d,p,i));let D=new gn(d);I&&(D[":@"]=I),this.addChild(r,D,this.readonlyMatcher,v),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(i.unpairedTagsSet.has(d)){let D=new gn(d);I&&(D[":@"]=I),this.addChild(r,D,this.readonlyMatcher,v),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=h.closeIndex;continue}else{let D=new gn(d);if(this.tagsNodeStack.length>i.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),I&&(D[":@"]=I),this.addChild(r,D,this.readonlyMatcher,v),r=D}s="",c=g}}}else s+=t[c];return e.child},"parseXml"
`}),s}getCanonicalizedResourceString(e){let r=Gv(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let i=Hv(e.url),n={};if(i){let a=[];for(let c in i)if(Object.prototype.hasOwnProperty.call(i,c)){let l=c.toLowerCase();n[l]=i[c],a.push(l)}a.sort();for(let c of a)s+=`
${c}:${decodeURIComponent(n[c])}`}return s}};var Cr=class extends fp{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new y0(e,r,this)}computeHMACSHA256(e){return(0,jfe.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var as=Oc("storage-common");var Jo;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Jo||(Jo={}));var yd={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Jo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Ptt=new ro("The operation was aborted."),E0=class extends Fc{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,s=yd){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:yd.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):yd.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:yd.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:yd.maxRetryDelayInMs):yd.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:yd.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:yd.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,s){let i=e.clone(),n=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||s%2===1;n||(i.url=qv(i.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(i.url=gd(i.url,Bu.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(as.info(`RetryPolicy:=====>Try=${s}${n?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(i),!this.shouldRetry(n,s,a))return a;r=r||!n&&a.status===404}catch(c){if(as.error(`RetryPolicy:Caughterror,message:${c.message},code:${c.code}`),!this.shouldRetry(n,s,a,c))throw c}return await this.delay(n,s,e.abortSignal),this.attemptSendRequest(e,r,++s)}shouldRetry(e,r,s,i){if(r>=this.retryOptions.maxTries)return as.info(`RetryPolicy:Attempt(s)${r}>=maxTries${this.retryOptions.maxTries},nofurthertry.`),!1;let n=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(i){for(let a of n)if(i.name.toUpperCase().includes(a)||i.message.toUpperCase().includes(a)||i.code&&i.code.toString().toUpperCase()===a)return as.info(`RetryPolicy:Networkerror${a}found,willretry.`),!0}if(s||i){let a=s?s.status:i?i.statusCode:0;if(!e&&a===404)return as.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return as.info(`RetryPolicy:Willretryforstatuscode${a}.`),!0}if(s&&s?.status>=400){let a=s.headers.get(qe.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return i?.code==="PARSE_ERROR"&&i?.message.startsWith('Error "Error: Unclosed root tag')?(as.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,s){let i=0;if(e)switch(this.retryOptions.retryPolicyType){case Jo.EXPONENTIAL:i=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Jo.FIXED:i=this.retryOptions.retryDelayInMs;break}else i=Math.random()*1e3;return as.info(`RetryPolicy:Delayfor${i}ms`),Vv(i,s,Ptt)}};var C0=class{static{o(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new E0(e,r,this.retryOptions)}};var Ott="storageBrowserPolicy";function Jfe(){return{name:Ott,async sendRequest(t,e){return xt||((t.method==="GET"||t.method==="HEAD")&&(t.url=gd(t.url,Bu.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(qe.COOKIE),t.headers.delete(qe.CONTENT_LENGTH)),e(t)}}}o(Jfe,"storageBrowserPolicy");var Dtt="StorageCorrectContentLengthPolicy";function Yfe(){function t(e){e.body&&(
`}),c}o(s,"getCanonicalizedHeadersString");function i(n){let a=Gv(n.url)||"/",c="";c+=`/${t.accountName}${a}`;let l=Hv(n.url),u={};if(l){let h=[];for(let d in l)if(Object.prototype.hasOwnProperty.call(l,d)){let f=d.toLowerCase();u[f]=l[d],h.push(f)}h.sort();for(let d of h)c+=`
`),n=e.computeHMACSHA256(i);return{sasQueryParameters:new Ja(t.version,n,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:i}}o(Hst,"generateBlobSASQueryParameters20150405");function Vst(t,e){if(t=bp(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 i;t.permissions&&(t.blobName?i=rl.parse(t.permissions.toString()).toString():i=sl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?ja(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(n);return{sasQueryParameters:new Ja(t.version,a,i,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(Vst,"generateBlobSASQueryParameters20181109");function zst(t,e){if(t=bp(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 i;t.permissions&&(t.blobName?i=rl.parse(t.permissions.toString()).toString():i=sl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?ja(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(n);return{sasQueryParameters:new Ja(t.version,a,i,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:n}}o(zst,"generateBlobSASQueryParameters20201206");function $st(t,e){if(t=bp(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 i;t.permissions&&(t.blobName?i=rl.parse(t.permissions.toString()).toString():i=sl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Nt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Nt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?ja(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(n);return{sasQueryParameters:new Ja(t.version,a,i,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:n}}o($st,"generateBlobSASQueryParametersUDK20181109");function jst(t,e){if(t=bp(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 i;t.permissions&&(t.blobName?i=rl.parse(t.permissions.toString()).toString():i=sl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Nt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Nt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?ja(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(n);return{sasQueryParameters:new Ja(t.version,a,i,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:n}}o(jst,"generateBlobSASQueryParametersUDK20200210");function Jst(t,e){if(t=bp(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 i;t.permissions&&(t.blobName?i=rl.parse(t.permissions.toString()).toString():i=sl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Nt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Nt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?ja(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(n);return{sasQueryParameters:new Ja(t.version,a,i,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:n}}o(Jst,"generateBlobSASQueryParametersUDK20201206");function Yst(t,e){if(t=bp(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 i;t.permissions&&(t.blobName?i=rl.parse(t.permissions.toString()).toString():i=sl.parse(t.permissions.toString()).toString());let n=[i||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Nt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Nt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?ja(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(n);return{sasQueryParameters:new Ja(t.version,a,i,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:n}}o(Yst,"generateBlobSASQueryParametersUDK20250705");function Ip(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}o(Ip,"getCanonicalName");function bp(t){let e=t.version?t.version:Jv;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(bp,"SASSignatureValuesSanityCheckAndAutofill");var P0=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=mg()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Ha||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Ha||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 Se.withSpan("BlobLeaseClient-acquireLease",r,async s=>ve(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!==Ha||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Ha||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 Se.withSpan("BlobLeaseClient-changeLease",r,async s=>{let i=ve(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:s.tracingOptions}));return this._leaseId=e,i})}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"}};kg.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var xp=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"}};xp.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var H0=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var $it=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(a){a(n)})}return o(i,"adopt"),new(r||(r=Promise))(function(n,a){function c(h){try{u(s.next(h))}catch(d){a(d)}}o(c,"fulfilled");function l(h){try{u(s.throw(h))}catch(d){a(d)}}o(l,"rejected");function u(h){h.done?n(h.value):i(h.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})},q8=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,i=(e/(1024*1024)/(s/1e3)).toFixed(1);H(`Sent ${e} of ${this.contentLength} (${r}%), ${i} 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 ume(t,e,r){return $it(this,void 0,void 0,function*(){var s;let i=new Ou(t),n=i.getBlockBlobClient(),a=new q8((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(),Q(`BlobClient: ${i.name}:${i.accountName}:${i.containerName}`);let l=yield n.uploadFile(e,c);if(l._response.status>=400)throw new ZR(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw Dt(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{a.stopDisplayTimer()}})}o(ume,"uploadCacheArchiveSDK");var dme=k(require("buffer"),1),il=k(require("fs"),1),fme=k(require("stream"),1),pme=k(require("util"),1);var eT=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(a){a(n)})}return o(i,"adopt"),new(r||(r=Promise))(function(n,a){function c(h){try{u(s.next(h))}catch(d){a(d)}}o(c,"fulfilled");function l(h){try{u(s.throw(h))}catch(d){a(d)}}o(l,"rejected");function u(h){h.done?n(h.value):i(h.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})};function tT(t){return t?t>=200&&t<300:!1}o(tT,"isSuccessStatusCode");function jit(t){return t?t>=500:!0}o(jit,"isServerErrorStatusCode");function Jit(t){return t?[Er.BadGateway,Er.ServiceUnavailable,Er.GatewayTimeout].includes(t):!1}o(Jit,"isRetryableStatusCode");function Yit(t){return eT(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(Yit,"sleep");function hme(t,e,r){return eT(this,arguments,void 0,function*(s,i,n,a=xN,c=NN,l=void 0){let u="",h=1;for(;h<=a;){let d,f,p=!1;try{d=yield i()}catch(A){l&&(d=l(A)),p=!0,u=A.message}if(d&&(f=n(d),!jit(f)))return d;if(f&&(p=Jit(f),u=`Cache service responded with ${f}`),Q(`${s} - Attempt ${h} of ${a} failed with error: ${u}`),!p){Q(`${s} - Error is not retryable`);break}yield Yit(c),h++}throw Error(`${s} failed: ${u}`)})}o(hme,"retry");function V0(t,e){return eT(this,arguments,void 0,function*(r,s,i=xN,n=NN){return yield hme(r,s,a=>a.statusCode,i,n,a=>{if(a instanceof Tc)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}o(V0,"retryTypedResponse");function Mg(t,e){return eT(this,arguments,void 0,function*(r,s,i=xN,n=NN){return yield hme(r,s,a=>a.message.statusCode,i,n)})}o(Mg,"retryHttpClientResponse");var Zo=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(a
Othercacheswithsimilarkey:`);for(let c of n?.artifactCaches||[])Q(`CacheKey:${c?.cacheKey},CacheVersion:${c?.cacheVersion},CacheScope:${c?.scope},CacheCreated:${c?.creationTime}`)}}})}o(snt,"printCachesListForDiagnostics");function z8(t,e,r){return In(this,void 0,void 0,function*(){let s=new Sme.URL(t),i=yme(r);s.hostname.endsWith(".blob.core.windows.net")?i.useAzureSdk?yield mme(t,e,i):i.concurrentBlobDownloads?yield Ame(t,e,i):yield sT(t,e):yield sT(t,e)})}o(z8,"downloadCache");function xme(t,e,r){return In(this,void 0,void 0,function*(){let s=V8(),i=ag(e,r?.compressionMethod,r?.enableCrossOsArchive),n={key:t,version:i,cacheSize:r?.cacheSize};return yield V0("reserveCache",()=>In(this,void 0,void 0,function*(){return s.postJson($0("caches"),n)}))})}o(xme,"reserveCache");function wme(t,e){return`bytes${t}-${e}/*`}o(wme,"getContentRange");function int(t,e,r,s,i){return In(this,void 0,void 0,function*(){Q(`Uploadingchunkofsize${i-s+1}bytesatoffset${s}withcontentrange:${wme(s,i)}`);let n={"Content-Type":"application/octet-stream","Content-Range":wme(s,i)},a=yield Mg(`uploadChunk(start:${s},end:${i})`,()=>In(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),n)}));if(!tT(a.message.statusCode))throw new Error(`Cacheservicerespondedwith${a.message.statusCode}duringuploadchunk.`)})}o(int,"uploadChunk");function nnt(t,e,r,s){return In(this,void 0,void 0,function*(){let i=Rc(r),n=$0(`caches/${e.toString()}`),a=Lg.openSync(r,"r"),c=G8(s),l=mU("uploadConcurrency",c.uploadConcurrency),u=mU("uploadChunkSize",c.uploadChunkSize),h=[...new Array(l).keys()];Q("Awaiting all uploads");let d=0;try{yield Promise.all(h.map(()=>In(this,void 0,void 0,function*(){for(;d<i;){let f=Math.min(i-d,u),p=d,A=d+f-1;d+=u,yield int(t,n,()=>Lg.createReadStream(r,{fd:a,start:p,end:A,autoClose:!1}).on("error",g=>{throw new Error(`Cacheuploadfailedbecausefilereadfailedwith${g.message}`)}),p,A)}})))}finally{Lg.closeSync(a)}})}o(nnt,"uploadFile");function ont(t,e,r){return In(this,void 0,void 0,function*(){let s={size:r};return yield V0("commitCache",()=>In(this,void 0,void 0,function*(){return t.postJson($0(`caches/${e.toString()}`),s)}))})}o(ont,"commitCache");function $8(t,e,r,s){return In(this,void 0,void 0,function*(){if(G8(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield ume(r,e,s)}else{let n=V8();Q("Upload cache"),yield nnt(n,t,e,s),Q("Commiting cache");let a=Rc(e);H(`CacheSize:~${Math.round(a/(1024*1024))}MB(${a}B)`);let c=yield ont(n,t,a);if(!tT(c.statusCode))throw new Error(`Cacheservicerespondedwith${c.statusCode}duringcommitcache.`);H("Cache saved successfully")}})}o($8,"saveCache");var Cge=k(fge(),1),Ur=k(Fr(),1),co=k(Fr(),1),_p=k(Fr(),1),Qp=k(Fr(),1),Pp=k(Fr(),1);var UV=k(Fr(),1),qV=k(Fr(),1),gge=k(Fr(),1),yge=k(Fr(),1),Ege=k(Fr(),1);var MV=k(Fr(),1),LV=k(Fr(),1),pge=k(Fr(),1),Age=k(Fr(),1),mge=k(Fr(),1);var FV=class extends mge.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,Age.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,pge.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,i){let n=i??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:n.scope=e.string();break;case 2:n.permission=e.int64().toString();break;default:let u=s.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknownfield${c}(wiretype${l})for${this.typeName}`);let h=e.skip(l);u!==!1&&(u===!0?LV.UnknownFieldHandler.onRead:u)(this.typeName,n,c,l,h)}}return n}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,MV.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,MV.WireType.Varint).int64(e.permission);let i=s.writeUnknownFields;return i!==!1&&(i==!0?LV.UnknownFieldHandler.onWrite:i)(this.typeName,e,r),r}},VT=new FV;var GV=class extends Ege.Mess
`));let s=yield sz(r,"create");yield iz(s,t)})}o(oz,"createTar");var ty=function(t,e,r,s){function i(n){return n instanceof r?n:new r(function(a){a(n)})}return o(i,"adopt"),new(r||(r=Promise))(function(n,a){function c(h){try{u(s.next(h))}catch(d){a(d)}}o(c,"fulfilled");function l(h){try{u(s.throw(h))}catch(d){a(d)}}o(l,"rejected");function u(h){h.done?n(h.value):i(h.value).then(c,l)}o(u,"step"),u((s=s.apply(t,e||[])).next())})},Ka=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},ey=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},JT=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function Sge(t){if(!t||t.length===0)throw new Ka("Path Validation Error: At least one directory or file path is required")}o(Sge,"checkPaths");function az(t){if(t.length>512)throw new Ka(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new Ka(`KeyValidationError:${t}cannotcontaincommas.`)}o(az,"checkKey");function cz(){return z0()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}o(cz,"isFeatureAvailable");function Bge(t,e,r,s){return ty(this,arguments,void 0,function*(i,n,a,c,l=!1){let u=z0();return Q(`Cacheserviceversion:${u}`),Sge(i),u==="v2"?yield Iat(i,n,a,c,l):yield Cat(i,n,a,c,l)})}o(Bge,"restoreCache");function Cat(t,e,r,s){return ty(this,arguments,void 0,function*(i,n,a,c,l=!1){a=a||[];let u=[n,...a];if(Q("Resolved Keys:"),Q(JSON.stringify(u)),u.length>10)throw new Ka("Key Validation Error: Keys are limited to a maximum of 10.");for(let f of u)az(f);let h=yield HI(),d="";try{let f=yield Bme(u,i,{compressionMethod:h,enableCrossOsArchive:l});if(!f?.archiveLocation)return;if(c?.lookupOnly)return H("Lookup only - skipping download"),f.cacheKey;d=cb.join(yield qI(),ld(h)),Q(`ArchivePath:${d}`),yield z8(f.archiveLocation,d,c),mu()&&(yield ab(d,h));let p=Rc(d);return H(`CacheSize:~${Math.round(p/(1024*1024))}MB(${p}B)`),yield nz(d,h),H("Cache restored successfully"),f.cacheKey}catch(f){let p=f;if(p.name===Ka.name)throw f;p instanceof Tc&&typeof p.statusCode=="number"&&p.statusCode>=500?Ym(`Failedtorestore:${f.message}`):Dt(`Failedtorestore:${f.message}`)}finally{try{yield GI(d)}catch(f){Q(`Failedtodeletearchive:${f}`)}}})}o(Cat,"restoreCacheV1");function Iat(t,e,r,s){return ty(this,arguments,void 0,function*(i,n,a,c,l=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let u=[n,...a];if(Q("Resolved Keys:"),Q(JSON.stringify(u)),u.length>10)throw new Ka("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of u)az(d);let h="";try{let d=rz(),f=yield HI(),p={key:n,restoreKeys:a,version:ag(i,f,l)},A=yield d.GetCacheEntryDownloadURL(p);if(!A.ok){Q(`Cachenotfoundforversion${p.version}ofkeys:${u.join(", ")}`);return}if(p.key!==A.matchedKey?H(`Cachehitforrestore-key:${A.matchedKey}`):H(`Cachehitfor:${A.matchedKey}`),c?.lookupOnly)return H("Lookup only - skipping download"),A.matchedKey;h=cb.join(yield qI(),ld(f)),Q(`Archivepath:${h}`),Q(`Startingdownloadofarchiveto:${h}`),yield z8(A.signedDownloadUrl,h,c);let C=Rc(h);return H(`CacheSize:~${Math.round(C/(1024*1024))}MB(${C}B)`),mu()&&(yield ab(h,f)),yield nz(h,f),H("Cache restored successfully"),A.matchedKey}catch(d){let f=d;if(f.name===Ka.name)throw d;f instanceof Tc&&typeof f.statusCode=="number"&&f.statusCode>=500?Ym(`Failedtorestore:${d.message}`):Dt(`Failedtorestore:${d.message}`)}finally{try{h&&(yield GI(h))}catch(d){Q(`Failedtodeletearchive:${d}`)}}})}o(Iat,"restoreCacheV2");function lz(t,e,r){return ty(this,arguments,void 0,function*(s,i,n,a=!1){let c=z0();return Q(`Cacheserviceversion:${c}`),Sge(s),az(i),c==="v2"?yield wat(s,i,n,a):yield bat(s,i,n,a)})}o(lz,"saveCache");function bat(t,e,r){return ty(this,arguments,void 0,fu
`,a).length:d,u?(c===null?0:c.length)+l.length:0,u?l.length+d:0);return f<p},"__needMoreData"),parse:o(function(s,i,n,a){let{bom:c,comment_no_infix:l,encoding:u,from_line:h,ltrim:d,max_record_size:f,raw:p,relax_quotes:A,rtrim:g,skip_empty_lines:C,to:E,to_line:I}=this.options,{comment:S,escape:x,quote:v,record_delimiter:D}=this.options,{bomSkipped:O,previousBuf:L,rawBuffer:z,escapeIsQuote:ee}=this.state,U;if(L===void 0)if(s===void 0){a();return}else U=s;else L!==void 0&&s===void 0?U=L:U=Buffer.concat([L,s]);if(O===!1)if(c===!1)this.state.bomSkipped=!0;else if(U.length<3){if(i===!1){this.state.previousBuf=U;return}}else{for(let j in my)if(my[j].compare(U,0,my[j].length)===0){let se=my[j].length;this.state.bufBytesStart+=se,U=U.slice(se);let Qe=Q3({...this.original_options,encoding:j});for(let we in Qe)this.options[we]=Qe[we];({comment:S,escape:x,quote:v}=this.options);break}this.state.bomSkipped=!0}let q=U.length,V;for(V=0;V<q&&!this.__needMoreData(V,q,i);V++){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&&D.length===0&&this.__autoDiscoverRecordDelimiter(U,V)&&(D=this.options.record_delimiter);let j=U[V];if(p===!0&&z.append(j),(j===jft||j===Jft)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(x!==null&&this.state.quoting===!0&&this.__isEscape(U,V,j)&&V+x.length<q)if(ee){if(this.__isQuote(U,V+x.length)){this.state.escaping=!0,V+=x.length-1;continue}}else{this.state.escaping=!0,V+=x.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(U,V))if(this.state.quoting===!0){let we=U[V+v.length],le=g&&this.__isCharTrimable(U,V+v.length),ct=S!==null&&this.__compareBytes(S,U,V+v.length,we),et=this.__isDelimiter(U,V+v.length,we),Ct=D.length===0?this.__autoDiscoverRecordDelimiter(U,V+v.length):this.__isRecordDelimiter(we,U,V+v.length);if(x!==null&&this.__isEscape(U,V,j)&&this.__isQuote(U,V+x.length))V+=x.length-1;else if(!we||et||Ct||ct||le){this.state.quoting=!1,this.state.wasQuoting=!0,V+=v.length-1;continue}else if(A===!1){let De=this.__error(new gt("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got"${String.fromCharCode(we)}"`,`atline${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(De!==void 0)return De}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(v),V+=v.length-1}else if(this.state.field.length!==0){if(A===!1){let we=this.__infoField(),le=Object.keys(my).map(et=>my[et].equals(this.state.field.toString())?et:!1).filter(Boolean)[0],ct=this.__error(new gt("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`aquoteisfoundonfield${JSON.stringify(we.column)}atline${we.lines},valueis${JSON.stringify(this.state.field.toString(u))}`,le?`(${le}bom)`:void 0],this.options,we,{field:this.state.field}));if(ct!==void 0)return ct}}else{this.state.quoting=!0,V+=v.length-1;continue}if(this.state.quoting===!1){let we=this.__isRecordDelimiter(j,U,V);if(we!==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)>=h){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),V+=we-1;continue}if(C===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,V+=we-1;continue}this.info.bytes=this.state.bufBytesStart+V;let et=this.__onField();if(et!==void 0)return et;this.info.bytes=this.state.bufBytesStart+V+we;let Ct=this.__onRecord(n);if(Ct!==void 0)return Ct;if(E!==-1&&this.info.records>=E){this.state.stop=!0,a();return}}this.state.commenting=!1,V+=we-1;continue}if(this.state.commenting)continue;if(S!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(S,U,V,j)!==0){this.state.commenting=!0;continue}let le=this.__isDelimiter(U,V,
`)}o(Upt,"_buildMessageForResponseErrors");var qpt=class extends Error{static{o(this,"GraphqlResponseError")}constructor(t,e,r){super(Upt(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},Gpt=["method","baseUrl","url","headers","request","query","mediaType","operationName"],Hpt=["query","method","url"],I0e=/\/api\/v3\/?$/;function Vpt(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(Hpt.includes(a))return Promise.reject(new Error(`[@octokit/graphql]"${a}"cannotbeusedasvariablename`))}let s=typeof e=="string"?Object.assign({query:e},r):e,i=Object.keys(s).reduce((a,c)=>Gpt.includes(c)?(a[c]=s[c],a):(a.variables||(a.variables={}),a.variables[c]=s[c],a),{}),n=s.baseUrl||t.endpoint.DEFAULTS.baseUrl;return I0e.test(n)&&(i.url=n.replace(I0e,"/api/graphql")),t(i).then(a=>{if(a.data.errors){let c={};for(let l of Object.keys(a.headers))c[l]=a.headers[l];throw new qpt(i,c,a.data)}return a.data.data})}o(Vpt,"graphql");function z3(t,e){let r=t.defaults(e);return Object.assign(o((i,n)=>Vpt(r,i,n),"newApi"),{defaults:z3.bind(null,r),endpoint:r.endpoint})}o(z3,"withDefaults");var ddr=z3(Pb,{headers:{"user-agent":`octokit-graphql.js/${Fpt}${Td()}`},method:"POST",url:"/graphql"});function b0e(t){return z3(t,{method:"POST",url:"/graphql"})}o(b0e,"withCustomRequest");var $3="(?:[a-zA-Z0-9_-]+)",w0e="\\.",S0e=new RegExp(`^${$3}${w0e}${$3}${w0e}${$3}$`),zpt=S0e.test.bind(S0e);async function $pt(t){let e=zpt(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($pt,"auth");function jpt(t){return t.split(/\./).length===3?`bearer${t}`:`token${t}`}o(jpt,"withAuthorizationPrefix");async function Jpt(t,e,r,s){let i=e.endpoint.merge(r,s);return i.headers.authorization=jpt(t),e(i)}o(Jpt,"hook");var B0e=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($pt.bind(null,e),{hook:Jpt.bind(null,e)})},"createTokenAuth2");var j3="7.0.6";var x0e=o(()=>{},"noop"),Ypt=console.warn.bind(console),Wpt=console.error.bind(console);function Kpt(t={}){return typeof t.debug!="function"&&(t.debug=x0e),typeof t.info!="function"&&(t.info=x0e),typeof t.warn!="function"&&(t.warn=Ypt),typeof t.error!="function"&&(t.error=Wpt),t}o(Kpt,"createLogger");var N0e=`octokit-core.js/${j3}${Td()}`,oQ=class{static{o(this,"Octokit")}static VERSION=j3;static defaults(e){return class extends this{static{o(this,"OctokitWithDefaults")}constructor(...s){let i=s[0]||{};if(typeof e=="function"){super(e(i));return}super(Object.assign({},e,i,i.userAgent&&e.userAgent?{userAgent:`${i.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(i=>!r.includes(i)))}}constructor(e={}){let r=new e0e.Collection,s={baseUrl:Pb.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}${N0e}`:N0e,e.baseUrl&&(s.baseUrl=e.baseUrl),e.previews&&(s.mediaType.previews=e.previews),e.timeZone&&(s.headers["time-zone"]=e.timeZone),this.request=Pb.defaults(s),this.graphql=b0e(this.request).defaults(s),this.log=Kpt(e.log),this.hook=r,e.authStrategy){let{authStrategy:n,...a}=e,c=n(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 n=B0e(e.auth);r.wrap("request",n.hook),this.auth=n}let i=this.constructor;for(let n=0;n<i.plugins.length;++n)
Moreinfo:${l.url}`);let p=l.range&&l.range.length>0?l.range[0]?.start.line:void 0,A=!1;for(let g of a)if(g.remote||g.path.endsWith(u)&&g.content===h){c.push({title:d,message:f,file:g.path,startLine:p}),A=!0;break}A||Q(`Buildx.convertWarningsToGitHubAnnotations:skippingwarningwithoutmatchingDockerfile${u}:${d}`)}return c}};var Qd=class t{static{o(this,"Builder")}buildx;constructor(e){this.buildx=e?.buildx||new Et}async exists(e){let r=await this.buildx.getCommand(["inspect",e]),s=await Re.getExecOutput(r.command,r.args,{ignoreReturnCode:!0,silent:!0}).then(i=>i.stderr.length>0&&i.exitCode!=0?(Q(`Builder.existscmderr:${i.stderr.trim()}`),!1):i.exitCode==0).catch(i=>(Q(`Builder.existserror:${i}`),!1));return Q(`Builder.exists:${s}`),s}async inspect(e){let r=Object.assign({},process.env,{DEBUG:"1"}),s=["inspect"];e&&s.push(e);let i=await this.buildx.getCommand(s);return await Re.getExecOutput(i.command,i.args,{ignoreReturnCode:!0,silent:!0,env:r}).then(n=>{if(n.stderr.length>0&&n.exitCode!=0)throw new Error(n.stderr.trim());return t.parseInspect(n.stdout)})}static parseInspect(e){let r={nodes:[]},s,i={},n,a,c;for(let l of e.trim().split(`
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let i of s){if(i.length==1&&!i[0].startsWith("type="))return e=="local";for(let[n,a]of i.map(c=>c.split("=").map(l=>l.trim())))if(n=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let s=po(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let i of s)for(let[n,a]of i.map(c=>c.split("=").map(l=>l.trim())))if(n=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=po(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let i of r)for(let n of i)try{let a=wt.parseBool(n);s.push(`disabled=${!a}`)}catch{s.push(n)}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("="),i=e.substring(0,s),n=e.substring(s+1);if(i.length==0||n.length==0)throw new Error(`${e}isnotavalidsecret`);return r&&wc(n),[i,n]}};var o5=k(require("fs"),1),M0e=k(require("path"),1);var hQ=class t{static{o(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new Et,this.metadataFilename=`bake-metadata-${wt.generateRandomString()}.json`}getMetadataFilePath(){return M0e.default.join(bt.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!o5.default.existsSync(e))return;let r=o5.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"],i,n=[],a=[...e.files||[],e.source];if(a){for(let l of a.map(u=>u?u.trim():""))if(l.length!=0){if(!wt.isValidRef(l)){n.push(l);continue}if(i)throw new Error("Only one remote bake definition can be defined");i=l}}i&&s.push(i);for(let l of n)s.push("--file",l);if(e.overrides)for(let l of e.overrides)s.push("--set",l);if(e.vars)for(let l of e.vars)s.push("--var",l);if(e.allow)for(let l of e.allow)s.push("--allow",l);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 Re.getExecOutput(c.command,c.args,r).then(l=>{if(l.stderr.length>0&&l.exitCode!=0)throw new Error(`cannotparsebakedefinitions:${l.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(l.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let s in r.target){let i=r.target[s];i.attest&&Array.isArray(i.attest)&&(i.attest=i.attest.map(n=>t.parseAttestEntry(n))),i["cache-from"]&&Array.isArray(i["cache-from"])&&(i["cache-from"]=i["cache-from"].map(n=>t.parseCacheEntry(n))),i["cache-to"]&&Array.isArray(i["cache-to"])&&(i["cache-to"]=i["cache-to"].map(n=>t.parseCacheEntry(n))),i.output&&Array.isArray(i.output)&&(i.output=i.output.map(n=>t.parseExportEntry(n))),i.secret&&Array.isArray(i.secret)&&(i.secret=i.secret.map(n=>t.parseSecretEntry(n))),i.ssh&&Array.isArray(i.ssh)&&(i.ssh=i.ssh.map(n=>t.parseSSHEntry(n)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},s=po(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of s){let[n,a]=i.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(n){case"type":r.type=a;break;case"disabled":r.disabled=wt.parseBool(a);break;default:r[n]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=po(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(s.length===1&&!s[0].includes("="))return r.type="registry",r.ref=s[0],r;for(let i of s){let[n,a]=i.toString().
`).map(i=>i.trim()).filter(i=>i.length>0);return s}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var oOe=require("crypto"),$l=k(require("fs"),1),mf=k(require("path"),1);var vS=k(Mb(),1),jl=k(Y_e(),1),aOe=k(dW(),1),XE=k(ZPe(),1);var fK=k(Mb(),1);var tOe=k(Xa(),1);var eOe="application/vnd.oci.empty.v1+json";var Rh=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 Re.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(Q(`Cosign.isAvailablecmderr:${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(Q(`Cosign.isAvailableerror:${r}`),!1));return Q(`Cosign.isAvailable:${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await Re.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 Re.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let s=r??await this.version();if(!s)return Q("Cosign.versionSatisfies false: undefined version"),!1;let i=tOe.satisfies(s,e)||/^[0-9a-f]{7}$/.exec(s)!==null;return Q(`Cosign.versionSatisfies${s}statisfies${e}:${i}`),i}static parseCommandOutput(e){let r,s,i,n;for(let a of e.split(/\r?\n/)){let c=a.trim();if(!c.startsWith("{")||!c.endsWith("}"))continue;let l;try{l=JSON.parse(c)}catch{continue}if(l&&Array.isArray(l.errors)&&l.errors.length>0&&(n=l.errors),!r&&l&&Array.isArray(l.manifests)&&l.manifests.length>0){let u=l.manifests[0];u?.artifactType===fK.BUNDLE_V03_MEDIA_TYPE&&typeof u.digest=="string"?r=u.digest:u?.artifactType===eOe&&typeof u.digest=="string"&&(s=u.digest)}if(!i&&l&&l.mediaType===fK.BUNDLE_V03_MEDIA_TYPE&&(i=l),i&&(r||s)){n=void 0;break}}return{bundle:i,signatureManifestDigest:r||s,errors:n}}};var pK=k(require("fs"),1);var QD=class t{static{o(this,"ImageTools")}buildx;constructor(e){this.buildx=e?.buildx||new Et}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 i=e.platform,n=new Map;for(let a of r.manifests)a.digest&&n.set(a.digest,a);return s.filter(a=>{let c=a.annotations?.["vnd.docker.reference.digest"];if(!c)return!1;let l=n.get(c);return l?l.platform?.os===i.os&&l.platform?.architecture===i.architecture&&(l.platform?.variant??"")===(i.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],s=bt.tmpName({tmpdir:bt.tmpDir(),template:"imagetools-metadata-XXXXXX"}),i=[],n=[];for(let c of e.sources){if(c.startsWith("cwd://")){let l=c.substring(6);l.length>0&&i.push(l);continue}n.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 i)r.push("--file",c);for
${a.message}`),await new Promise(u=>setTimeout(u,Math.pow(2,c)*100))}throw a??new Error(`ImageToolsinspectcommandfailedfor${e.name}`)}async execInspect(e,r,s){return await Re.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(i=>{if(i.stderr.length>0&&i.exitCode!=0)throw new Error(i.stderr.trim());return s(JSON.parse(i.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown|not found: not found)/i.test(e)}};var rOe="application/vnd.in-toto+json";var sOe="https://fulcio.sigstore.dev",iOe="https://rekor.sigstore.dev",nOe="https://timestamp.sigstore.dev",HA="https://search.sigstore.dev";var nkt="slsaprovenance1",gf=class t{static{o(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new Rh,this.imageTools=e?.imageTools||new QD}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);H(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let i=t.noTransparencyLog(e.noTransparencyLog),n=[];await this.cosign.versionSatisfies(">=3.0.4")?await Zt("Creating Sigstore protobuf signing config",async()=>{let a=bt.tmpName({template:"signing-config-XXXXXX.json",tmpdir:bt.tmpDir()}),c=["signing-config","create","--with-default-services=true",`--out=${a}`];i&&c.push("--no-default-rekor=true"),await Re.exec(this.cosign.binPath,c,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),H(JSON.stringify(JSON.parse($l.default.readFileSync(a,{encoding:"utf-8"})),null,2)),n.push(`--signing-config=${a}`)}):(n.push("--use-signing-config"),i&&n.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 l of c){let u=`${a}@${l}`;await Zt(`Signingattestationmanifest${u}`,async()=>{let h=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...n];H(`[command]${this.cosign.binPath}${[...h,u].join(" ")}`);let d=await Re.getExecOutput(this.cosign.binPath,["--verbose",...h,u],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),f=Rh.parseCommandOutput(d.stderr.trim());if(d.exitCode!=0)if(f.errors&&f.errors.length>0){let A=f.errors.map(g=>`-[${g.code}]${g.message}:${g.detail}`).join(`
${u}`),await new Promise(h=>setTimeout(h,Math.pow(2,a)*100));else throw n}else throw new Error(`Cosignverifycommandfailedwith:${c.stderr.trim().split(/\r?\n/).filter(u=>u.length>0).pop()??"unknown error"}`)}throw n}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);H(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let i=t.getProvenanceBlobs(e);for(let n of Object.keys(i))await Zt(`Signing${n}`,async()=>{let a=i[n],c=mf.default.join(mf.default.dirname(n),`${e.name??"provenance"}.sigstore.json`),l=t.getProvenanceSubjects(a);if(l.length===0){Dt(`Nosubjectsfoundinprovenance${n},skipsigning.`);return}let u=await t.signPayload({data:a,type:rOe},s),h=t.parseBundle(u);H("Provenance blob signed for:");for(let d of l){let[f,p]=Object.entries(d.digest)[0]||[];H(`-${d.name}(${f}:${p})`)}h.tlogID&&H(`AttestationsignatureuploadedtoRekortransparencylog:${HA}?logIndex=${h.tlogID}`),H(`WritingSigstorebundleto:${c}`),$l.default.writeFileSync(c,JSON.stringify(h.payload,null,2),{encoding:"utf-8"}),r[n]={...h,bundlePath:c,subjects:l}})}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[i,n]of Object.entries(e)){let a=mf.default.dirname(i);await Zt(`Verifyingsignaturebundle${n.bundlePath}`,async()=>{for(let c of n.subjects){let l=mf.default.join(a,c.name);H(`Verifyingsignedartifact${l}`);let u=["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||!n.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let h=await Re.getExecOutput(this.cosign.binPath,[...u,"--bundle",n.bundlePath,l],{ignoreReturnCode:!0});if(h.stderr.length>0&&h.exitCode!=0)throw new Error(h.stderr);s[l]={bundlePath:n.bundlePath,cosignArgs:u}}})}return s}async verifyArtifact(e,r,s){H("Verifying keyless verification bundle signature");let i=JSON.parse($l.default.readFileSync(r,"utf-8")),n=(0,vS.bundleFromJSON)(i);H("Fetching Sigstore TUF trusted root metadata");let a=await aOe.getTrustedRoot(),c=(0,XE.toTrustMaterial)(a);try{H("Verifying artifact signature");let l=(0,XE.toSignedEntity)(n,$l.default.readFileSync(e)),u=t.parseCertificate(n),h=n.verificationMaterial.tlogEntries,d=h.length>0?h[0].logIndex:void 0;if(s?.subjectAlternativeName&&s?.subjectAlternativeName instanceof RegExp){let A=u.subjectAltName?.replace(/^uri:/i,"");if(A){if(!A.match(s.subjectAlternativeName))throw new Error(`SigningcertificatesubjectAlternativeName"${A}"doesnotmatchexpectedpattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let p=new XE.Verifier(c).verify(l,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return Q(`Sigstore.verifyArtifactsigner:${JSON.stringify(p)}`),{payload:i,certificate:u.toString(),tlogID:d}}catch(l){throw new Error(`Failedtoverifyartifactsignature:${l}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),H(`Uploadtotransparencylog:${e?"disabled":"enabled"}`),{fulcioURL:sOe,rekorURL:e?void 0:iOe,tsaServerURL:nOe}}static noTransparencyLog(e){return e??Mt.context.payload.repository?.private}static getProvenanceBlobs(e){let r=mf.default.join(e.localExportDir,"provenance.json");if($l.default.existsSync(r))return{[r]:$l.default.readFileSync(r)};let s=$l.default.readdirSync(e.localExportDir,{withFileTypes:!0}),i=s.filter(n=>n.isDirectory());if(i.length>0&&i.length===s.length&&i.every(n=>$l.default.existsSync(mf.default.join(e.localExportDir,n.name,"provenance.json")))){let n={};for(let a of i){let c=