varnVe=Object.create;varzx=Object.defineProperty;variVe=Object.getOwnPropertyDescriptor;varoVe=Object.getOwnPropertyNames;varaVe=Object.getPrototypeOf,cVe=Object.prototype.hasOwnProperty;varuVe=(t,e)=>()=>(t&&(e=t(t=0)),e);varb=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),J1e=(t,e)=>{for(varrine)zx(t,r,{get:e[r],enumerable:!0})},pVe=(t,e,r,s)=>{if(e&&typeofe=="object"||typeofe=="function")for(letnofoVe(e))!cVe.call(t,n)&&n!==r&&zx(t,n,{get:()=>e[n],enumerable:!(s=iVe(e,n))||s.enumerable});returnt};varx=(t,e,r)=>(r=t!=null?nVe(aVe(t)):{},pVe(e||!t||!t.__esModule?zx(r,"default",{value:t,enumerable:!0}):r,t));varnre=b(Yf=>{"use strict";varqrt=require("net"),hVe=require("tls"),Bx=require("http"),tre=require("https"),MVe=require("events"),Irt=require("assert"),mVe=require("util");Yf.httpOverHttp=gVe;Yf.httpsOverHttp=zVe;Yf.httpOverHttps=OVe;Yf.httpsOverHttps=EVe;functiongVe(t){vare=newcu(t);returne.request=Bx.request,e}functionzVe(t){vare=newcu(t);returne.request=Bx.request,e.createSocket=rre,e.defaultPort=443,e}functionOVe(t){vare=newcu(t);returne.request=tre.request,e}functionEVe(t){vare=newcu(t);returne.request=tre.request,e.createSocket=rre,e.defaultPort=443,e}functioncu(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||Bx.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(s,n,i,o){for(vara=sre(n,i,o),c=0,u=e.requests.length;c<u;++c){varp=e.requests[c];if(p.host===a.host&&p.port===a.port){e.requests.splice(c,1),p.request.onSocket(s);return}}s.destroy(),e.removeSocket(s)})}mVe.inherits(cu,MVe.EventEmitter);cu.prototype.addRequest=function(e,r,s,n){vari=this,o=Dx({request:e},i.options,sre(r,s,n));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(a){a.on("free",c),a.on("close",u),a.on("agentRemove",u),e.onSocket(a);functionc(){i.emit("free",a,o)}functionu(p){i.removeSocket(a),a.removeListener("free",c),a.removeListener("close",u),a.removeListener("agentRemove",u)}})};cu.prototype.createSocket=function(e,r){vars=this,n={};s.sockets.push(n);vari=Dx({},s.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+newBuffer(i.proxyAuth).toString("base64")),tl("making CONNECT request");varo=s.request(i);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",c),o.once("connect",u),o.once("error",p),o.end();functiona(l){l.upgrade=!0}functionc(l,A,f){process.nextTick(function(){u(l,A,f)})}functionu(l,A,f){if(o.removeAllListeners(),A.removeAllListeners(),l.statusCode!==200){tl("tunneling socket could not be established, statusCode=%d",l.statusCode),A.destroy();varM=newError("tunneling socket could not be established, statusCode="+l.statusCode);M.code="ECONNRESET",e.request.emit("error",M),s.removeSocket(n);return}if(f.length>0){tl("got illegal response body from proxy"),A.destroy();varM=newError("got illegal response body from proxy");M.code="ECONNRESET",e.request.emit("error",M),s.removeSocket(n);return}returntl("tunneling connection has established"),s.sockets[s.sockets.indexOf(n)]=A,r(A)}functionp(l){o.removeAllListeners(),tl(`tunneling socket could not be established, cause=%s
`);A.push(g),i+=g.byteLength,M&&(i=null),n=t,s=async function*(){for(let y of A)y.stream?yield*y.stream():yield y},o=`multipart/form-data;boundary=${c}`}else if(Ane(t))n=t,i=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Qg.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:QYe(t)}if((typeof n=="string"||Qg.isBuffer(n))&&(i=Buffer.byteLength(n)),s!=null){let c;r=new ReadableStream({async start(){c=s(t)[Symbol.asyncIterator]()},async pull(u){let{value:p,done:l}=await c.next();if(l)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!hne(r)){let A=new Uint8Array(p);A.byteLength&&u.enqueue(A)}return u.desiredSize>0},async cancel(u){await c.return()},type:"bytes"})}return[{stream:r,source:n,length:i},o]}function ZYe(t,e=!1){return t instanceof ReadableStream&&(NW(!Qg.isDisturbed(t),"The body has already been consumed."),NW(!t.locked,"The stream is locked.")),gne(t,e)}function eJe(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}function tJe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function rJe(t){return{blob(){return ub(this,r=>{let s=fne(this);return s===null?s="":s&&(s=YYe(s)),new VYe([r],{type:s})},t)},arrayBuffer(){return ub(this,r=>new Uint8Array(r).buffer,t)},text(){return ub(this,bne,t)},json(){return ub(this,nJe,t)},formData(){return ub(this,r=>{let s=fne(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let n=JYe(r,s);if(n==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new dne;return i[pb]=n,i}case"application/x-www-form-urlencoded":{let n=new URLSearchParams(r.toString()),i=new dne;for(let[o,a]of n)i.append(o,a);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return ub(this,r=>new Uint8Array(r),t)}}}function sJe(t){Object.assign(t.prototype,rJe(t))}async function ub(t,e,r){if(XYe.brandCheck(t,r),zne(t))throw new TypeError("Body is unusable: Body has already been read");tJe(t[pb]);let s=UYe(),n=o=>s.reject(o),i=o=>{try{s.resolve(e(o))}catch(a){n(a)}};return t[pb].body==null?(i(Buffer.allocUnsafe(0)),s.promise):(await GYe(t[pb].body,i,n),s.promise)}function zne(t){let e=t[pb].body;return e!=null&&(e.stream.locked||Qg.isDisturbed(e.stream))}function nJe(t){return JSON.parse(bne(t))}function fne(t){let e=t[pb].headersList,r=HYe(e);return r==="failure"?null:r}One.exports={extractBody:gne,safelyExtractBody:ZYe,cloneBody:eJe,mixinBody:sJe,streamRegistry:mne,hasFinalizationRegistry:Mne,bodyUnusable:zne}});var Sne=b((nst,Nne)=>{"use strict";var Ne=require("node:assert"),ke=i0(),{channels:Ene}=Kf(),FW=fW(),{RequestContentLengthMismatchError:JA,ResponseContentLengthMismatchError:iJe,RequestAbortedError:Ine,HeadersTimeoutError:oJe,HeadersOverflowError:aJe,SocketError:iB,InformationalError:Ab,BodyTimeoutError:cJe,HTTPParserError:uJe,ResponseExceededMaxSizeError:pJe}=O0(),{kUrl:Rne,kReset:Ns,kClient:WW,kParser:It,kBlocking:Ug,kRunning:br,kPending:lJe,kSize:yne,kWriting:nl,kQueue:go,kNoRef:Pg,kKeepAliveDefaultTimeout:AJe,kHostHeader:dJe,kPendingIdx:fJe,kRunningIdx:ci,kError:ui,kPipelining:sB,kSocket:db,kKeepAliveTimeoutValue:oB,kMaxHeadersSize:vW,kKeepAliveMaxTimeout:bJe,kKeepAliveTimeoutThreshold:hJe,kHeadersTimeout:MJe,kBodyTimeout:mJe,kStrictContentLength:LW,kMaxRequests:Cne,kCounter:gJe,kMaxResponseSize:zJe,kOnError:OJe,kResume:sl,kHTTPContext:wne}=lt(),da=mse(),EJe=Buffer.alloc(0),eB=Buffer[Symbol.species],tB=ke.addListener,yJe=ke.removeAllListeners,TW;async function CJe(){let t=process.env.JEST_WORKER_ID?MW():void 0,e;try{e=await WebAssembly.compile(Ose())}catch{e=await WebAssembly.compile(t||MW())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,s,n)=>0,wasm_on_status:(r,s,n)=>{Ne(M1.ptr===r);let i=s-ba+fa.byteOffset;return M1.onStatus(new eB(fa.buffer,i,n))||0},wasm_on_message_begin:r=>(Ne(M1.ptr===r),M1.onMessageBegin()||0),wasm_on_he
`}return Ene.sendHeaders.hasSubscribers&&Ene.sendHeaders.publish({request:e,headers:g,socket:f}),!c||A===0?Dne(M,null,t,e,f,p,g,l):ke.isBuffer(c)?Dne(M,c,t,e,f,p,g,l):ke.isBlobLike(c)?typeof c.stream=="function"?qne(M,c.stream(),t,e,f,p,g,l):NJe(M,c,t,e,f,p,g,l):ke.isStream(c)?wJe(M,c,t,e,f,p,g,l):ke.isIterable(c)?qne(M,c,t,e,f,p,g,l):Ne(!1),!0}function wJe(t,e,r,s,n,i,o,a){Ne(i!==0||r[br]===0,"stream body cannot be pipelined");let c=!1,u=new aB({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o}),p=function(M){if(!c)try{!u.write(M)&&this.pause&&this.pause()}catch(g){ke.destroy(this,g)}},l=function(){c||e.resume&&e.resume()},A=function(){if(queueMicrotask(()=>{e.removeListener("error",f)}),!c){let M=new Ine;queueMicrotask(()=>f(M))}},f=function(M){if(!c){if(c=!0,Ne(n.destroyed||n[nl]&&r[br]<=1),n.off("drain",l).off("error",f),e.removeListener("data",p).removeListener("end",f).removeListener("close",A),!M)try{u.end()}catch(g){M=g}u.destroy(M),M&&(M.code!=="UND_ERR_INFO"||M.message!=="reset")?ke.destroy(e,M):ke.destroy(e)}};e.on("data",p).on("end",f).on("error",f).on("close",A),e.resume&&e.resume(),n.on("drain",l).on("error",f),e.errorEmitted??e.errored?setImmediate(()=>f(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>f(null)),(e.closeEmitted??e.closed)&&setImmediate(A)}function Dne(t,e,r,s,n,i,o,a){try{e?ke.isBuffer(e)&&(Ne(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${o}content-length:${i}\r
`,"latin1")),s.onRequestSent(),r[sl]()}catch(c){t(c)}}async function NJe(t,e,r,s,n,i,o,a){Ne(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new JA;let c=Buffer.from(await e.arrayBuffer());n.cork(),n.write(`${o}content-length:${i}\r
`,"latin1"),n.write(c),n.uncork(),s.onBodySent(c),s.onRequestSent(),!a&&s.reset!==!1&&(n[Ns]=!0),r[sl]()}catch(c){t(c)}}async function qne(t,e,r,s,n,i,o,a){Ne(i!==0||r[br]===0,"iterator body cannot be pipelined");let c=null;function u(){if(c){let A=c;c=null,A()}}let p=()=>new Promise((A,f)=>{Ne(c===null),n[ui]?f(n[ui]):c=A});n.on("close",u).on("drain",u);let l=new aB({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let A of e){if(n[ui])throw n[ui];l.write(A)||await p()}l.end()}catch(A){l.destroy(A)}finally{n.off("close",u).off("drain",u)}}var aB=class{constructor({abort:e,socket:r,request:s,contentLength:n,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=s,this.contentLength=n,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[nl]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[ui])throw r[ui];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(n!==null&&o+u>n){if(i[LW])throw new JA;process.emitWarning(new JA)}r.cork(),o===0&&(!a&&s.reset!==!1&&(r[Ns]=!0),n===null?r.write(`${c}transfer-encoding:chunked\r
`,"latin1"),r!==null&&n!==r){if(s[LW])throw new JA;process.emitWarning(new JA)}e[It].timeout&&e[It].timeoutType===fb&&e[It].timeout.refresh&&e[It].timeout.refresh(),s[sl]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[nl]=!1,e&&(Ne(s[br]<=1,"pipeline should only contain this request"),n(e))}};Nne.exports=DJe});var Qne=b((ist,_ne)=>{"use strict";var pi=require("node:assert"),{pipeline:SJe}=require("node:stream"),u0=i0(),{RequestContentLengthMismatchError:kW,RequestAbortedError:Fne,SocketError:Gg,InformationalError:UW}=O0(),{kUrl:cB,kReset:pB,kClient:bb,kRunning:lB,kPending:FJe,kQueue:il,kPendingIdx:GW,kRunningIdx:zo,kError:Eo,kSocket:q1,kStrictContentLength:vJe,kOnError:HW,kMaxConcurrentStreams:Lne,kHTTP2Session:Oo,kResume:ol,kSize:TJe,kHTTPContext:xJe}=lt(),fu=Symbol("open streams"),vne,Tne=!1,uB;try{uB=require("node:http2")}catch{uB={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:WJe,HTTP2_HEADER_METHOD:LJe,HTTP2_HEADER_PATH:_Je,HTTP2_HEADER_SCHEME:QJe,HTTP2_HEADER_CONTENT_LENGTH:PJe,HTTP2_HEADER_EXPECT:kJe,HTTP2_HEADER_STATUS:UJe}}=uB;function GJe(t){let e=[];for(let[r,s]of Object.entries(t))if(Array.isArray(s))for(let n of s)e.push(Buffer.from(r),Buffer.from(n));else e.push(Buffer.from(r),Buffer.from(s));return e}async function HJe(t,e){t[q1]=e,Tne||(Tne=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=uB.connect(t[cB],{createConnection:()=>e,peerMaxConcurrentStreams:t[Lne]});r[fu]=0,r[bb]=t,r[q1]=e,u0.addListener(r,"error",VJe),u0.addListener(r,"frameError",jJe),u0.addListener(r,"end",$Je),u0.addListener(r,"goaway",YJe),u0.addListener(r,"close",function(){let{[bb]:n}=this,{[q1]:i}=n,o=this[q1][Eo]||this[Eo]||new Gg("closed",u0.getSocketInfo(i));if(n[Oo]=null,n.destroyed){pi(n[FJe]===0);let a=n[il].splice(n[zo]);for(let c=0;c<a.length;c++){let u=a[c];u0.errorRequest(n,u,o)}}}),r.unref(),t[Oo]=r,e[Oo]=r,u0.addListener(e,"error",function(n){pi(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Eo]=n,this[bb][HW](n)}),u0.addListener(e,"end",function(){u0.destroy(this,new Gg("other side closed",u0.getSocketInfo(this)))}),u0.addListener(e,"close",function(){let n=this[Eo]||new Gg("closed",u0.getSocketInfo(this));t[q1]=null,this[Oo]!=null&&this[Oo].destroy(n),t[GW]=t[zo],pi(t[lB]===0),t.emit("disconnect",t[cB],[t],n),t[ol]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...n){return KJe(t,...n)},resume(){XJe(t)},destroy(n,i){s?queueMicrotask(i):e.destroy(n).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function XJe(t){let e=t[q1];e?.destroyed===!1&&(t[TJe]===0&&t[Lne]===0?(e.unref(),t[Oo].unref()):(e.ref(),t[Oo].ref()))}function VJe(t){pi(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[q1][Eo]=t,this[bb][HW](t)}function jJe(t,e,r){if(r===0){let s=new UW(`HTTP/2:"frameError"received-type${t},code${e}`);this[q1][Eo]=s,this[bb][HW](s)}}function $Je(){let t=new Gg("other side closed",u0.getSocketInfo(this[q1]));this.destroy(t),u0.destroy(this[q1],t)}function YJe(t){let e=this[Eo]||new Gg(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,u0.getSocketInfo(this)),r=this[bb];if(r[q1]=null,r[xJe]=null,this[Oo]!=null&&(this[Oo].destroy(e),this[Oo]=null),u0.destroy(this[q1],e),r[zo]<r[il].length){let s=r[il][r[zo]];r[il][r[zo]++]=null,u0.errorRequest(r,s,e),r[GW]=r[zo]}pi(r[lB]===0),r.emit("disconnect",r[cB],[r],e),r[ol]()}function JJe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function KJe(t,e){let r=t[Oo],{method:s,path:n,host:i,upgrade:o,expectContinue:a,signal:c,headers:u}=e,{body:p}=e;if(o)return u0.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let R=0;R<u.length;R+=2){let F=u[R+0],T=u[R+1];if(Array.isArray(T))for(let _=0;_<T.length;_++)l[F]?l[F]+=`,${T[_]}`:l[F]=T[_];else l[F]=T}let A,{hostname:f,port:M}=t[cB];l[WJe]=i||`${f}${M?`:${M}`:""}`,l[LJe]=s;let g=R=>{e.aborted||e.completed||(R=R||new Fne,u0.errorRequest(t,e,R),A!=null&&u0.destroy(A,R),u0.destroy(p,R),t[il][t[zo]++]=null,t[ol]())};try{e.onConnect(g)}catch(R){u0.errorRequest
globstarwhile`,t,p,e,l,A),this.matchOne(t.slice(p),e.slice(l),r))return this.debug("globstar found match!",p,o,A),!0;if(A==="."||A===".."||!s.dot&&A.charAt(0)==="."){this.debug("dot detected!",t,p,e,l);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(r&&(this.debug(`
`;if(s.username||s.password){let A=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(A).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(i))a+=`${A}:${i[A]}\r
`)+4,e.outputData[0].data=e._header+s.substring(n),Ah("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(Ah("Creating `tls.Socket`: %o",this.connectOpts),i=ZA0.connect(this.connectOpts)):(Ah("Creating `net.Socket`: %o",this.connectOpts),i=KA0.connect(this.connectOpts)),await(0,t20.once)(i,"connect"),i}};_q.protocols=["http","https"];Ci.HttpProxyAgent=_q;function s20(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var Jbe=b(Zq=>{"use strict";Object.defineProperty(Zq,"__esModule",{value:!0});Zq.state=void 0;Zq.state={instrumenterImplementation:void 0}});var fhe=b(nI=>{"use strict";Object.defineProperty(nI,"__esModule",{value:!0});nI.state=void 0;nI.state={operationRequestMap:new WeakMap}});var Xme=b(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});var yM0=require("os"),CM0=require("util");function BM0(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var DM0=BM0(CM0);function qM0(t,...e){process.stderr.write(`${DM0.default.format(t,...e)}${yM0.EOL}`)}var xme=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Lme,mU=[],gU=[],y5=[];xme&&zU(xme);var _me=Object.assign(t=>Qme(t),{enable:zU,enabled:OU,disable:IM0,log:qM0});function zU(t){Lme=t,mU=[],gU=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?gU.push(new RegExp(`^${s.substr(1)}$`)):mU.push(new RegExp(`^${s}$`));for(let s of y5)s.enabled=OU(s.namespace)}function OU(t){if(t.endsWith("*"))return!0;for(let e of gU)if(e.test(t))return!1;for(let e of mU)if(e.test(t))return!0;return!1}function IM0(){let t=Lme||"";return zU(""),t}function Qme(t){let e=Object.assign(r,{enabled:OU(t),destroy:RM0,log:_me.log,namespace:t,extend:wM0});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return y5.push(e),e}function RM0(){let t=y5.indexOf(this);return t>=0?(y5.splice(t,1),!0):!1}function wM0(t){let e=Qme(`${this.namespace}:${t}`);return e.log=this.log,e}var jO=_me,Pme=new Set,O5=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,C5,B5=jO("azure");B5.log=(...t)=>{jO.log(...t)};var EU=["verbose","info","warning","error"];O5&&(Hme(O5)?kme(O5):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${O5}';loggingisnotenabled.Acceptablevalues:${EU.join(", ")}.`));function kme(t){if(t&&!Hme(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${EU.join(",")}`);C5=t;let e=[];for(let r of Pme)Gme(r)&&e.push(r.namespace);jO.enable(e.join(","))}function NM0(){return C5}var Wme={verbose:400,info:300,warning:200,error:100};function SM0(t){let e=B5.extend(t);return Ume(B5,e),{error:E5(e,"error"),warning:E5(e,"warning"),info:E5(e,"info"),verbose:E5(e,"verbose")}}function Ume(t,e){e.log=(...r)=>{t.log(...r)}}function E5(t,e){let r=Object.assign(t.extend(e),{level:e});if(Ume(t,r),Gme(r)){let s=jO.disable();jO.enable(s+","+r.namespace)}return Pme.add(r),r}function Gme(t){return!!(C5&&Wme[t.level]<=Wme[C5])}function Hme(t){return EU.includes(t)}wh.AzureLogger=B5;wh.createClientLogger=SM0;wh.getLogLevel=NM0;wh.setLogLevel=kme});var BU=b(YO=>{"use strict";Object.defineProperty(YO,"__esModule",{value:!0});var Nh=new WeakMap,D5=new WeakMap,$O=class t{constructor(){this.onabort=null,Nh.set(this,[]),D5.set(this,!1)}get aborted(){if(!D5.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return D5.get(this)}static get none(){return new t}addEventListener(e,r){if(!Nh.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Nh.get(this).push(r)}removeEventListener(e,r){if(!Nh.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=Nh.get(this),n=s.indexOf(r);n>-1&&s.splice(n,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};function Vme(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=Nh.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),D5.set(t,!0)}var yU=class extends Error{constructor(e){super(e),t
${aS(u)}${u}`)}catch(u){if(u.code==="ENOENT")return;throw u}return cS(t,c)}Jn.exports.find=OS0;async function OS0(t,e){let r=FE(t,e);try{return(await oS(r)).reduce((n,i)=>i&&i.key===e?cS(t,i):n,null)}catch(s){if(s.code==="ENOENT")return null;throw s}}Jn.exports.delete=ES0;function ES0(t,e,r={}){if(!r.removeFully)return HIe(t,e,null,r);let s=FE(t,e);return GIe(s,{recursive:!0,force:!0})}Jn.exports.lsStream=XIe;function XIe(t){let e=J$(t),r=new dS0({objectMode:!0});return Promise.resolve().then(async()=>{let{default:s}=await Promise.resolve().then(()=>(iS(),nS)),n=await $$(e);return await s(n,async i=>{let o=Ic.join(e,i),a=await $$(o);await s(a,async c=>{let u=Ic.join(o,c),p=await $$(u);await s(p,async l=>{let A=Ic.join(u,l);try{let M=(await oS(A)).reduce((g,y)=>(g.set(y.key,y),g),new Map);for(let g of M.values()){let y=cS(t,g);y&&r.write(y)}}catch(f){if(f.code==="ENOENT")return;throw f}},{concurrency:j$})},{concurrency:j$})},{concurrency:j$}),r.end(),r}).catch(s=>r.emit("error",s)),r}Jn.exports.ls=yS0;async function yS0(t){return(await XIe(t).collect()).reduce((r,s)=>(r[s.key]=s,r),{})}Jn.exports.bucketEntries=oS;async function oS(t,e){let r=await pS0(t,"utf8");return CS0(r,e)}function CS0(t){let e=[];return t.split(`
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||aS(s[1])!==s[0])return;let n;try{n=JSON.parse(s[1])}catch{}n&&e.push(n)}),e}Jn.exports.bucketDir=J$;function J$(t){return Ic.join(t,`index-v${mS0}`)}Jn.exports.bucketPath=FE;function FE(t,e){let r=VIe(e);return Ic.join.apply(Ic,[J$(t)].concat(MS0(r)))}Jn.exports.hashKey=VIe;function VIe(t){return jIe(t,"sha256")}Jn.exports.hashEntry=aS;function aS(t){return jIe(t,"sha1")}function jIe(t,e){return cS0.createHash(e).update(t).digest("hex")}function cS(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?hS0(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}function $$(t){return lS0(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}});var PM=b(pS=>{"use strict";Object.defineProperty(pS,"__esModule",{value:!0});pS.LRUCache=void 0;var BS0=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,YIe=new Set,K$=typeof process=="object"&&process?process:{},JIe=(t,e,r,s)=>{typeof K$.emitWarning=="function"?K$.emitWarning(t,e,r,s):console.error(`[${r}]${e}:${t}`)},uS=globalThis.AbortController,$Ie=globalThis.AbortSignal;if(typeof uS>"u"){$Ie=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,n){this._onabort.push(n)}},uS=class{constructor(){e()}signal=new $Ie;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let n of this.signal._onabort)n(s);this.signal.onabort?.(s)}}};let t=K$.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,JIe("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))}}var DS0=t=>!YIe.has(t),cA=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),KIe=t=>cA(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?QM:null:null,QM=class extends Array{constructor(e){super(e),this.fill(0)}},Z$=class t{heap;length;static#e=!1;static create(e){let r=KIe(e);if(!r)return[];t.#e=!0;let s=new t(e,r);return t.#e=!1,s}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},eY=class t{#e;#t;#s;#r;#n;#i;#c;#u;get perf(){return this.#u}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#l;#d;#A;#a;#h;#O;#M;#m;#B;#g;#y;#C;#b;#E;#D;#z;#p;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#b,sizes:e.#y,keyMap:e.#d,keyList:e.#A,valList:e.#a,next:e.#h,prev:e.#O,get head(){return e.#M},get tail(){return e.#m},free:e.#B,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,s,n,i)=>e.#U(r,s,n,i),moveToTail:r=>e.#W(r),indexes:r=>e.#w(r),rindexes:r=>e.#S(r),isStale:r=>e.#I(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#o}get fetchMethod(){return this.#i}get memoMethod(){return this.#c}get dispose(){return this.#s}get onInsert(){return this.#r}get disposeAfter(){return this.#n}constructor(e){let{max:r=0,ttl:s,ttlResolution:n=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:u,onInsert:p,disposeAfter:l,noDisposeOnSet:A,noUpdateTTL:f,maxSize:M=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:O,memoMethod:B,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:F,allowStaleOnFetchAbort:T,ignoreFetchAbort:_,perf:j}=e;if(j!==void 0&&typeof j?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#u=j??BS0,r!==
globstarwhile`,e,A,r,f,M),this.matchOne(e.slice(A),r.slice(f),s))return this.debug("globstar found match!",A,c,M),!0;if(M==="."||M===".."||!n.dot&&M.charAt(0)==="."){this.debug("dot detected!",e,A,r,f);break}this.debug("globstar swallow a segment, and continue"),A++}return!!(s&&(this.debug(`
`;if(s.username||s.password){let A=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(A).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(i))a+=`${A}:${i[A]}\r
`);let{connect:u,buffered:p}=await c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200){if(e.once("socket",IT0),r.secureEndpoint){dy("Upgrading socket connection to TLS");let A=r.servername||r.host;return twe.connect({...rwe(r,"host","path","port"),socket:n,servername:Ay.isIP(A)?void 0:A})}return n}n.destroy();let l=new Ay.Socket({writable:!1});return l.readable=!0,e.once("socket",A=>{dy("Replaying proxy buffer for failed request"),(0,yT0.default)(A.listenerCount("data")>0),A.push(p),A.push(null)}),l}};p6.protocols=["http","https"];Yi.HttpsProxyAgent=p6;function IT0(t){t.resume()}function rwe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var uwe=b(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});var owe=require("buffer"),Xd={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."};Rp.ERRORS=Xd;function RT0(t){if(!owe.Buffer.isEncoding(t))throw new Error(Xd.INVALID_ENCODING)}Rp.checkEncoding=RT0;function awe(t){return typeof t=="number"&&isFinite(t)&&FT0(t)}Rp.isFiniteInteger=awe;function cwe(t,e){if(typeof t=="number"){if(!awe(t)||t<0)throw new Error(e?Xd.INVALID_OFFSET:Xd.INVALID_LENGTH)}else throw new Error(e?Xd.INVALID_OFFSET_NON_NUMBER:Xd.INVALID_LENGTH_NON_NUMBER)}function wT0(t){cwe(t,!1)}Rp.checkLengthValue=wT0;function NT0(t){cwe(t,!0)}Rp.checkOffsetValue=NT0;function ST0(t,e){if(t<0||t>e.length)throw new Error(Xd.INVALID_TARGET_OFFSET)}Rp.checkTargetOffset=ST0;function FT0(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function vT0(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof owe.Buffer.prototype[t]>"u")throw new Error(`PlatformdoesnotsupportBuffer.prototype.${t}.`)}Rp.bigIntAndBufferInt64Check=vT0});var lwe=b(lJ=>{"use strict";Object.defineProperty(lJ,"__esModule",{value:!0});var r0=uwe(),pwe=4096,TT0="utf8",pJ=class t{constructor(e){if(this.length=0,this._encoding=TT0,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(r0.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(r0.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(r0.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(r0.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(pwe);else{if(typeof e<"u")throw new Error(r0.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(pwe)}}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)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffe
`,e70=/\u2014 (\S+) (\S+)\n/g;function t70(t,e){let r=t.inclusionProof,s=HZ.fromString(r.checkpoint.envelope),n=HF.fromString(s.note);if(!r70(s,e))throw new Py.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return n}function r70(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let n=e.find(i=>J6e.crypto.bufferEqual(i.logID.subarray(0,4),s.keyHint)&&i.baseURL.match(s.name));return n?J6e.crypto.verify(r,n.publicKey,s.signature):!1})}var HZ=class t{note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(GZ))throw new Py.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(GZ),s=e.slice(0,r+1),i=e.slice(r+GZ.length).matchAll(e70),o=Array.from(i,a=>{let[,c,u]=a,p=Buffer.from(u,"base64");if(p.length<5)throw new Py.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:c,keyHint:p.subarray(0,4),signature:p.subarray(4)}});if(o.length===0)throw new Py.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,o)}},HF=class t{origin;logSize;logHash;rest;constructor(e,r,s,n){this.origin=e,this.logSize=r,this.logHash=s,this.rest=n}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new Py.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],n=BigInt(r[1]),i=Buffer.from(r[2],"base64"),o=r.slice(3);return new t(s,n,i,o)}};ky.LogCheckpoint=HF});var Z6e=b($Z=>{"use strict";Object.defineProperty($Z,"__esModule",{value:!0});$Z.verifyMerkleInclusion=i70;var jZ=Gn(),XZ=Pr(),s70=Buffer.from([0]),n70=Buffer.from([1]);function i70(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),n=BigInt(e.logSize);if(s<0n||s>=n)throw new XZ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${s}`});let{inner:i,border:o}=o70(s,n);if(r.hashes.length!==i+o)throw new XZ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let a=r.hashes.slice(0,i),c=r.hashes.slice(i),u=A70(t.canonicalizedBody),p=c70(a70(u,a,s),c);if(!jZ.crypto.bufferEqual(p,e.logHash))throw new XZ.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function o70(t,e){let r=u70(t,e),s=p70(t>>BigInt(r));return{inner:r,border:s}}function a70(t,e,r){return e.reduce((s,n,i)=>r>>BigInt(i)&BigInt(1)?VZ(n,s):VZ(s,n),t)}function c70(t,e){return e.reduce((r,s)=>VZ(s,r),t)}function u70(t,e){return l70(t^e-BigInt(1))}function p70(t){return t.toString(2).split("1").length-1}function l70(t){return t===0n?0:t.toString(2).length}function VZ(t,e){return jZ.crypto.digest("sha256",n70,t,e)}function A70(t){return jZ.crypto.digest("sha256",s70,t)}});var tFe=b(YZ=>{"use strict";Object.defineProperty(YZ,"__esModule",{value:!0});YZ.verifyTLogSET=b70;var eFe=Gn(),d70=Pr(),f70=Tm();function b70(t,e){if(!(0,f70.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(n=>{let i=h70(t),o=Buffer.from(eFe.json.canonicalize(i),"utf8"),a=t.inclusionPromise.signedEntryTimestamp;return eFe.crypto.verify(o,n.publicKey,a)}))throw new d70.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function h70(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:n}=t;return{body:n.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString("hex")}}});var sFe=b(XF=>{"use strict";Object.defineProperty(XF,"__esModule",{value:!0});XF.verifyTLogBody=O70;XF.verifyTLogInclusion=E70;var rFe=sK(),ZZ=Pr(),JZ=j6e(),KZ=$6e(),M70=Y6e(),m70=K6e(),g70=Z6e(),z70=tFe();function O70(t,e){let{kind:r,version:s}=t.kindVersion,n=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==n.kind||s!==n.apiVersion)throw new ZZ.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${s},received:${n.kind}/${n.apiVersion}`});switch(r){case"dsse":if(s==JZ.DSSE_API_VERSION_V1)return(0,JZ.verifyDSSETLogBody)(n,e);{let i=rFe.Entry.fromJSON(n);return(0,JZ.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,M70.verifyIntotoTLogBody)(n,e);case"hashedrekord":if(s==KZ.HASHEDREKORD_API_VERSION_V1)return(0,KZ.verifyHashedRekordTLogBody)(n,e);{let i=rFe.Entry.fromJSON(n);return(0,KZ.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new ZZ.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}function E70(t,e){let r=!1;if(y70(t)&&((0,z70.verifyTLogSET)(t,e),r=!0),C70(t)){let s=(0,m70.verifyCheckpoint)(t,e);(0,g70.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new ZZ.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}function y70(t){return t.inclusionPromise!==void 0}function C70(t){return t.inclusionProof!==void 0}});var uFe=b(VF=>{"use strict";Object.defineProperty(VF,"__esModule",{value:!0});VF.Verifier=void 0;var B70=require("util"),xm=Pr(),nFe=k6e(),iFe=G6e(),oFe=V6e(),aFe=sFe(),eee=class{trustMaterial;options;constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,timestampThreshold:r.timestampThreshold??r.tsaThreshold??1,tsaThreshold:0}}verify(e,r){let s=this.verifyTimestamps(e),n=this.verifySigningKey(e,s);return this.verifyTLogs(e),this.verify
Seehttps://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function q90(){Object.keys(Ev).forEach(function(t){delete Ev[t]})}});var Cv=b(Vc=>{"use strict";Vc.__esModule=!0;Vc.HandlebarsEnvironment=mee;function JFe(t){return t&&t.__esModule?t:{default:t}}var df=Bs(),I90=ri(),hee=JFe(I90),R90=Aee(),w90=VFe(),N90=fee(),yv=JFe(N90),S90=bee(),F90="4.7.9";Vc.VERSION=F90;var v90=8;Vc.COMPILER_REVISION=v90;var T90=7;Vc.LAST_COMPATIBLE_COMPILER_REVISION=T90;var x90={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"};Vc.REVISION_CHANGES=x90;var Mee="[object Object]";function mee(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},R90.registerDefaultHelpers(this),w90.registerDefaultDecorators(this)}mee.prototype={constructor:mee,logger:yv.default,log:yv.default.log,registerHelper:function(e,r){if(df.toString.call(e)===Mee){if(r)throw new hee.default("Arg not supported with multiple helpers");df.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(df.toString.call(e)===Mee)df.extend(this.partials,e);else{if(typeof r>"u")throw new hee.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(df.toString.call(e)===Mee){if(r)throw new hee.default("Arg not supported with multiple decorators");df.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){S90.resetLoggedProperties()}};var W90=yv.default.log;Vc.log=W90;Vc.createFrame=df.createFrame;Vc.logger=yv.default});var ZFe=b((Bv,KFe)=>{"use strict";Bv.__esModule=!0;function gee(t){this.string=t}gee.prototype.toString=gee.prototype.toHTML=function(){return""+this.string};Bv.default=gee;KFe.exports=Bv.default});var eve=b(zee=>{"use strict";zee.__esModule=!0;zee.wrapHelper=L90;function L90(t,e){if(typeof t!="function")return t;var r=function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=e(n),t.apply(this,arguments)};return r}});var ove=b(wA=>{"use strict";wA.__esModule=!0;wA.checkRevision=G90;wA.template=H90;wA.wrapProgram=Dv;wA.resolvePartial=X90;wA.invokePartial=V90;wA.noop=nve;function _90(t){return t&&t.__esModule?t:{default:t}}function Q90(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}var P90=Bs(),Gm=Q90(P90),k90=ri(),Lp=_90(k90),_p=Cv(),tve=Aee(),U90=eve(),rve=bee();function G90(t){var e=t&&t[0]||1,r=_p.COMPILER_REVISION;if(!(e>=_p.LAST_COMPATIBLE_COMPILER_REVISION&&e<=_p.COMPILER_REVISION))if(e<_p.LAST_COMPATIBLE_COMPILER_REVISION){var s=_p.REVISION_CHANGES[r],n=_p.REVISION_CHANGES[e];throw new Lp.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+n+").")}else throw new Lp.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function H90(t,e){if(!e)throw new Lp.default("No environment passed to template");if(!t||!t.main)throw new Lp.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(o,a,c){c.hash&&(a=Gm.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),o=e.VM.resolvePartial.call(this,o,a,c),c.hooks=this.hooks,c.protoAccessControl=this.protoAccessControl;var u=e.VM.invokePartial.call(this,o,a,c);if(u==null&&e.compile&&(c.partials[c.name]=e.compile(o,t.compilerOptions,e),u=c.partials[c.name](a,c)),u!=null){if(c.indent){for(var p=u.split(`
Expecting`+Re.join(", ")+", got '"+(this.terminals_[R]||R)+"'":Qe="Parse error on line "+(l+1)+": Unexpected "+(R==1?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(Qe,{text:this.lexer.match,token:this.terminals_[R]||R,line:this.lexer.yylineno,loc:y,expected:Re})}}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+R);switch(_[0]){case 1:o.push(R),a.push(this.lexer.yytext),c.push(this.lexer.yylloc),o.push(_[1]),R=null,F?(R=F,F=null):(A=this.lexer.yyleng,p=this.lexer.yytext,l=this.lexer.yylineno,y=this.lexer.yylloc,f>0&&f--);break;case 2:if(qe=this.productions_[_[1]][1],we.$=a[a.length-qe],we._$={first_line:c[c.length-(qe||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(qe||1)].first_column,last_column:c[c.length-1].last_column},O&&(we._$.range=[c[c.length-(qe||1)].range[0],c[c.length-1].range[1]]),he=this.performAction.call(we,p,A,l,this.yy,_[1],a,c),typeof he<"u")return he;qe&&(o=o.slice(0,-1*qe*2),a=a.slice(0,-1*qe),c=c.slice(0,-1*qe)),o.push(this.productions_[_[1]][0]),a.push(we.$),c.push(we._$),Y=u[o[o.length-2]][o[o.length-1]],o.push(Y);break;case 3:return!0}}return!0}},e=(function(){var s={EOF:1,parseError:function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},setInput:function(i){return this._input=i,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},input:function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var o=i.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},unput:function(i){var o=i.length,a=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o-1),this.offset-=o;var c=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),a.length-1&&(this.yylineno-=a.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:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-o]),this},more:function(){return this._more=!0,this},less:function(i){this.unput(this.match.slice(i))},pastInput:function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var i=this.pastInput(),o=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
`+o+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,a,c,u,p;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),A=0;A<l.length&&(a=this._input.match(this.rules[l[A]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,c=A,!this.options.flex)));A++);return o?(p=o[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],i=this.performAction.call(this,this.yy,this,l[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`.Unrecognizedtext.
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,o=!1,a;return{s:function(){r=(0,J0t.default)(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function itt(t,e){var r;if(t){if(typeof t=="string")return A9e(t,e);var s=(0,po.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return(0,ttt.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return A9e(t,e)}}function A9e(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}var ut="xregexp",Rf={astral:!1,namespacing:!1},kt={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},eu={},_C={},dg={},Kte=[],fg="default",d9e="class",ott={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},att=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,ctt=kt.exec.call(/()??/,"")[1]===void 0,utt=(0,If.default)(/x/)!==void 0,ptt={},m9e=ptt.toString;function e1e(t){var e=!0;try{if(new RegExp("",t),t==="y"){var r=(function(){return"gy"})(),s=".a".replace(new RegExp("a",r),".")==="..";s&&(e=!1)}}catch{e=!1}return e}var g9e=e1e("u"),t1e=e1e("y"),z9e={g:!0,i:!0,m:!0,u:g9e,y:t1e};function O9e(t,e,r,s,n){var i;if(t[ut]={captureNames:e},n)return t;if(t.__proto__)t.__proto__=oe.prototype;else for(var o in oe.prototype)t[o]=oe.prototype[o];return t[ut].source=r,t[ut].flags=s&&(0,ntt.default)(i=s.split("")).call(i).join(""),t}function QC(t){return kt.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}function Nf(t,e){var r;if(!oe.isRegExp(t))throw new TypeError("Type RegExp expected");var s=t[ut]||{},n=ltt(t),i="",o="",a=null,c=null;return e=e||{},e.removeG&&(o+="g"),e.removeY&&(o+="y"),o&&(n=kt.replace.call(n,new RegExp("[".concat(o,"]+"),"g"),"")),e.addG&&(i+="g"),e.addY&&(i+="y"),i&&(n=QC(n+i)),e.isInternalOnly||(s.source!==void 0&&(a=s.source),(0,If.default)(s)!=null&&(c=i?QC((0,If.default)(s)+i):(0,If.default)(s))),t=O9e(new RegExp(e.source||t.source,n),Att(t)?(0,po.default)(r=s.captureNames).call(r,0):null,a,c,e.isInternalOnly),t}function E9e(t){return(0,M9e.default)(t,16)}function y9e(t,e,r){return t.input[t.index-1]==="("||t.input[t.index+t[0].length]===")"||t.input[t.index-1]==="|"||t.input[t.index+t[0].length]==="|"||t.index<1||t.index+t[0].length>=t.input.length||kt.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||dtt(t.input,t.index+t[0].length,r)?"":"(?:)"}function ltt(t){return utt?(0,If.default)(t):kt.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}function Att(t){return!!(t[ut]&&t[ut].captureNames)}function C9e(t){return(0,M9e.default)(t,10).toString(16)}function dtt(t,e,r){var s="\\(\\?#[^)]*\\)",n="#[^#\\n]*",i="[?*+]|{\\d+(?:,\\d*)?}";return kt.test.call((0,wf.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,po.default)(t).call(t,e))}function r1e(t,e){return m9e.call(t)==="[object ".concat(e,"]")}function B9e(t){for(;t.length<4;)t="0".concat(t);return t}function ftt(t,e){if(QC(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=kt.replace.call(t,/^\(\?([\w$]+)\)/,function(i,o){if(kt.test.call(/[gy]/,o))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(i));return e=QC(e+o),""});var r=PC(e),s;try{for(r.s();!(s=r.n()).done;){var n=s.value;if(!z9e[n])throw new SyntaxError("Unknown regex flag ".concat(n))}}catch(i){r.e(i)}finally{r.f()}return{pattern:t,flags:e}}function D9e(t){var e={};return r1e(t,"String")?((0,Zte.default)(oe).call(oe,t,/[^\s,]+/,function(r){e[r]=!0}),e):t}function f9e(t){if(!/^[\w$]$/.test(t))throw new Error("Flag must be
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,o=!1,a;return{s:function(){r=(0,Ytt.default)(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function i1t(t,e){var r;if(t){if(typeof t=="string")return AUe(t,e);var s=(0,t1t.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return(0,e1t.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return AUe(t,e)}}function AUe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}var o1t=function(e){var r={},s=e._dec,n=e._hex,i=e._pad4;function o(A){return A.replace(/[- _]+/g,"").toLowerCase()}function a(A){var f=/^\\[xu](.+)/.exec(A);return f?s(f[1]):A.charCodeAt(A[0]==="\\"?1:0)}function c(A){var f="",M=-1;return(0,s1t.default)(e).call(e,A,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(g){var y=a(g[1]);y>M+1&&(f+="\\u".concat(i(n(M+1))),y>M+2&&(f+="-\\u".concat(i(n(y-1))))),M=a(g[2]||g[1])}),M<65535&&(f+="\\u".concat(i(n(M+1))),M<65534&&(f+="-\\uFFFF")),f}function u(A){var f="b!";return r[A][f]||(r[A][f]=c(r[A].bmp))}function p(A,f){var M=r[A],g="";if(M.bmp&&!M.isBmpLast){var y;g=(0,o1e.default)(y="[".concat(M.bmp,"]")).call(y,M.astral?"|":"")}if(M.astral&&(g+=M.astral),M.isBmpLast&&M.bmp){var O;g+=(0,o1e.default)(O="".concat(M.astral?"|":"","[")).call(O,M.bmp,"]")}return f?"(?:(?!".concat(g,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(g,")")}function l(A,f){var M=f?"a!":"a=";return r[A][M]||(r[A][M]=p(A,f))}e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(A,f,M){var g="Invalid double negation ",y="Unknown Unicode token ",O="Unicode token missing data ",B="Astral mode required for Unicode token ",I="Astral mode does not support Unicode tokens within character classes",R=A[1]==="P"||!!A[2],F=(0,r1t.default)(M).call(M,"A"),T=o(A[4]||A[3]),_=r[T];if(A[1]==="P"&&A[2])throw new SyntaxError(g+A[0]);if(!r.hasOwnProperty(T))throw new SyntaxError(y+A[0]);if(_.inverseOf){if(T=o(_.inverseOf),!r.hasOwnProperty(T)){var j;throw new ReferenceError((0,o1e.default)(j="".concat(O+A[0]," -> ")).call(j,_.inverseOf))}_=r[T],R=!R}if(!(_.bmp||F))throw new SyntaxError(B+A[0]);if(F){if(f==="class")throw new SyntaxError(I);return l(T,R)}return f==="class"?R?u(T):_.bmp:"".concat((R?"[^":"[")+_.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(A){var f="Unicode token requires name",M="Unicode token has no character data ",g=n1t(A),y;try{for(g.s();!(y=g.n()).done;){var O=y.value;if(!O.name)throw new Error(f);if(!(O.inverseOf||O.bmp||O.astral))throw new Error(M+O.name);r[o(O.name)]=O,O.alias&&(r[o(O.alias)]=O)}}catch(B){g.e(B)}finally{g.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(A){var f=o(A);return r[f]}};VC.default=o1t;dUe.exports=VC.default});var hUe=b((dLt,bUe)=>{bUe.exports=[{name:"InAdlam",astral:"\uD83A[\uDD00-\uDD5F]"},{name:"InAegean_Numbers",astral:"\uD800[\uDD00-\uDD3F]"},{name:"InAhom",astral:"\uD805[\uDF00-\uDF3F]"},{name:"InAlchemical_Symbols",astral:"\uD83D[\uDF00-\uDF7F]"},{name:"InAlphabetic_Presentation_Forms",bmp:"\uFB00-\uFB4F"},{name:"InAnatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE7F]"},{name:"InAncient_Greek_Musical_Notation",astral:"\uD834[\uDE00-\uDE4F]"},{name:"InAncient_Greek_Numbers",astral:"\uD800[\uDD40-\uDD8F]"},{name:"InAncient_Symbols",astral:"\uD800[\uDD90-\uDDCF]"},{name:"InArabic",bmp:"\u0600-\u06FF"},{name:"InArabic_Extended_A",bmp:"\u08A0-\u08FF"},{name:"InArabic_Mathematical_Alphabetic_Symbols",astral:"\uD83B[\uDE00-\uDEFF]"},{name:"InArabic_Presentation_Forms_A",bmp:"\uFB50-\uFDFF"},{name:"InArabic_Presentation_Forms_B",bmp:"\uFE70-\uFEFF"},{name:"InArabic_Supplement",bmp:"\u0750-\u077F"},{name:"InArmenian",bmp:"\u0530-\u058F"},{name:"InArrows",bmp:"\u2190-\u21FF"},{name:"InAvestan",astral:"\uD802[\uDF00-\uDF3F]"},{name:"InBalinese",bmp:"\u1B00-\u1B7F"},{name:"InBamum",
Supportbooleaninputlist:\`true | True | TRUE | false | False | FALSE\``)}functiond8(t,e){if(process.env.GITHUB_OUTPUT||"")returnIg("OUTPUT",q4(t,e));process.stdout.write(A8.EOL),ua("set-output",{name:t},ca(e))}functionJpe(t){process.exitCode=l8.Failure,jb(t)}functionfi(){returnprocess.env.RUNNER_DEBUG==="1"}functionw(t){ua("debug",{},t)}functionjb(t,e={}){ua("error",Ox(e),tinstanceofError?t.toString():t)}functionE0(t,e={}){ua("warning",Ox(e),tinstanceofError?t.toString():t)}functionW(t){process.stdout.write(t+A8.EOL)}functiong2(t){yx("group",t)}functionz2(){yx("endgroup")}functionar(t,e){returnVn0(this,void0,void0,function*(){g2(t);letr;try{r=yielde()}finally{z2()}returnr})}functionRD(t,e){if(process.env.GITHUB_STATE||"")returnIg("STATE",q4(t,e));ua("save-state",{name:t},ca(e))}functionKpe(t){returnprocess.env[`STATE_${t}`]||""}varNR=x(require("fs"),1),pH=x(require("os"),1),lH=x(require("path"),1);varT8=x(require("crypto"),1),Or=x(require("fs"),1);varUa0=x(F8(),1);varGD=x(require("os"),1),Ro=x(require("path"),1);varMi=x(F8(),1),kAe=x(require("stream"),1),UAe=x(require("util"),1),x8=require("assert");varPAe=function(t,e,r,s){functionn(i){returniinstanceofr?i:newr(function(o){o(i)})}returnnew(r||(r=Promise))(function(i,o){functiona(p){try{u(s.next(p))}catch(l){o(l)}}functionc(p){try{u(s.throw(p))}catch(l){o(l)}}functionu(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},kD=class{constructor(e,r,s){if(e<1)thrownewError("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(r),this.maxSeconds=Math.floor(s),this.minSeconds>this.maxSeconds)thrownewError("min seconds should be less than or equal to max seconds")}execute(e,r){returnPAe(this,void0,void0,function*(){lets=1;for(;s<this.maxAttempts;){try{returnyielde()}catch(i){if(r&&!r(i))throwi;W(i.message)}letn=this.getSleepAmount();W(`Waiting ${n} seconds before trying again`),yieldthis.sleep(n),s++}returnyielde()})}getSleepAmount(){returnMath.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){returnPAe(this,void0,void0,function*(){returnnewPromise(r=>setTimeout(r,e*1e3))})}};varDa=function(t,e,r,s){functionn(i){returniinstanceofr?i:newr(function(o){o(i)})}returnnew(r||(r=Promise))(function(i,o){functiona(p){try{u(s.next(p))}catch(l){o(l)}}functionc(p){try{u(s.throw(p))}catch(l){o(l)}}functionu(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},UD=classextendsError{constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}},GAe=process.platform==="win32",Vit=process.platform==="darwin",Ha0="actions/tool-cache";functionmi(t,e,r,s){returnDa(this,void0,void0,function*(){e=e||Ro.join(YAe(),T8.randomUUID()),yieldyu(Ro.dirname(e)),w(`Downloading ${t}`),w(`Destination ${e}`);letn=3,i=v8("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=v8("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);returnyieldnewkD(n,i,o).execute(()=>Da(this,void0,void0,function*(){returnyieldXa0(t,e||"",r,s)}),c=>!(cinstanceofUD&&c.httpStatusCode&&c.httpStatusCode<500&&c.httpStatusCode!==408&&c.httpStatusCode!==429))})}functionXa0(t,e,r,s){returnDa(this,void0,void0,function*(){if(Or.existsSync(e))thrownewError(`Destination file path ${e} already exists`);letn=newxs(Ha0,[],{allowRetries:!1});r&&(w("set auth"),s===void0&&(s={}),s.authorization=r);leti=yieldn.get(t,s);if(i.message.statusCode!==200){letp=newUD(i.message.statusCode);throww(`Failed to download from "${t}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),p}leto=UAe.promisify(kAe.pipeline),c=v8("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>i.message)(),u=!1;try{returnyieldo(c,Or.createWriteStream(e)),w("download complete"),u=!0,e}finally{if(!u){w("download failed");try{yieldDD(e)}catch(p){w(`Failed to delete '${e}'. ${p.message}`)}}}})}functionHAe(t,e){returnDa(this,arguments,void0,function*(r,s,n="xz"){if(!r)thrownewError("parameter
`).map(i=>i.trim());for(let i of n)!i||i.startsWith("#")||s.patterns.push(new Uz(i));return s.searchPaths.push(...Q8(s.patterns)),s})}static stat(e,r,s){return X8(this,void 0,void 0,function*(){let n;if(r.followSymbolicLinks)try{n=yield th.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){w(`Brokensymlink'${e.path}'`);return}throw new Error(`Noinformationfoundforthepath'${e.path}'.Thismayindicateabrokensymboliclink.`)}throw i}else n=yield th.promises.lstat(e.path);if(n.isDirectory()&&r.followSymbolicLinks){let i=yield th.promises.realpath(e.path);for(;s.length>=e.level;)s.pop();if(s.some(o=>o===i)){w(`Symlinkcycledetectedforpath'${e.path}'andrealpath'${i}'`);return}s.push(i)}return n})}};var qc0=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};function y2e(t,e){return qc0(this,void 0,void 0,function*(){return yield $D.create(t,e)})}var lq=x(require("crypto"),1),nh=x(require("fs"),1),B2=x(require("path"),1),ffe=x(Afe(),1),bfe=x(require("util"),1);var Kz;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(Kz||(Kz={}));var es;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(es||(es={}));var In;(function(t){t.GNU="gnu",t.BSD="bsd"})(In||(In={}));var uq=2,pq=5e3,AQ=5e3,dQ=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,dfe=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,Zz="cache.tar",fQ="manifest.txt",sat=10*Math.pow(1024,3);var sh=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},Cl0=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r);function s(i){r[i]=t[i]&&function(o){return new Promise(function(a,c){o=t[i](o),n(a,c,o.done,o.value)})}}function n(i,o,a,c){Promise.resolve(c).then(function(u){i({value:u,done:a})},o)}},Bl0="1.0";function eO(){return sh(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let s;t?s=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?s="/Users":s="/home",e=B2.join(s,"actions","temp")}let r=B2.join(e,lq.randomUUID());return yield yu(r),r})}function Ia(t){return nh.statSync(t).size}function bQ(t){return sh(this,void 0,void 0,function*(){var e,r,s,n,i;let o=[],a=(i=process.env.GITHUB_WORKSPACE)!==null&&i!==void 0?i:process.cwd(),c=yield y2e(t.join(`
`),{implicitDescendants:!1});try{for(var u=!0,p=Cl0(c.globGenerator()),l;l=yield p.next(),e=l.done,!e;u=!0){n=l.value,u=!1;let f=B2.relative(a,n).replace(new RegExp(`\\${B2.sep}`,"g"),"/");w(`Matched:${f}`),f===""?o.push("."):o.push(`${f}`)}}catch(A){r={error:A}}finally{try{!u&&!e&&(s=p.return)&&(yield s.call(p))}finally{if(r)throw r.error}}return o})}function tO(t){return sh(this,void 0,void 0,function*(){return bfe.promisify(nh.unlink)(t)})}function hfe(t){return sh(this,arguments,void 0,function*(e,r=[]){let s="";r.push("--version"),w(`Checking${e}${r.join(" ")}`);try{yield Bn(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:n=>s+=n.toString(),stderr:n=>s+=n.toString()}})}catch(n){w(n.message)}return s=s.trim(),w(s),s})}function rO(){return sh(this,void 0,void 0,function*(){let t=yield hfe("zstd",["--quiet"]),e=ffe.clean(t);return w(`zstdversion:${e}`),t===""?es.Gzip:es.ZstdWithoutLong})}function ql(t){return t===es.Gzip?Kz.Gzip:Kz.Zstd}function Mfe(){return sh(this,void 0,void 0,function*(){return nh.existsSync(dQ)?dQ:(yield hfe("tar")).toLowerCase().includes("gnu tar")?or("tar"):""})}function hQ(t,e){if(e===void 0)throw Error(`Expected${t}butvaluewasundefiend`);return e}function ih(t,e,r=!1){let s=t.slice();return e&&s.push(e),process.platform==="win32"&&!r&&s.push("windows-only"),s.push(Bl0),lq.createHash("sha256").update(s.join("|")).digest("hex")}function mfe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}var Th=x(require("fs"),1),Uge=require("url");var Ra=class extends Error{constructor(e){super(e),this.name="AbortError"}};var gfe=require("node:os"),zfe=x(require("node:util"),1),Ofe=x(require("node:process"),1);function Efe(t,...e){Ofe.default.stderr.write(`${zfe.default.format(t,...e)}${gfe.EOL}`)}var yfe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Bfe,MQ=[],mQ=[],dq=[];yfe&&gQ(yfe);var Dfe=Object.assign(t=>qfe(t),{enable:gQ,enabled:zQ,disable:Dl0,log:Efe});function gQ(t){Bfe=t,MQ=[],mQ=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?mQ.push(r.substring(1)):MQ.push(r);for(let r of dq)r.enabled=zQ(r.namespace)}function zQ(t){if(t.endsWith("*"))return!0;for(let e of mQ)if(Cfe(t,e))return!1;for(let e of MQ)if(Cfe(t,e))return!0;return!1}function Cfe(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let A=[],f="";for(let M of e)M==="*"&&f==="*"||(f=M,A.push(M));r=A.join("")}let s=0,n=0,i=r.length,o=t.length,a=-1,c=-1;for(;s<o&&n<i;)if(r[n]==="*"){if(a=n,n++,n===i)return!0;for(;t[s]!==r[n];)if(s++,s===o)return!1;c=s,s++,n++;continue}else if(r[n]===t[s])n++,s++;else if(a>=0){if(n=a+1,s=c+1,s===o)return!1;for(;t[s]!==r[n];)if(s++,s===o)return!1;c=s,s++,n++;continue}else return!1;let u=s===t.length,p=n===r.length,l=n===r.length-1&&r[n]==="*";return u&&(p||l)}function Dl0(){let t=Bfe||"";return gQ(""),t}function qfe(t){let e=Object.assign(r,{enabled:zQ(t),destroy:ql0,log:Dfe.log,namespace:t,extend:Il0});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return dq.push(e),e}function ql0(){let t=dq.indexOf(this);return t>=0?(dq.splice(t,1),!0):!1}function Il0(t){let e=qfe(`${this.namespace}:${t}`);return e.log=this.log,e}var oh=Dfe;var OQ=["verbose","info","warning","error"],Ife={verbose:400,info:300,warning:200,error:100};function Rfe(t,e){e.log=(...r)=>{t.log(...r)}}function wfe(t){return OQ.includes(t)}function fq(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,s,n=oh(t.namespace);n.log=(...p)=>{oh.log(...p)};function i(p){if(p&&!wfe(p))throw new Error(`Unknownloglevel'${p}'.Acceptablevalues:${OQ.join(",")}`);s=p;let l=[];for(let A of e)o(A)&&l.push(A.namespace);oh.enable(l.join(","))}r&&(wfe(r)?i(r):console.error(`${t.logLevelEnvVarName}settounknownloglevel'${r}';loggingisnotenabled.Acceptablevalues:${OQ.join(", ")}.`));function o(p){return!!(s&&Ife[p.level]<=Ife[s])}function a(p,l){let A=Object.assign(p.extend(l),{level:l});if(Rfe(p,A),o(A)){let f=oh.disable();oh.enab
${Fl0.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function mq(t){return t instanceof ts?!0:q2(t)&&t.name==="RestError"}function Ws(t,e){return Buffer.from(t,e)}var gq=x(require("node:http"),1),zq=x(require("node:https"),1),DQ=x(require("node:zlib"),1),xfe=require("node:stream");var Oi=sO("ts-http-runtime");var vl0={};function nO(t){return t&&typeof t.pipe=="function"}function Tfe(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function Wfe(t){return t&&typeof t.byteLength=="number"}var Oq=class extends xfe.Transform{loadedBytes=0;progressCallback;_transform(e,r,s){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),s()}catch(n){s(n)}}constructor(e){super(),this.progressCallback=e}},qQ=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new Ra("The operation was aborted. Request has already been canceled.");s=u=>{u.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",s)}let n;e.timeout>0&&(n=setTimeout(()=>{let u=new So;Oi.info(`requestto'${u.sanitizeUrl(e.url)}'timedout.canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),o=i?.includes("gzip")||i?.includes("deflate"),a=typeof e.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){let u=Ll0(a);u!==null&&e.headers.set("Content-Length",u)}let c;try{if(a&&e.onUploadProgress){let M=e.onUploadProgress,g=new Oq(M);g.on("error",y=>{Oi.error("Error in upload progress",y)}),nO(a)?a.pipe(g):g.end(a),a=g}let u=await this.makeRequest(e,r,a);n!==void 0&&clearTimeout(n);let p=Tl0(u),A={status:u.statusCode??0,headers:p,request:e};if(e.method==="HEAD")return u.resume(),A;c=o?xl0(u,p):u;let f=e.onDownloadProgress;if(f){let M=new Oq(f);M.on("error",g=>{Oi.error("Error in download progress",g)}),c.pipe(M),c=M}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(A.status)?A.readableStreamBody=c:A.bodyAsText=await Wl0(c),A}finally{if(e.abortSignal&&s){let u=Promise.resolve();nO(a)&&(u=Tfe(a));let p=Promise.resolve();nO(c)&&(p=Tfe(c)),Promise.all([u,p]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(l=>{Oi.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,s){let n=new URL(e.url),i=n.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannotconnectto${e.url}whileallowInsecureConnectionisfalse.`);let a={agent:e.agent??this.getOrCreateAgent(e,i),hostname:n.hostname,path:`${n.pathname}${n.search}`,port:n.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((c,u)=>{let p=i?gq.default.request(a,c):zq.default.request(a,c);p.once("error",l=>{u(new ts(l.message,{code:l.code??ts.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new Ra("The operation was aborted. Rejecting from abort signal callback while making request.");p.destroy(l),u(l)}),s&&nO(s)?s.pipe(p):s?typeof s=="string"||Buffer.isBuffer(s)?p.end(s):Wfe(s)?p.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(Oi.error("Unrecognized body type",s),u(new ts("Unrecognized body type"))):p.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?gq.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new gq.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return zq.default.globalAgent;let n=e.tlsSettings??vl0,i=this.cachedHttpsAgents.get(n);return i&&i.options.keepAlive===!s||(Oi.info("No cached TLS Agent exist, creating a new Agent"),i=new zq.default.Agent({keepAlive:!s,...n}),this.cachedHttpsAgents.set(n,i)),i}}};function Tl0(t){let e=Rn();for(let r of Object.keys(t.headers)){let s=t.headers[r];Array.isArray(s)?s.length>0&&e.set(
`;return e}function h20(t){return t instanceof Uint8Array?t.byteLength:Gq(t)?t.size===-1?void 0:t.size:void 0}function M20(t){let e=0;for(let r of t){let s=h20(r);if(s===void 0)return;e+=s}return e}async function m20(t,e,r){let s=[Ws(`--${r}`,"utf-8"),...e.flatMap(i=>[Ws(`\r
`,"utf-8")],n=M20(s);n&&t.headers.set("Content-Length",n),t.body=await _be(s)}var cO="multipartPolicy",g20=70,z20=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function O20(t){if(t.length>g20)throw new Error(`Multipartboundary"${t}"exceedsmaximumlengthof70characters`);if(Array.from(t).some(e=>!z20.has(e)))throw new Error(`Multipartboundary"${t}"containsinvalidcharacters`)}function Xq(){return{name:cO,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,s=t.headers.get("Content-Type")??"multipart/mixed",n=s.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!n)throw new Error(`Gotmultipartrequestbody,butcontent-typeheaderwasnotmultipart:${s}`);let[,i,o]=n;if(o&&r&&o!==r)throw new Error(`Multipartboundarywasspecifiedas${o}intheheader,butgot${r}intherequestbody`);return r??=o,r?O20(r):r=f20(),t.headers.set("Content-Type",`${i};boundary=${r}`),await m20(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function Vq(){return Mq()}var Qbe=fq({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),Qpt=Qbe.logger;function Sa(t){return Qbe.createClientLogger(t)}var Fa=Sa("core-rest-pipeline");function VQ(t={}){return yq({logger:Fa.info,...t})}var jQ=Cq;function $Q(t={}){return Bq(t)}var jq=x(require("node:os"),1),$q=x(require("node:process"),1);function Pbe(){return"User-Agent"}async function kbe(t){if($q.default&&$q.default.versions){let e=`${jq.default.type()}${jq.default.release()};${jq.default.arch()}`,r=$q.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})`)}}var Yq="1.22.2";function R20(t){let e=[];for(let[r,s]of t){let n=s?`${r}/${s}`:r;e.push(n)}return e.join(" ")}function Ube(){return Pbe()}async function Jq(t){let e=new Map;e.set("core-rest-pipeline",Yq),await kbe(e);let r=R20(e);return t?`${t}${r}`:r}var Gbe=Ube(),Hbe="userAgentPolicy";function YQ(t={}){let e=Jq(t.userAgentPrefix);return{name:Hbe,async sendRequest(r,s){return r.headers.has(Gbe)||r.headers.set(Gbe,await e),s(r)}}}var Fn=class extends Error{constructor(e){super(e),this.name="AbortError"}};function JQ(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:n}=e??{};return new Promise((i,o)=>{function a(){o(new Fn(n??"The operation was aborted."))}function c(){s?.removeEventListener("abort",u)}function u(){r?.(),c(),a()}if(s?.aborted)return a();try{t(p=>{c(),i(p)},p=>{c(),o(p)})}catch(p){o(p)}s?.addEventListener("abort",u)})}var v20="The delay was aborted.";function uO(t,e){let r,{abortSignal:s,abortErrorMsg:n}=e??{};return JQ(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:s,abortErrorMsg:n??v20})}function Rl(t){if(q2(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}`}}function Xbe(t){return q2(t)}function dh(){return D2()}var q0=w2;var Vbe=Symbol("rawContent");function ZQ(t){return typeof t[Vbe]=="function"}function jbe(t){return ZQ(t)?t[Vbe]():t}var Kq=cO;function eP(){let t=Xq();return{name:Kq,sendRequest:async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)ZQ(s.body)&&(s.body=jbe(s.body));return t.sendRequest(e,r)}}}var tP=Dq;function rP(){return qq()}function sP(t={}){return wq(t)}function nP(){return Nq()}function wl(t){return kQ(t)}function iP(t,e){return Pq(t,e)}var $be="setClientRequestIdPolicy";function oP(t="x-ms-client-request-id"){return{name:$be,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}function aP(t){return kq(t)}function cP(t){return Uq(t)}var fh={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Ybe(t={}){let e=new uP(t.parentContext);return t.span&&(e=e.setValue(fh.span,t.span)),t.namespace&&(e=e.setValue(fh.namespace,t.namespace)),e}var uP=class t{_contextMap;constructor(e){this._contextMap=e instanceof t
`&&t[i]!=="\r";i++)c+=t[i];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),i--),!nf0(c)){let l;return c.trim().length===0?l="Invalid space after '<'.":l="Tag '"+c+"' is an invalid name.",$t("InvalidTag",l,rs(t,i))}let u=Zd0(t,i);if(u===!1)return $t("InvalidAttr","Attributes for '"+c+"' have open quote.",rs(t,i));let p=u.value;if(i=u.index,p[p.length-1]==="/"){let l=i-p.length;p=p.substring(0,p.length-1);let A=Fhe(p,e);if(A===!0)s=!0;else return $t(A.err.code,A.err.msg,rs(t,l+A.err.line))}else if(a)if(u.tagClosed){if(p.trim().length>0)return $t("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",rs(t,o));if(r.length===0)return $t("InvalidTag","Closing tag '"+c+"' has not been opened.",rs(t,o));{let l=r.pop();if(c!==l.tagName){let A=rs(t,l.tagStartPos);return $t("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+A.line+", col "+A.col+") instead of closing tag '"+c+"'.",rs(t,o))}r.length==0&&(n=!0)}}else return $t("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",rs(t,i));else{let l=Fhe(p,e);if(l!==!0)return $t(l.err.code,l.err.msg,rs(t,i-p.length+l.err.line));if(n===!0)return $t("InvalidXml","Multiple possible root nodes found.",rs(t,i));e.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:o}),s=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=She(t,i);continue}else if(t[i+1]==="?"){if(i=Nhe(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=rf0(t,i);if(l==-1)return $t("InvalidChar","char '&' is not expected.",rs(t,i));i=l}else if(n===!0&&!whe(t[i]))return $t("InvalidXml","Extra text at the end",rs(t,i));t[i]==="<"&&i--}}else{if(whe(t[i]))continue;return $t("InvalidChar","char '"+t[i]+"' is not expected.",rs(t,i))}if(s){if(r.length==1)return $t("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",rs(t,r[0].tagStartPos));if(r.length>0)return $t("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return $t("InvalidXml","Start tag expected.",1);return!0}function whe(t){return t===" "||t===" "||t===`
`||t==="\r"}function Nhe(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 $t("InvalidXml","XML declaration allowed only at the start of the document.",rs(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function She(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}var Jd0='"',Kd0="'";function Zd0(t,e){let r="",s="",n=!1;for(;e<t.length;e++){if(t[e]===Jd0||t[e]===Kd0)s===""?s=t[e]:s!==t[e]||(s="");else if(t[e]===">"&&s===""){n=!0;break}r+=t[e]}return s!==""?!1:{value:r,index:e,tagClosed:n}}var ef0=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Fhe(t,e){let r=uI(t,ef0),s={};for(let n=0;n<r.length;n++){if(r[n][1].length===0)return $t("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",OO(r[n]));if(r[n][3]!==void 0&&r[n][4]===void 0)return $t("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",OO(r[n]));if(r[n][3]===void 0&&!e.allowBooleanAttributes)return $t("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",OO(r[n]));let i=r[n][2];if(!sf0(i))return $t("InvalidAttr","Attribute '"+i+"' is an invalid name.",OO(r[n]));if(!Object.prototype.hasOwnProperty.call(s,i))s[i]=1;else return $t("InvalidAttr","Attribute '"+i+"' is repeated.",OO(r[n]))}return!0}function tf0(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}function rf0(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,tf0(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}function $t(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function sf0(t){return qP(t)}function nf0(t){return qP(t)}function rs(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function OO(t){return t.startIndex+t[1].length}var vhe={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"},The={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",ntilde:"\xF1",Ograve:"\xD2",ograve:"\xF2",Oacute:"\xD3",oacute:"\xF3",Ocirc:"\xD4",ocirc:"\xF4",Otilde:"\xD5",otilde:"\xF5",Ouml:"\xD6",ouml:"\xF6",Oslash:"\xD8",oslash:"\xF8",Ugrave:"\xD9",ugrave:"\xF9",Uacute:"\xDA",uacute:"\xFA",Ucirc:"\xDB",ucirc:"\xFB",Uuml:"\xDC",uuml:"\xFC",Yacute:"\xDD",yacute:"\xFD",THORN:"\xDE",tho
`);let e=new Ps("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let n=this.options,i=new CO(n.processEntities),o=t.length;for(let a=0;a<o;a++)if(t[a]==="<"){let u=t.charCodeAt(a+1);if(u===47){let p=gh(t,">",a,"Closing Tag is not closed."),l=t.substring(a+2,p).trim();if(n.removeNSPrefix){let f=l.indexOf(":");f!==-1&&(l=l.substr(f+1))}l=TP(n.transformTagName,l,"",n).tagName,r&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher));let A=this.matcher.getCurrentTag();if(l&&n.unpairedTagsSet.has(l))throw new Error(`Unpairedtagcannotbeusedasclosingtag:</${l}>`);A&&n.unpairedTagsSet.has(A)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),s="",a=p}else if(u===63){let p=xP(t,a,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let l=this.buildAttributesMap(p.tagExp,this.matcher,p.tagName,!0);if(l){let A=l[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(A)||1),i.setXmlVersion(Number(A)||1)}if(!(n.ignoreDeclaration&&p.tagName==="?xml"||n.ignorePiTags)){let A=new Ps(p.tagName);A.add(n.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&n.ignoreAttributes!==!0&&(A[":@"]=l),this.addChild(r,A,this.readonlyMatcher,a)}a=p.closeIndex+1}else if(u===33&&t.charCodeAt(a+2)===45&&t.charCodeAt(a+3)===45){let p=gh(t,"-->",a+4,"Comment is not closed.");if(n.commentPropName){let l=t.substring(a+4,p-2);s=this.saveTextToParentTag(s,r,this.readonlyMatcher),r.add(n.commentPropName,[{[n.textNodeName]:l}])}a=p}else if(u===33&&t.charCodeAt(a+2)===68){let p=i.readDocType(t,a);this.entityDecoder.addInputEntities(p.entities),a=p.i}else if(u===33&&t.charCodeAt(a+2)===91){let p=gh(t,"]]>",a,"CDATA is not closed.")-2,l=t.substring(a+9,p);s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let A=this.parseTextData(l,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);A==null&&(A=""),n.cdataPropName?r.add(n.cdataPropName,[{[n.textNodeName]:l}]):r.add(n.textNodeName,A),a=p+2}else{let p=xP(t,a,n.removeNSPrefix);if(!p){let T=t.substring(Math.max(0,a-50),Math.min(o,a+50));throw new Error(`readTagExp returned undefined at position ${a}. Context: "${T}"`)}let l=p.tagName,A=p.rawTagName,f=p.tagExp,M=p.attrExpPresent,g=p.closeIndex;if({tagName:l,tagExp:f}=TP(n.transformTagName,l,f,n),n.strictReservedNames&&(l===n.commentPropName||l===n.cdataPropName||l===n.textNodeName||l===n.attributesGroupName))throw new Error(`Invalid tag name: ${l}`);r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher,!1));let y=r;y&&n.unpairedTagsSet.has(y.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let O=!1;f.length>0&&f.lastIndexOf("/")===f.length-1&&(O=!0,l[l.length-1]==="/"?(l=l.substr(0,l.length-1),f=l):f=f.substr(0,f.length-1),M=l!==f);let B=null,I={},R;R=qf0(A),l!==e.tagname&&this.matcher.push(l,{},R),l!==f&&M&&(B=this.buildAttributesMap(f,this.matcher,l),B&&(I=Df0(B,n))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let F=a;if(this.isCurrentNodeStopNode){let T="";if(O)a=p.closeIndex;else if(n.unpairedTagsSet.has(l))a=p.closeIndex;else{let j=this.readStopNodeData(t,A,g+1);if(!j)throw new Error(`Unexpected end of ${A}`);a=j.i,T=j.tagContent}let _=new Ps(l);B&&(_[":@"]=B),_.add(n.textNodeName,T),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,_,this.readonlyMatcher,F)}else{if(O){({tagName:l,tagExp:f}=TP(n.transformTagName,l,f,n));let T=new Ps(l);B&&(T[":@"]=B),this.addChild(r,T,this.readonlyMatcher,F),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(n.unpairedTagsSet.has(l)){let T=new Ps(l);B&&(T[":@"]=B),this.addChild(r,T,this.readonlyMatcher,F),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=p.closeIndex;continue}else{let T=new Ps(l);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),B&&(T[":@"]=B),this.addChild(r,T,this.readonlyMatcher,F),r=T}s="",a=g}}}elses+=t[a];returne.child};functionF
`}),s}getCanonicalizedResourceString(e){let r=CI(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let n=BI(e.url),i={};if(n){let o=[];for(let a in n)if(Object.prototype.hasOwnProperty.call(n,a)){let c=a.toLowerCase();i[c]=n[a],o.push(c)}o.sort();for(let a of o)s+=`
${a}:${decodeURIComponent(i[a])}`}return s}};var Rt=class extends _2{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new RO(e,r,this)}computeHMACSHA256(e){return(0,AMe.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var g1=Sa("storage-common");var Bi;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Bi||(Bi={}));var Tl={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Bi.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},ob0=new Fn("The operation was aborted."),wO=class extends Wa{retryOptions;constructor(e,r,s=Tl){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:Tl.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):Tl.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:Tl.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:Tl.maxRetryDelayInMs):Tl.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:Tl.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:Tl.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,s){let n=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||s%2===1;i||(n.url=yI(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=vl(n.url,wu.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(g1.info(`RetryPolicy:=====>Try=${s}${i?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(n),!this.shouldRetry(i,s,o))return o;r=r||!i&&o.status===404}catch(a){if(g1.error(`RetryPolicy:Caughterror,message:${a.message},code:${a.code}`),!this.shouldRetry(i,s,o,a))throw a}return await this.delay(i,s,e.abortSignal),this.attemptSendRequest(e,r,++s)}shouldRetry(e,r,s,n){if(r>=this.retryOptions.maxTries)return g1.info(`RetryPolicy:Attempt(s)${r}>=maxTries${this.retryOptions.maxTries},nofurthertry.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(n){for(let o of i)if(n.name.toUpperCase().includes(o)||n.message.toUpperCase().includes(o)||n.code&&n.code.toString().toUpperCase()===o)return g1.info(`RetryPolicy:Networkerror${o}found,willretry.`),!0}if(s||n){let o=s?s.status:n?n.statusCode:0;if(!e&&o===404)return g1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return g1.info(`RetryPolicy:Willretryforstatuscode${o}.`),!0}if(s&&s?.status>=400){let o=s.headers.get(_e.X_MS_CopySourceErrorCode);if(o!==void 0)switch(o){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return n?.code==="PARSE_ERROR"&&n?.message.startsWith('Error "Error: Unclosed root tag')?(g1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,s){let n=0;if(e)switch(this.retryOptions.retryPolicyType){case Bi.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Bi.FIXED:n=this.retryOptions.retryDelayInMs;break}else n=Math.random()*1e3;return g1.info(`RetryPolicy:Delayfor${n}ms`),DI(n,s,ob0)}};var NO=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new wO(e,r,this.retryOptions)}};var ab0="storageBrowserPolicy";function dMe(){return{name:ab0,async sendRequest(t,e){return q0||((t.method==="GET"||t.method==="HEAD")&&(t.url=vl(t.url,wu.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(_e.COOKIE),t.headers.delete(_e.CONTENT_LENGTH)),e(t)}}}var cb0="StorageCorrectContentLengthPolicy";function fMe(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(_e.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:cb0,async send
`}),a}function n(i){let o=CI(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=BI(i.url),u={};if(c){let p=[];for(let l in c)if(Object.prototype.hasOwnProperty.call(c,l)){let A=l.toLowerCase();u[A]=c[l],p.push(A)}p.sort();for(let l of p)a+=`
`),i=e.computeHMACSHA256(n);return{sasQueryParameters:new Lo(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:n}}function MM0(t,e){if(t=j2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=ec.parse(t.permissions.toString()).toString():n=tc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",V2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Wo(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(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}function mM0(t,e){if(t=j2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=ec.parse(t.permissions.toString()).toString():n=tc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",V2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Wo(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(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}function gM0(t,e){if(t=j2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=ec.parse(t.permissions.toString()).toString():n=tc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",V2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Wo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}function zM0(t,e){if(t=j2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=ec.parse(t.permissions.toString()).toString():n=tc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",V2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Wo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}function OM0(t,e){if(t=j2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=ec.parse(t.permissions.toString()).toString():n=tc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",V2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Wo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}function EM0(t,e){if(t=j2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=ec.parse(t.permissions.toString()).toString():n=tc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?I0(t.startsOn,!1):"",t.expiresOn?I0(t.expiresOn,!1):"",V2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?I0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?I0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Wo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}function V2(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}function j2(t){let e=t.version?t.version:wI;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}var GO=class{_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=dh()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Fo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Fo||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 ze.withSpan("BlobLeaseClient-acquireLease",r,async s=>Be(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!==Fo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Fo||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 ze.withSpan("BlobLeaseClient-changeLease",r,async s=>{let n=Be(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:s.tracingOptions}));return this._leaseId=e,n})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==Fo||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Fo||e.conditions?.tagConditions))throw new RangeError("The IfMatch,
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"}};Fh.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var K2=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
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"}};K2.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var e3=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var Sm0=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},PU=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),s=Date.now()-this.startTime,n=(e/(1024*1024)/(s/1e3)).toFixed(1);W(`Sent ${e} of ${this.contentLength} (${r}%), ${n} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function Rge(t,e,r){return Sm0(this,void 0,void 0,function*(){var s;let n=new _u(t),i=n.getBlockBlobClient(),o=new PU((s=r?.archiveSizeBytes)!==null&&s!==void 0?s:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),w(`BlobClient: ${n.name}:${n.accountName}:${n.containerName}`);let c=yield i.uploadFile(e,a);if(c._response.status>=400)throw new T5(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw E0(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}var Nge=x(require("buffer"),1),rc=x(require("fs"),1),Sge=x(require("stream"),1),Fge=x(require("util"),1);var x5=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};function W5(t){return t?t>=200&&t<300:!1}function Fm0(t){return t?t>=500:!0}function vm0(t){return t?[ft.BadGateway,ft.ServiceUnavailable,ft.GatewayTimeout].includes(t):!1}function Tm0(t){return x5(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function wge(t,e,r){return x5(this,arguments,void 0,function*(s,n,i,o=uq,a=pq,c=void 0){let u="",p=1;for(;p<=o;){let l,A,f=!1;try{l=yield n()}catch(M){c&&(l=c(M)),f=!0,u=M.message}if(l&&(A=i(l),!Fm0(A)))return l;if(A&&(f=vm0(A),u=`Cache service responded with ${A}`),w(`${s} - Attempt ${p} of ${o} failed with error: ${u}`),!f){w(`${s} - Error is not retryable`);break}yield Tm0(a),p++}throw Error(`${s} failed: ${u}`)})}function t3(t,e){return x5(this,arguments,void 0,function*(r,s,n=uq,i=pq){return yield wge(r,s,o=>o.statusCode,n,i,o=>{if(o instanceof Oa)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function vh(t,e){return x5(this,arguments,void 0,function*(r,s,n=uq,i=pq){return yield wge(r,s,o=>o.message.statusCode,n,i)})}var wi=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};function xm0(t,e){return wi(this,void 0,void 0,function*(){yield Fge.promisify(Sge.pipeline)(t.message,e)})}var L5=class{constructor(e){this.contentLength=e,this.segmentIndex=0,this.s
Othercacheswithsimilarkey:`);for(let a of i?.artifactCaches||[])w(`CacheKey:${a?.cacheKey},CacheVersion:${a?.cacheVersion},CacheScope:${a?.scope},CacheCreated:${a?.creationTime}`)}}})}function HU(t,e,r){return Hs(this,void 0,void 0,function*(){let s=new Uge.URL(t),n=Wge(r);s.hostname.endsWith(".blob.core.windows.net")?n.useAzureSdk?yield Tge(t,e,n):n.concurrentBlobDownloads?yield vge(t,e,n):yield _5(t,e):yield _5(t,e)})}function Hge(t,e,r){return Hs(this,void 0,void 0,function*(){let s=GU(),n=ih(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:n,cacheSize:r?.cacheSize};return yield t3("reserveCache",()=>Hs(this,void 0,void 0,function*(){return s.postJson(s3("caches"),i)}))})}function kge(t,e){return`bytes${t}-${e}/*`}function Gm0(t,e,r,s,n){return Hs(this,void 0,void 0,function*(){w(`Uploadingchunkofsize${n-s+1}bytesatoffset${s}withcontentrange:${kge(s,n)}`);let i={"Content-Type":"application/octet-stream","Content-Range":kge(s,n)},o=yield vh(`uploadChunk(start:${s},end:${n})`,()=>Hs(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!W5(o.message.statusCode))throw new Error(`Cacheservicerespondedwith${o.message.statusCode}duringuploadchunk.`)})}function Hm0(t,e,r,s){return Hs(this,void 0,void 0,function*(){let n=Ia(r),i=s3(`caches/${e.toString()}`),o=Th.openSync(r,"r"),a=kU(s),c=hQ("uploadConcurrency",a.uploadConcurrency),u=hQ("uploadChunkSize",a.uploadChunkSize),p=[...new Array(c).keys()];w("Awaiting all uploads");let l=0;try{yield Promise.all(p.map(()=>Hs(this,void 0,void 0,function*(){for(;l<n;){let A=Math.min(n-l,u),f=l,M=l+A-1;l+=u,yield Gm0(t,i,()=>Th.createReadStream(r,{fd:o,start:f,end:M,autoClose:!1}).on("error",g=>{throw new Error(`Cacheuploadfailedbecausefilereadfailedwith${g.message}`)}),f,M)}})))}finally{Th.closeSync(o)}})}function Xm0(t,e,r){return Hs(this,void 0,void 0,function*(){let s={size:r};return yield t3("commitCache",()=>Hs(this,void 0,void 0,function*(){return t.postJson(s3(`caches/${e.toString()}`),s)}))})}function XU(t,e,r,s){return Hs(this,void 0,void 0,function*(){if(kU(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Rge(r,e,s)}else{let i=GU();w("Upload cache"),yield Hm0(i,t,e,s),w("Commiting cache");let o=Ia(e);W(`CacheSize:~${Math.round(o/(1024*1024))}MB(${o}B)`);let a=yield Xm0(i,t,o);if(!W5(a.statusCode))throw new Error(`Cacheservicerespondedwith${a.statusCode}duringcommitcache.`);W("Cache saved successfully")}})}var _ze=x(Sze(),1),Zt=x(Kt(),1),_n=x(Kt(),1),sd=x(Kt(),1),nd=x(Kt(),1),id=x(Kt(),1);var QG=x(Kt(),1),PG=x(Kt(),1),xze=x(Kt(),1),Wze=x(Kt(),1),Lze=x(Kt(),1);var WG=x(Kt(),1),LG=x(Kt(),1),Fze=x(Kt(),1),vze=x(Kt(),1),Tze=x(Kt(),1),_G=class extends Tze.MessageType{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,vze.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Fze.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,n){let i=n??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,c]=e.tag();switch(a){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let u=s.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknownfield${a}(wiretype${c})for${this.typeName}`);let p=e.skip(c);u!==!1&&(u===!0?LG.UnknownFieldHandler.onRead:u)(this.typeName,i,a,c,p)}}return i}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,WG.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,WG.WireType.Varint).int64(e.permission);let n=s.writeUnknownFields;return n!==!1&&(n==!0?LG.UnknownFieldHandler.onWrite:n)(this.typeName,e,r),r}},DR=new _G;var kG=class extends Lze.MessageType{constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:()=>DR}])}create(e){let r={repositoryId:"0",scope:[]};
`));let s=yield sH(r,"create");yield nH(s,t)})}var Kh=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},Po=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Jh=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},wR=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function Uze(t){if(!t||t.length===0)throw new Po("Path Validation Error: At least one directory or file path is required")}function aH(t){if(t.length>512)throw new Po(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new Po(`KeyValidationError:${t}cannotcontaincommas.`)}function cH(){return r3()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function Gze(t,e,r,s){return Kh(this,arguments,void 0,function*(n,i,o,a,c=!1){let u=r3();return w(`Cacheserviceversion:${u}`),Uze(n),u==="v2"?yield aO0(n,i,o,a,c):yield oO0(n,i,o,a,c)})}function oO0(t,e,r,s){return Kh(this,arguments,void 0,function*(n,i,o,a,c=!1){o=o||[];let u=[i,...o];if(w("Resolved Keys:"),w(JSON.stringify(u)),u.length>10)throw new Po("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of u)aH(A);let p=yield rO(),l="";try{let A=yield Gge(u,n,{compressionMethod:p,enableCrossOsArchive:c});if(!A?.archiveLocation)return;if(a?.lookupOnly)return W("Lookup only - skipping download"),A.cacheKey;l=g3.join(yield eO(),ql(p)),w(`ArchivePath:${l}`),yield HU(A.archiveLocation,l,a),fi()&&(yield m3(l,p));let f=Ia(l);return W(`CacheSize:~${Math.round(f/(1024*1024))}MB(${f}B)`),yield iH(l,p),W("Cache restored successfully"),A.cacheKey}catch(A){let f=A;if(f.name===Po.name)throw A;f instanceof Oa&&typeof f.statusCode=="number"&&f.statusCode>=500?jb(`Failedtorestore:${A.message}`):E0(`Failedtorestore:${A.message}`)}finally{try{yield tO(l)}catch(A){w(`Failedtodeletearchive:${A}`)}}})}function aO0(t,e,r,s){return Kh(this,arguments,void 0,function*(n,i,o,a,c=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),o=o||[];let u=[i,...o];if(w("Resolved Keys:"),w(JSON.stringify(u)),u.length>10)throw new Po("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of u)aH(l);let p="";try{let l=rH(),A=yield rO(),f={key:i,restoreKeys:o,version:ih(n,A,c)},M=yield l.GetCacheEntryDownloadURL(f);if(!M.ok){w(`Cachenotfoundforversion${f.version}ofkeys:${u.join(", ")}`);return}if(f.key!==M.matchedKey?W(`Cachehitforrestore-key:${M.matchedKey}`):W(`Cachehitfor:${M.matchedKey}`),a?.lookupOnly)return W("Lookup only - skipping download"),M.matchedKey;p=g3.join(yield eO(),ql(A)),w(`Archivepath:${p}`),w(`Startingdownloadofarchiveto:${p}`),yield HU(M.signedDownloadUrl,p,a);let y=Ia(p);return W(`CacheSize:~${Math.round(y/(1024*1024))}MB(${y}B)`),fi()&&(yield m3(p,A)),yield iH(p,A),W("Cache restored successfully"),M.matchedKey}catch(l){let A=l;if(A.name===Po.name)throw l;A instanceof Oa&&typeof A.statusCode=="number"&&A.statusCode>=500?jb(`Failedtorestore:${l.message}`):E0(`Failedtorestore:${l.message}`)}finally{try{p&&(yield tO(p))}catch(l){w(`Failedtodeletearchive:${l}`)}}})}function uH(t,e,r){return Kh(this,arguments,void 0,function*(s,n,i,o=!1){let a=r3();return w(`Cacheserviceversion:${a}`),Uze(s),aH(n),a==="v2"?yield uO0(s,n,i,o):yield cO0(s,n,i,o)})}function cO0(t,e,r){return Kh(this,arguments,void 0,function*(s,n,i,o=!1){var a,c,u,p,l;let A=yield rO(),f=-1,M=yield bQ(s);if(w("Cache Paths:"),w(`${JSON.stringify(M)}`),M.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let g=yield eO(),y=g3.join(g,ql(A));w(`ArchivePath:${y}`);try{yie
Moreinfo:${c.url}`);let f=c.range&&c.range.length>0?c.range[0]?.start.line:void 0,M=!1;for(let g of o)if(g.remote||g.path.endsWith(u)&&g.content===p){a.push({title:l,message:A,file:g.path,startLine:f}),M=!0;break}M||w(`Buildx.convertWarningsToGitHubAnnotations:skippingwarningwithoutmatchingDockerfile${u}:${l}`)}return a}};var Hl=x(require("fs"),1),oX=x(require("path"),1);var aw=class t{buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new J0,this.iidFilename=`build-iidfile-${S0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${S0.generateRandomString()}.json`}getImageIDFilePath(){return oX.default.join(R0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(Hl.default.existsSync(e))return Hl.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return oX.default.join(R0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!Hl.default.existsSync(e))return;let r=Hl.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,s]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${s}`}static resolveSecretFile(e){let[r,s]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${s}`}static resolveSecretEnv(e){let[r,s]=t.parseSecretKvp(e);return`id=${r},env=${s}`}static resolveSecret(e,r){let[s,n]=t.parseSecretKvp(e,r?.redact),i=R0.tmpName({tmpdir:R0.tmpDir()});if(r?.asFile){if(!Hl.default.existsSync(n))throw new Error(`secretfile${n}notfound`);Hl.default.copyFileSync(n,i)}else Hl.default.writeFileSync(i,n);return[s,i]}static getProvenanceInput(e){let r=Dn(e);if(!r)return r;try{return Ype(e)?`builder-id=${m0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${m0.workflowRunURL(!0)}`;let r=A1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of r)if(s.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return e;return`${e},builder-id=${m0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let s="registry",n="",i="",o=A1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let a of o){let c=a.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());c[0]==="type"?s=c[1]:c[0]==="repository"?n=c[1]:c[0]==="ghtoken"&&(i=c[1])}return s==="gha"&&(n||(e=`${e},repository=${m0.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExporterType("tar",e)}static hasDockerExporter(e,r){return r||t.hasExporterType("docker",e)}static hasExporterType(e,r){let s=A1(r.join(`
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let n of s){if(n.length==1&&!n[0].startsWith("type="))return e=="local";for(let[i,o]of n.map(a=>a.split("=").map(c=>c.trim())))if(i=="type"&&o==e)return!0}return!1}static hasAttestationType(e,r){let s=A1(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let n of s)for(let[i,o]of n.map(a=>a.split("=").map(c=>c.trim())))if(i=="type"&&o==e)return!0;return!1}static resolveAttestationAttrs(e){let r=A1(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let n of r)for(let i of n)try{let o=S0.parseBool(i);s.push(`disabled=${!o}`)}catch{s.push(i)}return s.join(",")}static hasGitAuthTokenSecret(e,r){for(let s of e){if(r&&s.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(s.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let s=e.indexOf("="),n=e.substring(0,s),i=e.substring(s+1);if(n.length==0||i.length==0)throw new Error(`${e}isnotavalidsecret`);return r&&Ea(i),[n,i]}};var aX=x(require("fs"),1),aye=x(require("path"),1);var cw=class t{buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new J0,this.metadataFilename=`bake-metadata-${S0.generateRandomString()}.json`}getMetadataFilePath(){return aye.default.join(R0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!aX.default.existsSync(e))return;let r=aX.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let s in e)"buildx.build.ref"in e[s]&&r.push(e[s]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});let s=["bake"],n,i=[],o=[...e.files||[],e.source];if(o){for(let c of o.map(u=>u?u.trim():""))if(c.length!=0){if(!S0.isValidRef(c)){i.push(c);continue}if(n)throw new Error("Only one remote bake definition can be defined");n=c}}n&&s.push(n);for(let c of i)s.push("--file",c);if(e.overrides)for(let c of e.overrides)s.push("--set",c);if(e.allow)for(let c of e.allow)s.push("--allow",c);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 a=await this.buildx.getCommand([...s,"--print",...e.targets||[]]);return await Te.getExecOutput(a.command,a.args,r).then(c=>{if(c.stderr.length>0&&c.exitCode!=0)throw new Error(`cannotparsebakedefinitions:${c.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(c.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let s in r.target){let n=r.target[s];n.attest&&Array.isArray(n.attest)&&(n.attest=n.attest.map(i=>t.parseAttestEntry(i))),n["cache-from"]&&Array.isArray(n["cache-from"])&&(n["cache-from"]=n["cache-from"].map(i=>t.parseCacheEntry(i))),n["cache-to"]&&Array.isArray(n["cache-to"])&&(n["cache-to"]=n["cache-to"].map(i=>t.parseCacheEntry(i))),n.output&&Array.isArray(n.output)&&(n.output=n.output.map(i=>t.parseExportEntry(i))),n.secret&&Array.isArray(n.secret)&&(n.secret=n.secret.map(i=>t.parseSecretEntry(i))),n.ssh&&Array.isArray(n.ssh)&&(n.ssh=n.ssh.map(i=>t.parseSSHEntry(i)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},s=A1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let[i,o]=n.toString().split(/(?<=^[^=]+?)=/).map(a=>a.trim());switch(i){case"type":r.type=o;break;case"disabled":r.disabled=S0.parseBool(o);break;default:r[i]=o}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=A1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(s.length===1&&!s[0].includes("="))return r.type="registry",r.ref=s[0],r;for(let n of s){let[i,o]=n.toString().split(/(?<=^[^=]+?)=/).map(a=>a.trim());i==="type"?r.type=o:r[i]=o}ret
${u}`),await new Promise(p=>setTimeout(p,Math.pow(2,o)*100));else throw i}else throw new Error(`Cosignverifycommandfailedwith:${a.stderr.trim().split(/\r?\n/).filter(u=>u.length>0).pop()??"unknown error"}`)}throw i}async signProvenanceBlobs(e){let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let s=this.signingEndpoints(e.noTransparencyLog);W(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let n=t.getProvenanceBlobs(e);for(let i of Object.keys(n))await ar(`Signing${i}`,async()=>{let o=n[i],a=qA.default.join(qA.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),c=t.getProvenanceSubjects(o);if(c.length===0){E0(`Nosubjectsfoundinprovenance${i},skipsigning.`);return}let u=await t.signPayload({data:o,type:fFe},s),p=t.parseBundle(u);W("Provenance blob signed for:");for(let l of c){let[A,f]=Object.entries(l.digest)[0]||[];W(`-${l.name}(${A}:${f})`)}p.tlogID&&W(`AttestationsignatureuploadedtoRekortransparencylog:${lf}?logIndex=${p.tlogID}`),W(`WritingSigstorebundleto:${a}`),Uc.default.writeFileSync(a,JSON.stringify(p.payload,null,2),{encoding:"utf-8"}),r[i]={...p,bundlePath:a,subjects:c}})}catch(s){throw new Error(`SigningBuildKitprovenanceblobsfailed:${s.message}`)}return r}async verifySignedArtifacts(e,r){let s={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[n,i]of Object.entries(e)){let o=qA.default.dirname(n);await ar(`Verifyingsignaturebundle${i.bundlePath}`,async()=>{for(let a of i.subjects){let c=qA.default.join(o,a.name);W(`Verifyingsignedartifact${c}`);let u=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp];(r.noTransparencyLog||!i.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let p=await Te.getExecOutput("cosign",[...u,"--bundle",i.bundlePath,c],{ignoreReturnCode:!0});if(p.stderr.length>0&&p.exitCode!=0)throw new Error(p.stderr);s[c]={bundlePath:i.bundlePath,cosignArgs:u}}})}return s}async verifyArtifact(e,r,s){W("Verifying keyless verification bundle signature");let n=JSON.parse(Uc.default.readFileSync(r,"utf-8")),i=(0,Uy.bundleFromJSON)(n);W("Fetching Sigstore TUF trusted root metadata");let o=await gFe.getTrustedRoot(),a=(0,Wm.toTrustMaterial)(o);try{W("Verifying artifact signature");let c=(0,Wm.toSignedEntity)(i,Uc.default.readFileSync(e)),u=t.parseCertificate(i),p=i.verificationMaterial.tlogEntries,l=p.length>0?p[0].logIndex:void 0;if(s?.subjectAlternativeName&&s?.subjectAlternativeName instanceof RegExp){let M=u.subjectAltName?.replace(/^uri:/i,"");if(M){if(!M.match(s.subjectAlternativeName))throw new Error(`SigningcertificatesubjectAlternativeName"${M}"doesnotmatchexpectedpattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let f=new Wm.Verifier(a).verify(c,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return w(`Sigstore.verifyArtifactsigner:${JSON.stringify(f)}`),{payload:n,certificate:u.toString(),tlogID:l}}catch(c){throw new Error(`Failedtoverifyartifactsignature:${c}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),W(`Uploadtotransparencylog:${e?"disabled":"enabled"}`),{fulcioURL:bFe,rekorURL:e?void 0:hFe,tsaServerURL:MFe}}static noTransparencyLog(e){return e??m0.context.payload.repository?.private}static getProvenanceBlobs(e){let r=qA.default.join(e.localExportDir,"provenance.json");if(Uc.default.existsSync(r))return{[r]:Uc.default.readFileSync(r)};let s=Uc.default.readdirSync(e.localExportDir,{withFileTypes:!0}),n=s.filter(i=>i.isDirectory());if(n.length>0&&n.length===s.length&&n.every(i=>Uc.default.existsSync(qA.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let o of n){let a=qA.default.join(e.localExportDir,o.name,"
`,bakeTarget:Dn("bake-target")||"docker-metadata-action",githubToken:Dn("github-token")}}async function BFe(t,e){switch(t){case"workflow":return await R70(e);case"git":return await w70();default:throw new Error(`Invalidcontextsource:${t}`)}}async function R70(t){let e=m0.context;return/pull_request_target/.test(e.eventName)&&(e.ref=`refs/pull/${e.payload.number}/merge`),/true/i.test(process.env.DOCKER_METADATA_PR_HEAD_SHA||"")&&(/pull_request/.test(e.eventName)||/pull_request_target/.test(e.eventName))&&e.payload?.pull_request?.head?.sha!=null&&(e.sha=e.payload.pull_request.head.sha),{commitDate:await N70(e.sha,t),...e}}async function w70(){let t=await Gu.context();return{commitDate:await Gu.commitDate(t.sha),...t}}async function N70(t,e){let r=m0.context.payload;if(r.commits){let s=r.commits.find(n=>n.id===t)?.timestamp;if(s)return new Date(s)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let s=await e.github.octokit.rest.repos.getCommit({owner:m0.context.repo.owner,repo:m0.context.repo.repo,ref:t});if(s.data.commit.committer?.date)return new Date(s.data.commit.committer.date);throw new Error("Committer date not found")}catch(s){return w(`FailedtogetcommitdatefromGitHubAPI:${s.message}`),new Date}}var jp=x(bTe(),1),aGe=x(require("fs"),1),cGe=x(require("path"),1),e4=x(OTe(),1),ii=x(rGe(),1),hg=x(Wi(),1);function nGe(t){let e=[];if(t.length==1){let r=!1,s=A1(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let i=n.toString().split("=").map(o=>o.trim());if(i.length==1)e.push({name:i[0],enable:!0});else{r=!0;break}}if(!r)return sGe(e)}e=[];for(let r of t){let s={name:"",enable:!0},n=A1(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of n){let o=i.toString().split("=").map(a=>a.trim());if(o.length==1)s.name=o[0];else{let a=o[0].toLowerCase(),c=o[1];switch(a){case"name":{s.name=c;break}case"enable":{if(!["true","false"].includes(c))throw new Error(`Invalidenableattributevalue:${r}`);s.enable=/true/i.test(c);break}default:throw new Error(`Unknownimageattribute:${r}`)}}}if(s.name.length==0)throw new Error(`Imagenameattributeempty:${r}`);e.push(s)}return sGe(e)}function sGe(t){g2("Processing images input");for(let e of t)W(`name=${e.name},enable=${e.enable}`);return z2(),t}var z1e=(c=>(c.Schedule="schedule",c.Semver="semver",c.Pep440="pep440",c.Match="match",c.Edge="edge",c.Ref="ref",c.Raw="raw",c.Sha="sha",c))(z1e||{}),_T=(s=>(s.Branch="branch",s.Tag="tag",s.PR="pr",s))(_T||{}),QT=(r=>(r.Short="short",r.Long="long",r))(QT||{}),g1e=class{type;attrs;constructor(){this.attrs={}}toString(){let e=[`type=${this.type}`];for(let r in this.attrs)e.push(`${r}=${this.attrs[r]}`);return e.join(",")}},frt={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function iGe(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let s of t)e.push(brt(s));let r=e.sort((s,n)=>Number(s.attrs.priority)<Number(n.attrs.priority)?1:Number(s.attrs.priority)>Number(n.attrs.priority)?-1:0);g2("Processing tags input");for(let s of r)W(s.toString());return z2(),r}function brt(t){let e=A1(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new g1e;for(let s of e){let n=s.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim());if(n.length==1)r.attrs.value=n[0];else{let i=n[0].toLowerCase(),o=n[1];switch(i){case"type":{if(!Object.values(z1e).includes(o))throw new Error(`Unknowntagtypeattribute:${o}`);r.type=o;break}default:{r.attrs[i]=o;break}}}}switch(r.type==null&&(r.type="raw"),r.type){case"schedule":{Object.prototype.hasOwnProperty.call(r.attrs,"pattern")||(r.attrs.pattern="nightly");break}case"semver":case"pep440":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missingpatternattributefor${t}`);Object.prototype.hasOwnProperty.call(r.attrs,"value")||(r.attrs.value=""),Object.prototype.hasOwnProperty.call(r.attrs,"match")||(r.attrs.match="");break}case"match":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missing