varSZe=Object.create;varh_=Object.defineProperty;varNZe=Object.getOwnPropertyDescriptor;varvZe=Object.getOwnPropertyNames;varFZe=Object.getPrototypeOf,TZe=Object.prototype.hasOwnProperty;varxZe=(t,e)=>()=>(t&&(e=t(t=0)),e);varf=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),gie=(t,e)=>{for(varrine)h_(t,r,{get:e[r],enumerable:!0})},WZe=(t,e,r,s)=>{if(e&&typeofe=="object"||typeofe=="function")for(letnofvZe(e))!TZe.call(t,n)&&n!==r&&h_(t,n,{get:()=>e[n],enumerable:!(s=NZe(e,n))||s.enumerable});returnt};varF=(t,e,r)=>(r=t!=null?SZe(FZe(t)):{},WZe(e||!t||!t.__esModule?h_(r,"default",{value:t,enumerable:!0}):r,t));varDie=f(xh=>{"use strict";varL2t=require("net"),UZe=require("tls"),E_=require("http"),yie=require("https"),GZe=require("events"),P2t=require("assert"),HZe=require("util");xh.httpOverHttp=XZe;xh.httpsOverHttp=VZe;xh.httpOverHttps=jZe;xh.httpsOverHttps=$Ze;functionXZe(t){vare=newIu(t);returne.request=E_.request,e}functionVZe(t){vare=newIu(t);returne.request=E_.request,e.createSocket=Cie,e.defaultPort=443,e}functionjZe(t){vare=newIu(t);returne.request=yie.request,e}function$Ze(t){vare=newIu(t);returne.request=yie.request,e.createSocket=Cie,e.defaultPort=443,e}functionIu(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||E_.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(s,n,i,o){for(vara=Bie(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)})}HZe.inherits(Iu,GZe.EventEmitter);Iu.prototype.addRequest=function(e,r,s,n){vari=this,o=y_({request:e},i.options,Bie(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)}})};Iu.prototype.createSocket=function(e,r){vars=this,n={};s.sockets.push(n);vari=y_({},s.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+newBuffer(i.proxyAuth).toString("base64")),Dl("making CONNECT request");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,h){process.nextTick(function(){u(l,A,h)})}functionu(l,A,h){if(o.removeAllListeners(),A.removeAllListeners(),l.statusCode!==200){Dl("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(h.length>0){Dl("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}returnDl("tunneling connection has established"),s.sockets[s.sockets.indexOf(n)]=A,r(A)}functionp(l){o.removeAllListeners(),Dl(`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(Fae(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(Wz.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:d10(t)}if((typeof n=="string"||Wz.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(!_ae(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 D10(t,e=!1){return t instanceof ReadableStream&&(qL(!Wz.isDisturbed(t),"The body has already been consumed."),qL(!t.locked,"The stream is locked.")),Qae(t,e)}function q10(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}function I10(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function R10(t){return{blob(){return $h(this,r=>{let s=xae(this);return s===null?s="":s&&(s=y10(s)),new z10([r],{type:s})},t)},arrayBuffer(){return $h(this,r=>new Uint8Array(r).buffer,t)},text(){return $h(this,Wae,t)},json(){return $h(this,S10,t)},formData(){return $h(this,r=>{let s=xae(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let n=C10(r,s);if(n==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new Tae;return i[Yh]=n,i}case"application/x-www-form-urlencoded":{let n=new URLSearchParams(r.toString()),i=new Tae;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 $h(this,r=>new Uint8Array(r),t)}}}function w10(t){Object.assign(t.prototype,R10(t))}async function $h(t,e,r){if(g10.brandCheck(t,r),kae(t))throw new TypeError("Body is unusable: Body has already been read");I10(t[Yh]);let s=b10(),n=o=>s.reject(o),i=o=>{try{s.resolve(e(o))}catch(a){n(a)}};return t[Yh].body==null?(i(Buffer.allocUnsafe(0)),s.promise):(await M10(t[Yh].body,i,n),s.promise)}function kae(t){let e=t[Yh].body;return e!=null&&(e.stream.locked||Wz.isDisturbed(e.stream))}function S10(t){return JSON.parse(Wae(t))}function xae(t){let e=t[Yh].headersList,r=m10(e);return r==="failure"?null:r}Uae.exports={extractBody:Qae,safelyExtractBody:D10,cloneBody:q10,mixinBody:w10,streamRegistry:Pae,hasFinalizationRegistry:Lae,bodyUnusable:kae}});var ece=f((bft,Zae)=>{"use strict";var Te=require("node:assert"),Xe=u0(),{channels:Gae}=_h(),RL=pL(),{RequestContentLengthMismatchError:Sd,ResponseContentLengthMismatchError:N10,RequestAbortedError:Yae,HeadersTimeoutError:v10,HeadersOverflowError:F10,SocketError:bD,InformationalError:Kh,BodyTimeoutError:T10,HTTPParserError:x10,ResponseExceededMaxSizeError:W10}=B0(),{kUrl:Jae,kReset:Vs,kClient:vL,kParser:Nt,kBlocking:Pz,kRunning:Br,kPending:_10,kSize:Hae,kWriting:Rl,kQueue:Fo,kNoRef:_z,kKeepAliveDefaultTimeout:L10,kHostHeader:P10,kPendingIdx:Q10,kRunningIdx:Oi,kError:Ei,kPipelining:fD,kSocket:Zh,kKeepAliveTimeoutValue:MD,kMaxHeadersSize:wL,kKeepAliveMaxTimeout:k10,kKeepAliveTimeoutThreshold:U10,kHeadersTimeout:G10,kBodyTimeout:H10,kStrictContentLength:FL,kMaxRequests:Xae,kCounter:X10,kMaxResponseSize:V10,kOnError:j10,kResume:Il,kHTTPContext:Kae}=bt(),Ia=Poe(),$10=Buffer.alloc(0),lD=Buffer[Symbol.species],AD=Xe.addListener,Y10=Xe.removeAllListeners,SL;async function J10(){let t=process.env.JEST_WORKER_ID?dL():void 0,e;try{e=await WebAssembly.compile(Uoe())}catch{e=await WebAssembly.compile(t||dL())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,s,n)=>0,wasm_on_status:(r,s,n)=>{Te(B1.ptr===r);let i=s-wa+Ra.byteOffset;return B1.onStatus(new lD(Ra.buffer,i,n))||0},wasm_on_message_begin:r=>(Te(B1.ptr===r),B1.onMessageBegin()||0),wasm_on_he
`}return Gae.sendHeaders.hasSubscribers&&Gae.sendHeaders.publish({request:e,headers:g,socket:h}),!c||A===0?jae(M,null,t,e,h,p,g,l):Xe.isBuffer(c)?jae(M,c,t,e,h,p,g,l):Xe.isBlobLike(c)?typeof c.stream=="function"?$ae(M,c.stream(),t,e,h,p,g,l):nr0(M,c,t,e,h,p,g,l):Xe.isStream(c)?sr0(M,c,t,e,h,p,g,l):Xe.isIterable(c)?$ae(M,c,t,e,h,p,g,l):Te(!1),!0}function sr0(t,e,r,s,n,i,o,a){Te(i!==0||r[Br]===0,"stream body cannot be pipelined");let c=!1,u=new mD({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){Xe.destroy(this,g)}},l=function(){c||e.resume&&e.resume()},A=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!c){let M=new Yae;queueMicrotask(()=>h(M))}},h=function(M){if(!c){if(c=!0,Te(n.destroyed||n[Rl]&&r[Br]<=1),n.off("drain",l).off("error",h),e.removeListener("data",p).removeListener("end",h).removeListener("close",A),!M)try{u.end()}catch(g){M=g}u.destroy(M),M&&(M.code!=="UND_ERR_INFO"||M.message!=="reset")?Xe.destroy(e,M):Xe.destroy(e)}};e.on("data",p).on("end",h).on("error",h).on("close",A),e.resume&&e.resume(),n.on("drain",l).on("error",h),e.errorEmitted??e.errored?setImmediate(()=>h(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>h(null)),(e.closeEmitted??e.closed)&&setImmediate(A)}function jae(t,e,r,s,n,i,o,a){try{e?Xe.isBuffer(e)&&(Te(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${o}content-length:${i}\r
`,"latin1"):(Te(i===null,"no body must not have content length"),n.write(`${o}\r
`,"latin1")),s.onRequestSent(),r[Il]()}catch(c){t(c)}}async function nr0(t,e,r,s,n,i,o,a){Te(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new Sd;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[Vs]=!0),r[Il]()}catch(c){t(c)}}async function $ae(t,e,r,s,n,i,o,a){Te(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,h)=>{Te(c===null),n[Ei]?h(n[Ei]):c=A});n.on("close",u).on("drain",u);let l=new mD({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let A of e){if(n[Ei])throw n[Ei];l.write(A)||await p()}l.end()}catch(A){l.destroy(A)}finally{n.off("close",u).off("drain",u)}}var mD=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[Rl]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[Ei])throw r[Ei];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(n!==null&&o+u>n){if(i[FL])throw new Sd;process.emitWarning(new Sd)}r.cork(),o===0&&(!a&&s.reset!==!1&&(r[Vs]=!0),n===null?r.write(`${c}transfer-encoding:chunked\r
`,"latin1"),r!==null&&n!==r){if(s[FL])throw new Sd;process.emitWarning(new Sd)}e[Nt].timeout&&e[Nt].timeoutType===eb&&e[Nt].timeout.refresh&&e[Nt].timeout.refresh(),s[Il]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[Rl]=!1,e&&(Te(s[Br]<=1,"pipeline should only contain this request"),n(e))}};Zae.exports=Z10});var cce=f((Mft,ace)=>{"use strict";var yi=require("node:assert"),{pipeline:ir0}=require("node:stream"),d0=u0(),{RequestContentLengthMismatchError:_L,RequestAbortedError:tce,SocketError:Qz,InformationalError:LL}=B0(),{kUrl:gD,kReset:OD,kClient:tb,kRunning:ED,kPending:or0,kQueue:wl,kPendingIdx:PL,kRunningIdx:To,kError:Wo,kSocket:T1,kStrictContentLength:ar0,kOnError:QL,kMaxConcurrentStreams:oce,kHTTP2Session:xo,kResume:Sl,kSize:cr0,kHTTPContext:ur0}=bt(),Fu=Symbol("open streams"),rce,sce=!1,zD;try{zD=require("node:http2")}catch{zD={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:pr0,HTTP2_HEADER_METHOD:lr0,HTTP2_HEADER_PATH:Ar0,HTTP2_HEADER_SCHEME:dr0,HTTP2_HEADER_CONTENT_LENGTH:fr0,HTTP2_HEADER_EXPECT:hr0,HTTP2_HEADER_STATUS:br0}}=zD;function Mr0(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 mr0(t,e){t[T1]=e,sce||(sce=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=zD.connect(t[gD],{createConnection:()=>e,peerMaxConcurrentStreams:t[oce]});r[Fu]=0,r[tb]=t,r[T1]=e,d0.addListener(r,"error",zr0),d0.addListener(r,"frameError",Or0),d0.addListener(r,"end",Er0),d0.addListener(r,"goaway",yr0),d0.addListener(r,"close",function(){let{[tb]:n}=this,{[T1]:i}=n,o=this[T1][Wo]||this[Wo]||new Qz("closed",d0.getSocketInfo(i));if(n[xo]=null,n.destroyed){yi(n[or0]===0);let a=n[wl].splice(n[To]);for(let c=0;c<a.length;c++){let u=a[c];d0.errorRequest(n,u,o)}}}),r.unref(),t[xo]=r,e[xo]=r,d0.addListener(e,"error",function(n){yi(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Wo]=n,this[tb][QL](n)}),d0.addListener(e,"end",function(){d0.destroy(this,new Qz("other side closed",d0.getSocketInfo(this)))}),d0.addListener(e,"close",function(){let n=this[Wo]||new Qz("closed",d0.getSocketInfo(this));t[T1]=null,this[xo]!=null&&this[xo].destroy(n),t[PL]=t[To],yi(t[ED]===0),t.emit("disconnect",t[gD],[t],n),t[Sl]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...n){return Br0(t,...n)},resume(){gr0(t)},destroy(n,i){s?queueMicrotask(i):e.destroy(n).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function gr0(t){let e=t[T1];e?.destroyed===!1&&(t[cr0]===0&&t[oce]===0?(e.unref(),t[xo].unref()):(e.ref(),t[xo].ref()))}function zr0(t){yi(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[T1][Wo]=t,this[tb][QL](t)}function Or0(t,e,r){if(r===0){let s=new LL(`HTTP/2:"frameError"received-type${t},code${e}`);this[T1][Wo]=s,this[tb][QL](s)}}function Er0(){let t=new Qz("other side closed",d0.getSocketInfo(this[T1]));this.destroy(t),d0.destroy(this[T1],t)}function yr0(t){let e=this[Wo]||new Qz(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,d0.getSocketInfo(this)),r=this[tb];if(r[T1]=null,r[ur0]=null,this[xo]!=null&&(this[xo].destroy(e),this[xo]=null),d0.destroy(this[T1],e),r[To]<r[wl].length){let s=r[wl][r[To]];r[wl][r[To]++]=null,d0.errorRequest(r,s,e),r[PL]=r[To]}yi(r[ED]===0),r.emit("disconnect",r[gD],[r],e),r[Sl]()}function Cr0(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function Br0(t,e){let r=t[xo],{method:s,path:n,host:i,upgrade:o,expectContinue:a,signal:c,headers:u}=e,{body:p}=e;if(o)return d0.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let R=0;R<u.length;R+=2){let N=u[R+0],T=u[R+1];if(Array.isArray(T))for(let W=0;W<T.length;W++)l[N]?l[N]+=`,${T[W]}`:l[N]=T[W];else l[N]=T}let A,{hostname:h,port:M}=t[gD];l[pr0]=i||`${h}${M?`:${M}`:""}`,l[lr0]=s;let g=R=>{e.aborted||e.completed||(R=R||new tce,d0.errorRequest(t,e,R),A!=null&&d0.destroy(A,R),d0.destroy(p,R),t[wl][t[To]++]=null,t[Sl]())};try{e.onConnect(g)}catch(R){d0.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),eM("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(eM("Creating `tls.Socket`: %o",this.connectOpts),i=Lm0.connect(this.connectOpts)):(eM("Creating `net.Socket`: %o",this.connectOpts),i=_m0.connect(this.connectOpts)),await(0,Qm0.once)(i,"connect"),i}};eR.protocols=["http","https"];Li.HttpProxyAgent=eR;function Um0(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var Rge=f(fR=>{"use strict";Object.defineProperty(fR,"__esModule",{value:!0});fR.state=void 0;fR.state={instrumenterImplementation:void 0}});var Xge=f(gR=>{"use strict";Object.defineProperty(gR,"__esModule",{value:!0});gR.state=void 0;gR.state={operationRequestMap:new WeakMap}});var C3e=f(mM=>{"use strict";Object.defineProperty(mM,"__esModule",{value:!0});var uy0=require("os"),py0=require("util");function ly0(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var Ay0=ly0(py0);function dy0(t,...e){process.stderr.write(`${Ay0.default.format(t,...e)}${uy0.EOL}`)}var f3e=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,b3e,mH=[],gH=[],_5=[];f3e&&zH(f3e);var M3e=Object.assign(t=>m3e(t),{enable:zH,enabled:OH,disable:fy0,log:dy0});function zH(t){b3e=t,mH=[],gH=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?gH.push(new RegExp(`^${s.substr(1)}$`)):mH.push(new RegExp(`^${s}$`));for(let s of _5)s.enabled=OH(s.namespace)}function OH(t){if(t.endsWith("*"))return!0;for(let e of gH)if(e.test(t))return!1;for(let e of mH)if(e.test(t))return!0;return!1}function fy0(){let t=b3e||"";return zH(""),t}function m3e(t){let e=Object.assign(r,{enabled:OH(t),destroy:hy0,log:M3e.log,namespace:t,extend:by0});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return _5.push(e),e}function hy0(){let t=_5.indexOf(this);return t>=0?(_5.splice(t,1),!0):!1}function by0(t){let e=m3e(`${this.namespace}:${t}`);return e.log=this.log,e}var j3=M3e,g3e=new Set,x5=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,L5,P5=j3("azure");P5.log=(...t)=>{j3.log(...t)};var EH=["verbose","info","warning","error"];x5&&(y3e(x5)?z3e(x5):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${x5}';loggingisnotenabled.Acceptablevalues:${EH.join(", ")}.`));function z3e(t){if(t&&!y3e(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${EH.join(",")}`);L5=t;let e=[];for(let r of g3e)E3e(r)&&e.push(r.namespace);j3.enable(e.join(","))}function My0(){return L5}var h3e={verbose:400,info:300,warning:200,error:100};function my0(t){let e=P5.extend(t);return O3e(P5,e),{error:W5(e,"error"),warning:W5(e,"warning"),info:W5(e,"info"),verbose:W5(e,"verbose")}}function O3e(t,e){e.log=(...r)=>{t.log(...r)}}function W5(t,e){let r=Object.assign(t.extend(e),{level:e});if(O3e(t,r),E3e(r)){let s=j3.disable();j3.enable(s+","+r.namespace)}return g3e.add(r),r}function E3e(t){return!!(L5&&h3e[t.level]<=h3e[L5])}function y3e(t){return EH.includes(t)}mM.AzureLogger=P5;mM.createClientLogger=my0;mM.getLogLevel=My0;mM.setLogLevel=z3e});var BH=f(Y3=>{"use strict";Object.defineProperty(Y3,"__esModule",{value:!0});var gM=new WeakMap,Q5=new WeakMap,$3=class t{constructor(){this.onabort=null,gM.set(this,[]),Q5.set(this,!1)}get aborted(){if(!Q5.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return Q5.get(this)}static get none(){return new t}addEventListener(e,r){if(!gM.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");gM.get(this).push(r)}removeEventListener(e,r){if(!gM.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=gM.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 B3e(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=gM.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),Q5.set(t,!0)}var yH=class extends Error{constructor(e){super(e),t
Seehttps://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function _w0(){Object.keys(FS).forEach(function(t){delete FS[t]})}});var xS=f(Bc=>{"use strict";Bc.__esModule=!0;Bc.HandlebarsEnvironment=mj;function oDe(t){return t&&t.__esModule?t:{default:t}}var X2=Es(),Lw0=si(),bj=oDe(Lw0),Pw0=Aj(),Qw0=rDe(),kw0=fj(),TS=oDe(kw0),Uw0=hj(),Gw0="4.7.9";Bc.VERSION=Gw0;var Hw0=8;Bc.COMPILER_REVISION=Hw0;var Xw0=7;Bc.LAST_COMPATIBLE_COMPILER_REVISION=Xw0;var Vw0={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"};Bc.REVISION_CHANGES=Vw0;var Mj="[object Object]";function mj(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Pw0.registerDefaultHelpers(this),Qw0.registerDefaultDecorators(this)}mj.prototype={constructor:mj,logger:TS.default,log:TS.default.log,registerHelper:function(e,r){if(X2.toString.call(e)===Mj){if(r)throw new bj.default("Arg not supported with multiple helpers");X2.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(X2.toString.call(e)===Mj)X2.extend(this.partials,e);else{if(typeof r>"u")throw new bj.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(X2.toString.call(e)===Mj){if(r)throw new bj.default("Arg not supported with multiple decorators");X2.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){Uw0.resetLoggedProperties()}};var jw0=TS.default.log;Bc.log=jw0;Bc.createFrame=X2.createFrame;Bc.logger=TS.default});var cDe=f((WS,aDe)=>{"use strict";WS.__esModule=!0;function gj(t){this.string=t}gj.prototype.toString=gj.prototype.toHTML=function(){return""+this.string};WS.default=gj;aDe.exports=WS.default});var uDe=f(zj=>{"use strict";zj.__esModule=!0;zj.wrapHelper=$w0;function $w0(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 hDe=f(OA=>{"use strict";OA.__esModule=!0;OA.checkRevision=tS0;OA.template=rS0;OA.wrapProgram=_S;OA.resolvePartial=sS0;OA.invokePartial=nS0;OA.noop=dDe;function Yw0(t){return t&&t.__esModule?t:{default:t}}function Jw0(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 Kw0=Es(),$M=Jw0(Kw0),Zw0=si(),Ap=Yw0(Zw0),dp=xS(),pDe=Aj(),eS0=uDe(),lDe=hj();function tS0(t){var e=t&&t[0]||1,r=dp.COMPILER_REVISION;if(!(e>=dp.LAST_COMPATIBLE_COMPILER_REVISION&&e<=dp.COMPILER_REVISION))if(e<dp.LAST_COMPATIBLE_COMPILER_REVISION){var s=dp.REVISION_CHANGES[r],n=dp.REVISION_CHANGES[e];throw new Ap.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 Ap.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 rS0(t,e){if(!e)throw new Ap.default("No environment passed to template");if(!t||!t.main)throw new Ap.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=$M.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(`
`+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.
${ov(u)}${u}`)}catch(u){if(u.code==="ENOENT")return;throw u}return av(t,c)}Ai.exports.find=gP0;async function gP0(t,e){let r=Vy(t,e);try{return(await iv(r)).reduce((n,i)=>i&&i.key===e?av(t,i):n,null)}catch(s){if(s.code==="ENOENT")return null;throw s}}Ai.exports.delete=zP0;function zP0(t,e,r={}){if(!r.removeFully)return z6e(t,e,null,r);let s=Vy(t,e);return g6e(s,{recursive:!0,force:!0})}Ai.exports.lsStream=O6e;function O6e(t){let e=ZK(t),r=new lP0({objectMode:!0});return Promise.resolve().then(async()=>{let{default:s}=await Promise.resolve().then(()=>(nv(),sv)),n=await JK(e);return await s(n,async i=>{let o=Hc.join(e,i),a=await JK(o);await s(a,async c=>{let u=Hc.join(o,c),p=await JK(u);await s(p,async l=>{let A=Hc.join(u,l);try{let M=(await iv(A)).reduce((g,y)=>(g.set(y.key,y),g),new Map);for(let g of M.values()){let y=av(t,g);y&&r.write(y)}}catch(h){if(h.code==="ENOENT")return;throw h}},{concurrency:YK})},{concurrency:YK})},{concurrency:YK}),r.end(),r}).catch(s=>r.emit("error",s)),r}Ai.exports.ls=OP0;async function OP0(t){return(await O6e(t).collect()).reduce((r,s)=>(r[s.key]=s,r),{})}Ai.exports.bucketEntries=iv;async function iv(t,e){let r=await cP0(t,"utf8");return EP0(r,e)}function EP0(t){let e=[];return t.split(`
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||ov(s[1])!==s[0])return;let n;try{n=JSON.parse(s[1])}catch{}n&&e.push(n)}),e}Ai.exports.bucketDir=ZK;function ZK(t){return Hc.join(t,`index-v${bP0}`)}Ai.exports.bucketPath=Vy;function Vy(t,e){let r=E6e(e);return Hc.join.apply(Hc,[ZK(t)].concat(hP0(r)))}Ai.exports.hashKey=E6e;function E6e(t){return y6e(t,"sha256")}Ai.exports.hashEntry=ov;function ov(t){return y6e(t,"sha1")}function y6e(t,e){return oP0.createHash(e).update(t).digest("hex")}function av(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?fP0(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}function JK(t){return uP0(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}});var Pm=f(uv=>{"use strict";Object.defineProperty(uv,"__esModule",{value:!0});uv.LRUCache=void 0;var yP0=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,B6e=new Set,eZ=typeof process=="object"&&process?process:{},D6e=(t,e,r,s)=>{typeof eZ.emitWarning=="function"?eZ.emitWarning(t,e,r,s):console.error(`[${r}]${e}:${t}`)},cv=globalThis.AbortController,C6e=globalThis.AbortSignal;if(typeof cv>"u"){C6e=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,n){this._onabort.push(n)}},cv=class{constructor(){e()}signal=new C6e;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=eZ.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,D6e("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 CP0=t=>!B6e.has(t),LA=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),q6e=t=>LA(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Lm:null:null,Lm=class extends Array{constructor(e){super(e),this.fill(0)}},tZ=class t{heap;length;static#e=!1;static create(e){let r=q6e(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]}},rZ=class t{#e;#t;#s;#r;#n;#i;#c;#a;get perf(){return this.#a}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#l;#d;#A;#u;#b;#O;#M;#m;#B;#g;#y;#C;#h;#E;#D;#z;#p;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#h,sizes:e.#y,keyMap:e.#d,keyList:e.#A,valList:e.#u,next:e.#b,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.#N(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:h,maxSize:M=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:O,memoMethod:B,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:T,ignoreFetchAbort:W,perf:$}=e;if($!==void 0&&typeof $?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#a=$??yP0,r!==
globstarwhile`,e,A,r,h,M),this.matchOne(e.slice(A),r.slice(h),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,h);break}this.debug("globstar swallow a segment, and continue"),A++}return!!(s&&(this.debug(`
`);if(A===-1){lF("have not received end of HTTP headers yet..."),i();return}let h=l.slice(0,A).toString("ascii").split(`\r
`),M=h.shift();if(!M)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=M.split(" "),y=+g[1],O=g.slice(2).join(" "),B={};for(let I of h){if(!I)continue;let R=I.indexOf(":");if(R===-1)return t.destroy(),r(new Error(`InvalidheaderfromproxyCONNECTresponse:"${I}"`));let N=I.slice(0,R).toLowerCase(),T=I.slice(R+1).trimStart(),W=B[N];typeof W=="string"?B[N]=[W,T]:Array.isArray(W)?W.push(T):B[N]=T}lF("got proxy server response: %o %o",M,B),o(),e({connect:{statusCode:y,statusText:O,headers:B},buffered:l})}t.on("error",c),t.on("end",a),i()})}sg.parseProxyResponse=Q90});var UFe=f(Ao=>{"use strict";var k90=Ao&&Ao.__createBinding||(Object.create?(function(t,e,r,s){s===void 0&&(s=r);var n=Object.getOwnPropertyDescriptor(e,r);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,n)}):(function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]})),U90=Ao&&Ao.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),QFe=Ao&&Ao.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&k90(e,t,r);return U90(e,t),e},kFe=Ao&&Ao.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.HttpsProxyAgent=void 0;var DC=QFe(require("net")),LFe=QFe(require("tls")),G90=kFe(require("assert")),H90=kFe(d2()),X90=a3(),V90=require("url"),j90=_Fe(),qC=(0,H90.default)("https-proxy-agent"),AF=class extends X90.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new V90.URL(e):e,this.proxyHeaders=r?.headers??{},qC("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let s=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),n=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?PFe(r,"headers"):null,host:s,port:n}}async connect(e,r){let{proxy:s}=this;if(!r.host)throw new TypeError('No "host" provided');let n;if(s.protocol==="https:"){qC("Creating `tls.Socket`: %o",this.connectOpts);let A=this.connectOpts.servername||this.connectOpts.host;n=LFe.connect({...this.connectOpts,servername:A&&DC.isIP(A)?void 0:A})}else qC("Creating `net.Socket`: %o",this.connectOpts),n=DC.connect(this.connectOpts);let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},o=DC.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT${o}:${r.port}HTTP/1.1\r
`;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",$90),r.secureEndpoint){qC("Upgrading socket connection to TLS");let A=r.servername||r.host;return LFe.connect({...PFe(r,"host","path","port"),socket:n,servername:DC.isIP(A)?void 0:A})}return n}n.destroy();let l=new DC.Socket({writable:!1});return l.readable=!0,e.once("socket",A=>{qC("Replaying proxy buffer for failed request"),(0,G90.default)(A.listenerCount("data")>0),A.push(p),A.push(null)}),l}};AF.protocols=["http","https"];Ao.HttpsProxyAgent=AF;function $90(t){t.resume()}function PFe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var VFe=f(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var GFe=require("buffer"),Tf={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."};tl.ERRORS=Tf;function Y90(t){if(!GFe.Buffer.isEncoding(t))throw new Error(Tf.INVALID_ENCODING)}tl.checkEncoding=Y90;function HFe(t){return typeof t=="number"&&isFinite(t)&&eU0(t)}tl.isFiniteInteger=HFe;function XFe(t,e){if(typeof t=="number"){if(!HFe(t)||t<0)throw new Error(e?Tf.INVALID_OFFSET:Tf.INVALID_LENGTH)}else throw new Error(e?Tf.INVALID_OFFSET_NON_NUMBER:Tf.INVALID_LENGTH_NON_NUMBER)}function J90(t){XFe(t,!1)}tl.checkLengthValue=J90;function K90(t){XFe(t,!0)}tl.checkOffsetValue=K90;function Z90(t,e){if(t<0||t>e.length)throw new Error(Tf.INVALID_TARGET_OFFSET)}tl.checkTargetOffset=Z90;function eU0(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function tU0(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof GFe.Buffer.prototype[t]>"u")throw new Error(`PlatformdoesnotsupportBuffer.prototype.${t}.`)}tl.bigIntAndBufferInt64Check=tU0});var $Fe=f(mee=>{"use strict";Object.defineProperty(mee,"__esModule",{value:!0});var a0=VFe(),jFe=4096,rU0="utf8",Mee=class t{constructor(e){if(this.length=0,this._encoding=rU0,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(a0.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(a0.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(a0.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(a0.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(jFe);else{if(typeof e<"u")throw new Error(a0.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(jFe)}}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(Bu
`,aZ0=/\u2014 (\S+) (\S+)\n/g;function cZ0(t,e){let r=t.inclusionProof,s=L1e.fromString(r.checkpoint.envelope),n=lx.fromString(s.note);if(!uZ0(s,e))throw new o4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return n}function uZ0(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let n=e.find(i=>BLe.crypto.bufferEqual(i.logID.subarray(0,4),s.keyHint)&&i.baseURL.match(s.name));return n?BLe.crypto.verify(r,n.publicKey,s.signature):!1})}var L1e=class t{note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(_1e))throw new o4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(_1e),s=e.slice(0,r+1),i=e.slice(r+_1e.length).matchAll(aZ0),o=Array.from(i,a=>{let[,c,u]=a,p=Buffer.from(u,"base64");if(p.length<5)throw new o4.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 o4.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,o)}},lx=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 o4.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)}};a4.LogCheckpoint=lx});var qLe=f(U1e=>{"use strict";Object.defineProperty(U1e,"__esModule",{value:!0});U1e.verifyMerkleInclusion=AZ0;var k1e=ba(),P1e=Kr(),pZ0=Buffer.from([0]),lZ0=Buffer.from([1]);function AZ0(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),n=BigInt(e.logSize);if(s<0n||s>=n)throw new P1e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${s}`});let{inner:i,border:o}=dZ0(s,n);if(r.hashes.length!==i+o)throw new P1e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let a=r.hashes.slice(0,i),c=r.hashes.slice(i),u=gZ0(t.canonicalizedBody),p=hZ0(fZ0(u,a,s),c);if(!k1e.crypto.bufferEqual(p,e.logHash))throw new P1e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function dZ0(t,e){let r=bZ0(t,e),s=MZ0(t>>BigInt(r));return{inner:r,border:s}}function fZ0(t,e,r){return e.reduce((s,n,i)=>r>>BigInt(i)&BigInt(1)?Q1e(n,s):Q1e(s,n),t)}function hZ0(t,e){return e.reduce((r,s)=>Q1e(s,r),t)}function bZ0(t,e){return mZ0(t^e-BigInt(1))}function MZ0(t){return t.toString(2).split("1").length-1}function mZ0(t){return t===0n?0:t.toString(2).length}function Q1e(t,e){return k1e.crypto.digest("sha256",lZ0,t,e)}function gZ0(t){return k1e.crypto.digest("sha256",pZ0,t)}});var RLe=f(G1e=>{"use strict";Object.defineProperty(G1e,"__esModule",{value:!0});G1e.verifyTLogSET=EZ0;var ILe=ba(),zZ0=Kr(),OZ0=Qg();function EZ0(t,e){if(!(0,OZ0.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(n=>{let i=yZ0(t),o=Buffer.from(ILe.json.canonicalize(i),"utf8"),a=t.inclusionPromise.signedEntryTimestamp;return ILe.crypto.verify(o,n.publicKey,a)}))throw new zZ0.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function yZ0(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 SLe=f(Ax=>{"use strict";Object.defineProperty(Ax,"__esModule",{value:!0});Ax.verifyTLogBody=IZ0;Ax.verifyTLogInclusion=RZ0;var wLe=A0e(),V1e=Kr(),H1e=ELe(),X1e=yLe(),CZ0=CLe(),BZ0=DLe(),DZ0=qLe(),qZ0=RLe();function IZ0(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 V1e.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${s},received:${n.kind}/${n.apiVersion}`});switch(r){case"dsse":if(s==H1e.DSSE_API_VERSION_V1)return(0,H1e.verifyDSSETLogBody)(n,e);{let i=wLe.Entry.fromJSON(n);return(0,H1e.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,CZ0.verifyIntotoTLogBody)(n,e);case"hashedrekord":if(s==X1e.HASHEDREKORD_API_VERSION_V1)return(0,X1e.verifyHashedRekordTLogBody)(n,e);{let i=wLe.Entry.fromJSON(n);return(0,X1e.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new V1e.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}function RZ0(t,e){let r=!1;if(wZ0(t)&&((0,qZ0.verifyTLogSET)(t,e),r=!0),SZ0(t)){let s=(0,BZ0.verifyCheckpoint)(t,e);(0,DZ0.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new V1e.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}function wZ0(t){return t.inclusionPromise!==void 0}function SZ0(t){return t.inclusionProof!==void 0}});var WLe=f(dx=>{"use strict";Object.defineProperty(dx,"__esModule",{value:!0});dx.Verifier=void 0;var NZ0=require("util"),kg=Kr(),NLe=bLe(),vLe=mLe(),FLe=OLe(),TLe=SLe(),j1e=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
[`+w+"] ";for(x in arguments[0])i(arguments[0],x)&&(D+=x+": "+arguments[0][x]+", ");D=D.slice(0,-2)}else D=arguments[w];z.push(D)}W(d+`
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,o=!1,a;return{s:function(){r=(0,fut.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 Eut(t,e){var r;if(t){if(typeof t=="string")return YXe(t,e);var s=(0,Co.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,mut.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return YXe(t,e)}}function YXe(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 dt="xregexp",fh={astral:!1,namespacing:!1},jt={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},mu={},G4={},uz={},tne=[],pz="default",JXe="class",yut={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]/},Cut=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,But=jt.exec.call(/()??/,"")[1]===void 0,Dut=(0,dh.default)(/x/)!==void 0,qut={},rVe=qut.toString;function sne(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 sVe=sne("u"),nne=sne("y"),nVe={g:!0,i:!0,m:!0,u:sVe,y:nne};function iVe(t,e,r,s,n){var i;if(t[dt]={captureNames:e},n)return t;if(t.__proto__)t.__proto__=ae.prototype;else for(var o in ae.prototype)t[o]=ae.prototype[o];return t[dt].source=r,t[dt].flags=s&&(0,Out.default)(i=s.split("")).call(i).join(""),t}function H4(t){return jt.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}function bh(t,e){var r;if(!ae.isRegExp(t))throw new TypeError("Type RegExp expected");var s=t[dt]||{},n=Iut(t),i="",o="",a=null,c=null;return e=e||{},e.removeG&&(o+="g"),e.removeY&&(o+="y"),o&&(n=jt.replace.call(n,new RegExp("[".concat(o,"]+"),"g"),"")),e.addG&&(i+="g"),e.addY&&(i+="y"),i&&(n=H4(n+i)),e.isInternalOnly||(s.source!==void 0&&(a=s.source),(0,dh.default)(s)!=null&&(c=i?H4((0,dh.default)(s)+i):(0,dh.default)(s))),t=iVe(new RegExp(e.source||t.source,n),Rut(t)?(0,Co.default)(r=s.captureNames).call(r,0):null,a,c,e.isInternalOnly),t}function oVe(t){return(0,tVe.default)(t,16)}function aVe(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||jt.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||wut(t.input,t.index+t[0].length,r)?"":"(?:)"}function Iut(t){return Dut?(0,dh.default)(t):jt.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}function Rut(t){return!!(t[dt]&&t[dt].captureNames)}function cVe(t){return(0,tVe.default)(t,10).toString(16)}function wut(t,e,r){var s="\\(\\?#[^)]*\\)",n="#[^#\\n]*",i="[?*+]|{\\d+(?:,\\d*)?}";return jt.test.call((0,hh.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,Co.default)(t).call(t,e))}function ine(t,e){return rVe.call(t)==="[object ".concat(e,"]")}function uVe(t){for(;t.length<4;)t="0".concat(t);return t}function Sut(t,e){if(H4(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=jt.replace.call(t,/^\(\?([\w$]+)\)/,function(i,o){if(jt.test.call(/[gy]/,o))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(i));return e=H4(e+o),""});var r=X4(e),s;try{for(r.s();!(s=r.n()).done;){var n=s.value;if(!nVe[n])throw new SyntaxError("Unknown regex flag ".concat(n))}}catch(i){r.e(i)}finally{r.f()}return{pattern:t,flags:e}}function pVe(t){var e={};return ine(t,"String")?((0,rne.default)(ae).call(ae,t,/[^\s,]+/,function(r){e[r]=!0}),e):t}function KXe(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,dpt.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 Ept(t,e){var r;if(t){if(typeof t=="string")return YVe(t,e);var s=(0,mpt.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,Mpt.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return YVe(t,e)}}function YVe(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 ypt=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 h=/^\\[xu](.+)/.exec(A);return h?s(h[1]):A.charCodeAt(A[0]==="\\"?1:0)}function c(A){var h="",M=-1;return(0,zpt.default)(e).call(e,A,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(g){var y=a(g[1]);y>M+1&&(h+="\\u".concat(i(n(M+1))),y>M+2&&(h+="-\\u".concat(i(n(y-1))))),M=a(g[2]||g[1])}),M<65535&&(h+="\\u".concat(i(n(M+1))),M<65534&&(h+="-\\uFFFF")),h}function u(A){var h="b!";return r[A][h]||(r[A][h]=c(r[A].bmp))}function p(A,h){var M=r[A],g="";if(M.bmp&&!M.isBmpLast){var y;g=(0,une.default)(y="[".concat(M.bmp,"]")).call(y,M.astral?"|":"")}if(M.astral&&(g+=M.astral),M.isBmpLast&&M.bmp){var O;g+=(0,une.default)(O="".concat(M.astral?"|":"","[")).call(O,M.bmp,"]")}return h?"(?:(?!".concat(g,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(g,")")}function l(A,h){var M=h?"a!":"a=";return r[A][M]||(r[A][M]=p(A,h))}e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(A,h,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],N=(0,gpt.default)(M).call(M,"A"),T=o(A[4]||A[3]),W=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(W.inverseOf){if(T=o(W.inverseOf),!r.hasOwnProperty(T)){var $;throw new ReferenceError((0,une.default)($="".concat(O+A[0]," -> ")).call($,W.inverseOf))}W=r[T],R=!R}if(!(W.bmp||N))throw new SyntaxError(B+A[0]);if(N){if(h==="class")throw new SyntaxError(I);return l(T,R)}return h==="class"?R?u(T):W.bmp:"".concat((R?"[^":"[")+W.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(A){var h="Unicode token requires name",M="Unicode token has no character data ",g=Opt(A),y;try{for(g.s();!(y=g.n()).done;){var O=y.value;if(!O.name)throw new Error(h);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 h=o(A);return r[h]}};K4.default=ypt;JVe.exports=K4.default});var eje=f((Pjt,ZVe)=>{ZVe.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\``)}functionR2e(t){process.exitCode=dQ.Failure,Sl0(t)}functionP(t){jl("debug",{},t)}functionSl0(t,e={}){jl("error",oQ(e),tinstanceofError?t.toString():t)}functionRi(t,e={}){jl("warning",oQ(e),tinstanceofError?t.toString():t)}functionG(t){process.stdout.write(t+D2e.EOL)}functionNl0(t){cQ("group",t)}functionvl0(){cQ("endgroup")}function$l(t,e){returnwl0(this,void0,void0,function*(){Nl0(t);letr;try{r=yielde()}finally{vl0()}returnr})}functionGq(t,e){if(process.env.GITHUB_STATE||"")returnuQ("STATE",O2e(t,e));jl("save-state",{name:t},Vl(e))}functionw2e(t){returnprocess.env[`STATE_${t}`]||""}varXw=F(require("fs"),1),pV=F(require("os"),1),lV=F(require("path"),1);varTQ=F(require("crypto"),1),Sr=F(require("fs"),1);varR20=F(vQ(),1);variI=F(require("os"),1),Go=F(require("path"),1);varNi=F(vQ(),1),zhe=F(require("stream"),1),Ohe=F(require("util"),1),xQ=require("assert");varghe=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())})},sI=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){returnghe(this,void0,void0,function*(){lets=1;for(;s<this.maxAttempts;){try{returnyielde()}catch(i){if(r&&!r(i))throwi;ve(i.message)}letn=this.getSleepAmount();ve(`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){returnghe(this,void0,void0,function*(){returnnewPromise(r=>setTimeout(r,e*1e3))})}};varQa=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())})},nI=classextendsError{constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}},Ehe=process.platform==="win32",LMt=process.platform==="darwin",S20="actions/tool-cache";functionvi(t,e,r,s){returnQa(this,void0,void0,function*(){e=e||Go.join(Ihe(),TQ.randomUUID()),yieldUu(Go.dirname(e)),_(`Downloading ${t}`),_(`Destination ${e}`);letn=3,i=FQ("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS",10),o=FQ("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS",20);returnyieldnewsI(n,i,o).execute(()=>Qa(this,void0,void0,function*(){returnyieldN20(t,e||"",r,s)}),c=>!(cinstanceofnI&&c.httpStatusCode&&c.httpStatusCode<500&&c.httpStatusCode!==408&&c.httpStatusCode!==429))})}functionN20(t,e,r,s){returnQa(this,void0,void0,function*(){if(Sr.existsSync(e))thrownewError(`Destination file path ${e} already exists`);letn=newqi(S20,[],{allowRetries:!1});r&&(_("set auth"),s===void0&&(s={}),s.authorization=r);leti=yieldn.get(t,s);if(i.message.statusCode!==200){letp=newnI(i.message.statusCode);throw_(`Failed to download from "${t}". Code(${i.message.statusCode}) Message(${i.message.statusMessage})`),p}leto=Ohe.promisify(zhe.pipeline),c=FQ("TEST_DOWNLOAD_TOOL_RESPONSE_MESSAGE_FACTORY",()=>i.message)(),u=!1;try{returnyieldo(c,Sr.createWriteStream(e)),_("download complete"),u=!0,e}finally{if(!u){_("download failed");try{yieldxq(e)}catch(p){_(`Failed to delete '${e}'. ${p.message}`)}}}})}functionyhe(t,e){returnQa(this,arguments,void0,function*(r,s,n="xz"){if(!r)thrownewError("parameter 'file' is required");s=yieldDhe(s),_("Checking tar --version");leti="";yieldPn("tar --version",[],{ignoreReturnCode:!0,silent:!0,listeners:{stdout:p=>i+=p.toString(),stderr:p=>i
`).map(i=>i.trim());for(let i of n)!i||i.startsWith("#")||s.patterns.push(new UO(i));return s.searchPaths.push(...PQ(s.patterns)),s})}static stat(e,r,s){return XQ(this,void 0,void 0,function*(){let n;if(r.followSymbolicLinks)try{n=yield Ub.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){_(`Brokensymlink'${e.path}'`);return}throw new Error(`Noinformationfoundforthepath'${e.path}'.Thismayindicateabrokensymboliclink.`)}throw i}else n=yield Ub.promises.lstat(e.path);if(n.isDirectory()&&r.followSymbolicLinks){let i=yield Ub.promises.realpath(e.path);for(;s.length>=e.level;)s.pop();if(s.some(o=>o===i)){_(`Symlinkcycledetectedforpath'${e.path}'andrealpath'${i}'`);return}s.push(i)}return n})}};var df0=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 tbe(t,e){return df0(this,void 0,void 0,function*(){return yield pI.create(t,e)})}var DI=F(require("crypto"),1),Xb=F(require("fs"),1),o2=F(require("path"),1),XMe=F(GMe(),1),VMe=F(require("util"),1);var KO;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(KO||(KO={}));var As;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(As||(As={}));var kn;(function(t){t.GNU="gnu",t.BSD="bsd"})(kn||(kn={}));var CI=2,BI=5e3,Ak=5e3,dk=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,HMe=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,ZO="cache.tar",fk="manifest.txt",$mt=10*Math.pow(1024,3);var Hb=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())})},pM0=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)}},lM0="1.0";function e3(){return Hb(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=o2.join(s,"actions","temp")}let r=o2.join(e,DI.randomUUID());return yield Uu(r),r})}function Ua(t){return Xb.statSync(t).size}function hk(t){return Hb(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 tbe(t.join(`
`),{implicitDescendants:!1});try{for(var u=!0,p=pM0(c.globGenerator()),l;l=yield p.next(),e=l.done,!e;u=!0){n=l.value,u=!1;let h=o2.relative(a,n).replace(new RegExp(`\\${o2.sep}`,"g"),"/");_(`Matched:${h}`),h===""?o.push("."):o.push(`${h}`)}}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 t3(t){return Hb(this,void 0,void 0,function*(){return VMe.promisify(Xb.unlink)(t)})}function jMe(t){return Hb(this,arguments,void 0,function*(e,r=[]){let s="";r.push("--version"),_(`Checking${e}${r.join(" ")}`);try{yield Pn(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:n=>s+=n.toString(),stderr:n=>s+=n.toString()}})}catch(n){_(n.message)}return s=s.trim(),_(s),s})}function r3(){return Hb(this,void 0,void 0,function*(){let t=yield jMe("zstd",["--quiet"]),e=XMe.clean(t);return _(`zstdversion:${e}`),t===""?As.Gzip:As.ZstdWithoutLong})}function tA(t){return t===As.Gzip?KO.Gzip:KO.Zstd}function $Me(){return Hb(this,void 0,void 0,function*(){return Xb.existsSync(dk)?dk:(yield jMe("tar")).toLowerCase().includes("gnu tar")?hr("tar"):""})}function bk(t,e){if(e===void 0)throw Error(`Expected${t}butvaluewasundefiend`);return e}function Vb(t,e,r=!1){let s=t.slice();return e&&s.push(e),process.platform==="win32"&&!r&&s.push("windows-only"),s.push(lM0),DI.createHash("sha256").update(s.join("|")).digest("hex")}function YMe(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}var yM=F(require("fs"),1),OEe=require("url");var Ga=class extends Error{constructor(e){super(e),this.name="AbortError"}};var JMe=require("node:os"),KMe=F(require("node:util"),1),ZMe=F(require("node:process"),1);function eme(t,...e){ZMe.default.stderr.write(`${KMe.default.format(t,...e)}${JMe.EOL}`)}var tme=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,sme,Mk=[],mk=[],II=[];tme&&gk(tme);var nme=Object.assign(t=>ime(t),{enable:gk,enabled:zk,disable:AM0,log:eme});function gk(t){sme=t,Mk=[],mk=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?mk.push(r.substring(1)):Mk.push(r);for(let r of II)r.enabled=zk(r.namespace)}function zk(t){if(t.endsWith("*"))return!0;for(let e of mk)if(rme(t,e))return!1;for(let e of Mk)if(rme(t,e))return!0;return!1}function rme(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let A=[],h="";for(let M of e)M==="*"&&h==="*"||(h=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 AM0(){let t=sme||"";return gk(""),t}function ime(t){let e=Object.assign(r,{enabled:zk(t),destroy:dM0,log:nme.log,namespace:t,extend:fM0});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return II.push(e),e}function dM0(){let t=II.indexOf(this);return t>=0?(II.splice(t,1),!0):!1}function fM0(t){let e=ime(`${this.namespace}:${t}`);return e.log=this.log,e}var jb=nme;var Ok=["verbose","info","warning","error"],ome={verbose:400,info:300,warning:200,error:100};function ame(t,e){e.log=(...r)=>{t.log(...r)}}function cme(t){return Ok.includes(t)}function RI(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,s,n=jb(t.namespace);n.log=(...p)=>{jb.log(...p)};function i(p){if(p&&!cme(p))throw new Error(`Unknownloglevel'${p}'.Acceptablevalues:${Ok.join(",")}`);s=p;let l=[];for(let A of e)o(A)&&l.push(A.namespace);jb.enable(l.join(","))}r&&(cme(r)?i(r):console.error(`${t.logLevelEnvVarName}settounknownloglevel'${r}';loggingisnotenabled.Acceptablevalues:${Ok.join(", ")}.`));function o(p){return!!(s&&ome[p.level]<=ome[s])}function a(p,l){let A=Object.assign(p.extend(l),{level:l});if(ame(p,A),o(A)){let h=jb.disable();jb.enab
${gM0.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function vI(t){return t instanceof ds?!0:c2(t)&&t.name==="RestError"}function Ks(t,e){return Buffer.from(t,e)}var FI=F(require("node:http"),1),TI=F(require("node:https"),1),Dk=F(require("node:zlib"),1),fme=require("node:stream");var xi=s3("ts-http-runtime");var zM0={};function n3(t){return t&&typeof t.pipe=="function"}function dme(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 hme(t){return t&&typeof t.byteLength=="number"}var xI=class extends fme.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}},qk=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new Ga("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 Vo;xi.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=CM0(a);u!==null&&e.headers.set("Content-Length",u)}let c;try{if(a&&e.onUploadProgress){let M=e.onUploadProgress,g=new xI(M);g.on("error",y=>{xi.error("Error in upload progress",y)}),n3(a)?a.pipe(g):g.end(a),a=g}let u=await this.makeRequest(e,r,a);n!==void 0&&clearTimeout(n);let p=OM0(u),A={status:u.statusCode??0,headers:p,request:e};if(e.method==="HEAD")return u.resume(),A;c=o?EM0(u,p):u;let h=e.onDownloadProgress;if(h){let M=new xI(h);M.on("error",g=>{xi.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 yM0(c),A}finally{if(e.abortSignal&&s){let u=Promise.resolve();n3(a)&&(u=dme(a));let p=Promise.resolve();n3(c)&&(p=dme(c)),Promise.all([u,p]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(l=>{xi.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?FI.default.request(a,c):TI.default.request(a,c);p.once("error",l=>{u(new ds(l.message,{code:l.code??ds.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new Ga("The operation was aborted. Rejecting from abort signal callback while making request.");p.destroy(l),u(l)}),s&&n3(s)?s.pipe(p):s?typeof s=="string"||Buffer.isBuffer(s)?p.end(s):hme(s)?p.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(xi.error("Unrecognized body type",s),u(new ds("Unrecognized body type"))):p.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?FI.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new FI.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return TI.default.globalAgent;let n=e.tlsSettings??zM0,i=this.cachedHttpsAgents.get(n);return i&&i.options.keepAlive===!s||(xi.info("No cached TLS Agent exist, creating a new Agent"),i=new TI.default.Agent({keepAlive:!s,...n}),this.cachedHttpsAgents.set(n,i)),i}}};function OM0(t){let e=Un();for(let r of Object.keys(t.headers)){let s=t.headers[r];Array.isArray(s)?s.length>0&&e.set(
`;return e}function rg0(t){return t instanceof Uint8Array?t.byteLength:iR(t)?t.size===-1?void 0:t.size:void 0}function sg0(t){let e=0;for(let r of t){let s=rg0(r);if(s===void 0)return;e+=s}return e}async function ng0(t,e,r){let s=[Ks(`--${r}`,"utf-8"),...e.flatMap(i=>[Ks(`\r
`,"utf-8")],n=sg0(s);n&&t.headers.set("Content-Length",n),t.body=await Mge(s)}var c3="multipartPolicy",ig0=70,og0=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function ag0(t){if(t.length>ig0)throw new Error(`Multipartboundary"${t}"exceedsmaximumlengthof70characters`);if(Array.from(t).some(e=>!og0.has(e)))throw new Error(`Multipartboundary"${t}"containsinvalidcharacters`)}function aR(){return{name:c3,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?ag0(r):r=eg0(),t.headers.set("Content-Type",`${i};boundary=${r}`),await ng0(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function cR(){return NI()}var mge=RI({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),N3t=mge.logger;function Va(t){return mge.createClientLogger(t)}var ja=Va("core-rest-pipeline");function Vk(t={}){return _I({logger:ja.info,...t})}var jk=LI;function $k(t={}){return PI(t)}var uR=F(require("node:os"),1),pR=F(require("node:process"),1);function gge(){return"User-Agent"}async function zge(t){if(pR.default&&pR.default.versions){let e=`${uR.default.type()}${uR.default.release()};${uR.default.arch()}`,r=pR.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 lR="1.22.2";function hg0(t){let e=[];for(let[r,s]of t){let n=s?`${r}/${s}`:r;e.push(n)}return e.join(" ")}function Oge(){return gge()}async function AR(t){let e=new Map;e.set("core-rest-pipeline",lR),await zge(e);let r=hg0(e);return t?`${t}${r}`:r}var Ege=Oge(),yge="userAgentPolicy";function Yk(t={}){let e=AR(t.userAgentPrefix);return{name:yge,async sendRequest(r,s){return r.headers.has(Ege)||r.headers.set(Ege,await e),s(r)}}}var Vn=class extends Error{constructor(e){super(e),this.name="AbortError"}};function Jk(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:n}=e??{};return new Promise((i,o)=>{function a(){o(new Vn(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 zg0="The delay was aborted.";function u3(t,e){let r,{abortSignal:s,abortErrorMsg:n}=e??{};return Jk(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:s,abortErrorMsg:n??zg0})}function sA(t){if(c2(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 Cge(t){return c2(t)}function tM(){return a2()}var N0=l2;var Bge=Symbol("rawContent");function Zk(t){return typeof t[Bge]=="function"}function Dge(t){return Zk(t)?t[Bge]():t}var dR=c3;function e7(){let t=aR();return{name:dR,sendRequest:async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)Zk(s.body)&&(s.body=Dge(s.body));return t.sendRequest(e,r)}}}var t7=QI;function r7(){return kI()}function s7(t={}){return HI(t)}function n7(){return XI()}function nA(t){return kk(t)}function i7(t,e){return rR(t,e)}var qge="setClientRequestIdPolicy";function o7(t="x-ms-client-request-id"){return{name:qge,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}function a7(t){return sR(t)}function c7(t){return nR(t)}var rM={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Ige(t={}){let e=new u7(t.parentContext);return t.span&&(e=e.setValue(rM.span,t.span)),t.namespace&&(e=e.setValue(rM.namespace,t.namespace)),e}var u7=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--),!Gz0(c)){let l;return c.trim().length===0?l="Invalid space after '<'.":l="Tag '"+c+"' is an invalid name.",r1("InvalidTag",l,fs(t,i))}let u=Lz0(t,i);if(u===!1)return r1("InvalidAttr","Attributes for '"+c+"' have open quote.",fs(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=lze(p,e);if(A===!0)s=!0;else return r1(A.err.code,A.err.msg,fs(t,l+A.err.line))}else if(a)if(u.tagClosed){if(p.trim().length>0)return r1("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",fs(t,o));if(r.length===0)return r1("InvalidTag","Closing tag '"+c+"' has not been opened.",fs(t,o));{let l=r.pop();if(c!==l.tagName){let A=fs(t,l.tagStartPos);return r1("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+A.line+", col "+A.col+") instead of closing tag '"+c+"'.",fs(t,o))}r.length==0&&(n=!0)}}else return r1("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",fs(t,i));else{let l=lze(p,e);if(l!==!0)return r1(l.err.code,l.err.msg,fs(t,i-p.length+l.err.line));if(n===!0)return r1("InvalidXml","Multiple possible root nodes found.",fs(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=pze(t,i);continue}else if(t[i+1]==="?"){if(i=uze(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=kz0(t,i);if(l==-1)return r1("InvalidChar","char '&' is not expected.",fs(t,i));i=l}else if(n===!0&&!cze(t[i]))return r1("InvalidXml","Extra text at the end",fs(t,i));t[i]==="<"&&i--}}else{if(cze(t[i]))continue;return r1("InvalidChar","char '"+t[i]+"' is not expected.",fs(t,i))}if(s){if(r.length==1)return r1("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",fs(t,r[0].tagStartPos));if(r.length>0)return r1("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return r1("InvalidXml","Start tag expected.",1);return!0}function cze(t){return t===" "||t===" "||t===`
`||t==="\r"}function uze(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 r1("InvalidXml","XML declaration allowed only at the start of the document.",fs(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function pze(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 Wz0='"',_z0="'";function Lz0(t,e){let r="",s="",n=!1;for(;e<t.length;e++){if(t[e]===Wz0||t[e]===_z0)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 Pz0=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function lze(t,e){let r=CR(t,Pz0),s={};for(let n=0;n<r.length;n++){if(r[n][1].length===0)return r1("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",O3(r[n]));if(r[n][3]!==void 0&&r[n][4]===void 0)return r1("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",O3(r[n]));if(r[n][3]===void 0&&!e.allowBooleanAttributes)return r1("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",O3(r[n]));let i=r[n][2];if(!Uz0(i))return r1("InvalidAttr","Attribute '"+i+"' is an invalid name.",O3(r[n]));if(!Object.prototype.hasOwnProperty.call(s,i))s[i]=1;else return r1("InvalidAttr","Attribute '"+i+"' is repeated.",O3(r[n]))}return!0}function Qz0(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 kz0(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Qz0(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 r1(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Uz0(t){return q7(t)}function Gz0(t){return q7(t)}function fs(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function O3(t){return t.startIndex+t[1].length}var Aze={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"},dze={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 rn("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let n=this.options,i=new C3(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=aM(t,">",a,"Closing Tag is not closed."),l=t.substring(a+2,p).trim();if(n.removeNSPrefix){let h=l.indexOf(":");h!==-1&&(l=l.substr(h+1))}l=T7(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=x7(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 rn(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=aM(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=aM(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=x7(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,h=p.tagExp,M=p.attrExpPresent,g=p.closeIndex;if({tagName:l,tagExp:h}=T7(n.transformTagName,l,h,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;h.length>0&&h.lastIndexOf("/")===h.length-1&&(O=!0,l[l.length-1]==="/"?(l=l.substr(0,l.length-1),h=l):h=h.substr(0,h.length-1),M=l!==h);let B=null,I={},R;R=dO0(A),l!==e.tagname&&this.matcher.push(l,{},R),l!==h&&M&&(B=this.buildAttributesMap(h,this.matcher,l),B&&(I=AO0(B,n))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=a;if(this.isCurrentNodeStopNode){let T="";if(O)a=p.closeIndex;else if(n.unpairedTagsSet.has(l))a=p.closeIndex;else{let $=this.readStopNodeData(t,A,g+1);if(!$)throw new Error(`Unexpected end of ${A}`);a=$.i,T=$.tagContent}let W=new rn(l);B&&(W[":@"]=B),W.add(n.textNodeName,T),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,W,this.readonlyMatcher,N)}else{if(O){({tagName:l,tagExp:h}=T7(n.transformTagName,l,h,n));let T=new rn(l);B&&(T[":@"]=B),this.addChild(r,T,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(n.unpairedTagsSet.has(l)){let T=new rn(l);B&&(T[":@"]=B),this.addChild(r,T,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=p.closeIndex;continue}else{let T=new rn(l);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),B&&(T[":@"]=B),this.addChild(r,T,this.readonlyMatcher,N),r=T}s="",a=g}}}elses+=t[a];returne.child};functiong
`}),s}getCanonicalizedResourceString(e){let r=LR(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let n=PR(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 Tt=class extends z2{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new R3(e,r,this)}computeHMACSHA256(e){return(0,Gze.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var q1=Va("storage-common");var Pi;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Pi||(Pi={}));var uA={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Pi.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},XO0=new Vn("The operation was aborted."),w3=class extends Ka{retryOptions;constructor(e,r,s=uA){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:uA.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):uA.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:uA.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:uA.maxRetryDelayInMs):uA.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:uA.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:uA.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=_R(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=cA(n.url,Ju.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(q1.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(q1.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 q1.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 q1.info(`RetryPolicy:Networkerror${o}found,willretry.`),!0}if(s||n){let o=s?s.status:n?n.statusCode:0;if(!e&&o===404)return q1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return q1.info(`RetryPolicy:Willretryforstatuscode${o}.`),!0}if(s&&s?.status>=400){let o=s.headers.get(Ue.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')?(q1.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 Pi.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Pi.FIXED:n=this.retryOptions.retryDelayInMs;break}else n=Math.random()*1e3;return q1.info(`RetryPolicy:Delayfor${n}ms`),QR(n,s,XO0)}};var S3=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new w3(e,r,this.retryOptions)}};var VO0="storageBrowserPolicy";function Hze(){return{name:VO0,async sendRequest(t,e){return N0||((t.method==="GET"||t.method==="HEAD")&&(t.url=cA(t.url,Ju.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Ue.COOKIE),t.headers.delete(Ue.CONTENT_LENGTH)),e(t)}}}var jO0="StorageCorrectContentLengthPolicy";function Xze(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(Ue.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:jO0,async send
`}),a}function n(i){let o=LR(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=PR(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 Zo(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 sy0(t,e){if(t=R2(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=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ko(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 Zo(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 ny0(t,e){if(t=R2(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=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ko(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 Zo(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 iy0(t,e){if(t=R2(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=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?v0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?v0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Ko(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 Zo(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 oy0(t,e){if(t=R2(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=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?v0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?v0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ko(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 Zo(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 ay0(t,e){if(t=R2(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=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?v0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?v0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ko(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 Zo(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 cy0(t,e){if(t=R2(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=hc.parse(t.permissions.toString()).toString():n=bc.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?v0(t.startsOn,!1):"",t.expiresOn?v0(t.expiresOn,!1):"",I2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?v0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?v0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Ko(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 Zo(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 I2(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}function R2(t){let e=t.version?t.version:HR;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 G3=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=tM()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==jo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==jo||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ye.withSpan("BlobLeaseClient-acquireLease",r,async s=>Ie(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:s.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==jo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==jo||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ye.withSpan("BlobLeaseClient-changeLease",r,async s=>{let n=Ie(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!==jo||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==jo||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"}};OM.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var v2=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"}};v2.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var eE=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var mC0=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())})},QH=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);ve(`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 aEe(t,e,r){return mC0(this,void 0,void 0,function*(){var s;let n=new op(t),i=n.getBlockBlobClient(),o=new QH((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(),_(`BlobClient: ${n.name}:${n.accountName}:${n.containerName}`);let c=yield i.uploadFile(e,a);if(c._response.status>=400)throw new Y5(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw t1(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}var uEe=F(require("buffer"),1),Mc=F(require("fs"),1),pEe=F(require("stream"),1),lEe=F(require("util"),1);var J5=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 K5(t){return t?t>=200&&t<300:!1}function gC0(t){return t?t>=500:!0}function zC0(t){return t?[vt.BadGateway,vt.ServiceUnavailable,vt.GatewayTimeout].includes(t):!1}function OC0(t){return J5(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function cEe(t,e,r){return J5(this,arguments,void 0,function*(s,n,i,o=CI,a=BI,c=void 0){let u="",p=1;for(;p<=o;){let l,A,h=!1;try{l=yield n()}catch(M){c&&(l=c(M)),h=!0,u=M.message}if(l&&(A=i(l),!gC0(A)))return l;if(A&&(h=zC0(A),u=`Cache service responded with ${A}`),_(`${s} - Attempt ${p} of ${o} failed with error: ${u}`),!h){_(`${s} - Error is not retryable`);break}yield OC0(a),p++}throw Error(`${s} failed: ${u}`)})}function tE(t,e){return J5(this,arguments,void 0,function*(r,s,n=CI,i=BI){return yield cEe(r,s,o=>o.statusCode,n,i,o=>{if(o instanceof xa)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function EM(t,e){return J5(this,arguments,void 0,function*(r,s,n=CI,i=BI){return yield cEe(r,s,o=>o.message.statusCode,n,i)})}var Hi=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 EC0(t,e){return Hi(this,void 0,void 0,function*(){yield lEe.promisify(pEe.pipeline)(t.message,e)})}var Z5=class{constructor(e){this.contentLength=e,this.segmentIndex=0,this.
Othercacheswithsimilarkey:`);for(let a of i?.artifactCaches||[])_(`CacheKey:${a?.cacheKey},CacheVersion:${a?.cacheVersion},CacheScope:${a?.scope},CacheCreated:${a?.creationTime}`)}}})}function HH(t,e,r){return an(this,void 0,void 0,function*(){let s=new OEe.URL(t),n=hEe(r);s.hostname.endsWith(".blob.core.windows.net")?n.useAzureSdk?yield dEe(t,e,n):n.concurrentBlobDownloads?yield AEe(t,e,n):yield ew(t,e):yield ew(t,e)})}function yEe(t,e,r){return an(this,void 0,void 0,function*(){let s=GH(),n=Vb(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:n,cacheSize:r?.cacheSize};return yield tE("reserveCache",()=>an(this,void 0,void 0,function*(){return s.postJson(sE("caches"),i)}))})}function zEe(t,e){return`bytes${t}-${e}/*`}function wC0(t,e,r,s,n){return an(this,void 0,void 0,function*(){_(`Uploadingchunkofsize${n-s+1}bytesatoffset${s}withcontentrange:${zEe(s,n)}`);let i={"Content-Type":"application/octet-stream","Content-Range":zEe(s,n)},o=yield EM(`uploadChunk(start:${s},end:${n})`,()=>an(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!K5(o.message.statusCode))throw new Error(`Cacheservicerespondedwith${o.message.statusCode}duringuploadchunk.`)})}function SC0(t,e,r,s){return an(this,void 0,void 0,function*(){let n=Ua(r),i=sE(`caches/${e.toString()}`),o=yM.openSync(r,"r"),a=kH(s),c=bk("uploadConcurrency",a.uploadConcurrency),u=bk("uploadChunkSize",a.uploadChunkSize),p=[...new Array(c).keys()];_("Awaiting all uploads");let l=0;try{yield Promise.all(p.map(()=>an(this,void 0,void 0,function*(){for(;l<n;){let A=Math.min(n-l,u),h=l,M=l+A-1;l+=u,yield wC0(t,i,()=>yM.createReadStream(r,{fd:o,start:h,end:M,autoClose:!1}).on("error",g=>{throw new Error(`Cacheuploadfailedbecausefilereadfailedwith${g.message}`)}),h,M)}})))}finally{yM.closeSync(o)}})}function NC0(t,e,r){return an(this,void 0,void 0,function*(){let s={size:r};return yield tE("commitCache",()=>an(this,void 0,void 0,function*(){return t.postJson(sE(`caches/${e.toString()}`),s)}))})}function XH(t,e,r,s){return an(this,void 0,void 0,function*(){if(kH(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield aEe(r,e,s)}else{let i=GH();_("Upload cache"),yield SC0(i,t,e,s),_("Commiting cache");let o=Ua(e);ve(`CacheSize:~${Math.round(o/(1024*1024))}MB(${o}B)`);let a=yield NC0(i,t,o);if(!K5(a.statusCode))throw new Error(`Cacheservicerespondedwith${a.statusCode}duringcommitcache.`);ve("Cache saved successfully")}})}var Mye=F(pye(),1),o1=F(i1(),1),Zn=F(i1(),1),_2=F(i1(),1),L2=F(i1(),1),P2=F(i1(),1);var PX=F(i1(),1),QX=F(i1(),1),fye=F(i1(),1),hye=F(i1(),1),bye=F(i1(),1);var WX=F(i1(),1),_X=F(i1(),1),lye=F(i1(),1),Aye=F(i1(),1),dye=F(i1(),1),LX=class extends dye.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,Aye.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,lye.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?_X.UnknownFieldHandler.onRead:u)(this.typeName,i,a,c,p)}}return i}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,WX.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,WX.WireType.Varint).int64(e.permission);let n=s.writeUnknownFields;return n!==!1&&(n==!0?_X.UnknownFieldHandler.onWrite:n)(this.typeName,e,r),r}},Qw=new LX;var kX=class extends bye.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:()=>Qw}])}create(e){let r={repositoryId:"0",scope:[]
`));let s=yield sV(r,"create");yield nV(s,t)})}var PM=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())})},ra=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},LM=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},Hw=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function Oye(t){if(!t||t.length===0)throw new ra("Path Validation Error: At least one directory or file path is required")}function aV(t){if(t.length>512)throw new ra(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new ra(`KeyValidationError:${t}cannotcontaincommas.`)}function cV(){return rE()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function Eye(t,e,r,s){return PM(this,arguments,void 0,function*(n,i,o,a,c=!1){let u=rE();return _(`Cacheserviceversion:${u}`),Oye(n),u==="v2"?yield VB0(n,i,o,a,c):yield XB0(n,i,o,a,c)})}function XB0(t,e,r,s){return PM(this,arguments,void 0,function*(n,i,o,a,c=!1){o=o||[];let u=[i,...o];if(_("Resolved Keys:"),_(JSON.stringify(u)),u.length>10)throw new ra("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of u)aV(A);let p=yield r3(),l="";try{let A=yield EEe(u,n,{compressionMethod:p,enableCrossOsArchive:c});if(!A?.archiveLocation)return;if(a?.lookupOnly)return ve("Lookup only - skipping download"),A.cacheKey;l=gE.join(yield e3(),tA(p)),_(`ArchivePath:${l}`),yield HH(A.archiveLocation,l,a),Ii()&&(yield mE(l,p));let h=Ua(l);return ve(`CacheSize:~${Math.round(h/(1024*1024))}MB(${h}B)`),yield iV(l,p),ve("Cache restored successfully"),A.cacheKey}catch(A){let h=A;if(h.name===ra.name)throw A;h instanceof xa&&typeof h.statusCode=="number"&&h.statusCode>=500?wO(`Failedtorestore:${A.message}`):t1(`Failedtorestore:${A.message}`)}finally{try{yield t3(l)}catch(A){_(`Failedtodeletearchive:${A}`)}}})}function VB0(t,e,r,s){return PM(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(_("Resolved Keys:"),_(JSON.stringify(u)),u.length>10)throw new ra("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of u)aV(l);let p="";try{let l=rV(),A=yield r3(),h={key:i,restoreKeys:o,version:Vb(n,A,c)},M=yield l.GetCacheEntryDownloadURL(h);if(!M.ok){_(`Cachenotfoundforversion${h.version}ofkeys:${u.join(", ")}`);return}if(h.key!==M.matchedKey?ve(`Cachehitforrestore-key:${M.matchedKey}`):ve(`Cachehitfor:${M.matchedKey}`),a?.lookupOnly)return ve("Lookup only - skipping download"),M.matchedKey;p=gE.join(yield e3(),tA(A)),_(`Archivepath:${p}`),_(`Startingdownloadofarchiveto:${p}`),yield HH(M.signedDownloadUrl,p,a);let y=Ua(p);return ve(`CacheSize:~${Math.round(y/(1024*1024))}MB(${y}B)`),Ii()&&(yield mE(p,A)),yield iV(p,A),ve("Cache restored successfully"),M.matchedKey}catch(l){let A=l;if(A.name===ra.name)throw l;A instanceof xa&&typeof A.statusCode=="number"&&A.statusCode>=500?wO(`Failedtorestore:${l.message}`):t1(`Failedtorestore:${l.message}`)}finally{try{p&&(yield t3(p))}catch(l){_(`Failedtodeletearchive:${l}`)}}})}function uV(t,e,r){return PM(this,arguments,void 0,function*(s,n,i,o=!1){let a=rE();return _(`Cacheserviceversion:${a}`),Oye(s),aV(n),a==="v2"?yield $B0(s,n,i,o):yield jB0(s,n,i,o)})}function jB0(t,e,r){return PM(this,arguments,void 0,function*(s,n,i,o=!1){var a,c,u,p,l;let A=yield r3(),h=-1,M=yield hk(s);if(_("Cache Paths:"),_(`${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 e3(),y=gE.join(g,tA(A));_(`ArchivePath:${y}`)
Moreinfo:${c.url}`);let h=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:h}),M=!0;break}M||P(`Buildx.convertWarningsToGitHubAnnotations:skippingwarningwithoutmatchingDockerfile${u}:${l}`)}return a}};var J2=F(require("fs"),1),i$=F(require("path"),1);var aN=class t{buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new tt,this.iidFilename=`build-iidfile-${q0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${q0.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),s=e?.attrs||{},n=Object.entries(s).filter(([h])=>!r.has(h)),i=q0.parseBoolOrDefault(s["fetch-by-commit"]),o=e?.ref||s.ref||ms.ref;o.startsWith("refs/")?o.startsWith("refs/pull/")&&q0.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(o=o.replace(/\/merge$/g,"/head")):o=`refs/heads/${o}`;let a=`${D0.serverURL}/${ms.repo.owner}/${ms.repo.repo}.git`,c=e?.checksum||s.checksum,u=e?.subdir||s.subdir,p=e?.format;if(!p){if(p="fragment",n.length>0)p="query";else if(q0.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(p="query")}catch{}}let l=ms.sha||o;o.startsWith("refs/pull/")&&o.endsWith("/head")&&(l=typeof ms.payload.pull_request?.head?.sha=="string"?ms.payload.pull_request.head.sha:o);let A=c||l;if(p==="query"){let h=[`ref=${i||c?o:A}`],M=i?A:c;M&&h.push(`checksum=${M}`),u&&u!=="."&&h.push(`subdir=${u}`);for(let[g,y]of n)h.push(`${g}=${y}`);return`${a}?${h.join("&")}`}return`${a}#${A}${u&&u!=="."?`:${u}`:""}`}getImageIDFilePath(){return i$.default.join(E0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(J2.default.existsSync(e))return J2.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return i$.default.join(E0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!J2.default.existsSync(e))return;let r=J2.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,s]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${s}`}static resolveSecretFile(e){let[r,s]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${s}`}static resolveSecretEnv(e){let[r,s]=t.parseSecretKvp(e);return`id=${r},env=${s}`}static resolveSecret(e,r){let[s,n]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!J2.default.existsSync(n))throw new Error(`secretfile${n}notfound`);return[s,n]}let i=E0.tmpName({tmpdir:E0.tmpDir()});return J2.default.writeFileSync(i,n),[s,i]}static getProvenanceInput(e){let r=xb(e);if(!r)return r;try{return I2e(e)?`builder-id=${D0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${D0.workflowRunURL(!0)}`;let r=O1(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=${D0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let s="registry",n="",i="",o=O1(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=${D0.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExporterType("tar",e)}stat
`),{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=O1(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=O1(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let n of r)for(let i of n)try{let o=q0.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&&SO(i),[n,i]}};var o$=F(require("fs"),1),vqe=F(require("path"),1);var cN=class t{buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new tt,this.metadataFilename=`bake-metadata-${q0.generateRandomString()}.json`}getMetadataFilePath(){return vqe.default.join(E0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!o$.default.existsSync(e))return;let r=o$.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(!q0.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.vars)for(let c of e.vars)s.push("--var",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 Le.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=O1(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=q0.parseBool(o);break;default:r[i]=o}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=O1(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(n=>n.trim()).filter(n=>n.length>0);return s}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var XLe=require("crypto"),uu=F(require("fs"),1),ud=F(require("path"),1);var c4=F(jE(),1),pu=F(vxe(),1),VLe=F(Yte(),1),Ug=F(LLe(),1);var $1e=F(jE(),1);var QLe=F(sa(),1);var PLe="application/vnd.oci.empty.v1+json";var al=class{binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await Le.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(P(`Cosign.isAvailablecmderr:${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(P(`Cosign.isAvailableerror:${r}`),!1));return P(`Cosign.isAvailable:${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await Le.getExecOutput(this.binPath,["version","--json"],{ignoreReturnCode:!0,silent:!0}).then(e=>{if(e.stderr.length>0&&e.exitCode!=0)throw new Error(e.stderr.trim());return JSON.parse(e.stdout.trim()).gitVersion}),this._version)}async printVersion(){await Le.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let s=r??await this.version();if(!s)return P("Cosign.versionSatisfies false: undefined version"),!1;let n=QLe.satisfies(s,e)||/^[0-9a-f]{7}$/.exec(s)!==null;return P(`Cosign.versionSatisfies${s}statisfies${e}:${n}`),n}static parseCommandOutput(e){let r,s,n,i;for(let o of e.split(/\r?\n/)){let a=o.trim();if(!a.startsWith("{")||!a.endsWith("}"))continue;let c;try{c=JSON.parse(a)}catch{continue}if(c&&Array.isArray(c.errors)&&c.errors.length>0&&(i=c.errors),!r&&c&&Array.isArray(c.manifests)&&c.manifests.length>0){let u=c.manifests[0];u?.artifactType===$1e.BUNDLE_V03_MEDIA_TYPE&&typeof u.digest=="string"?r=u.digest:u?.artifactType===PLe&&typeof u.digest=="string"&&(s=u.digest)}if(!n&&c&&c.mediaType===$1e.BUNDLE_V03_MEDIA_TYPE&&(n=c),n&&(r||s)){i=void 0;break}}return{bundle:n,signatureManifestDigest:r||s,errors:i}}};var Y1e=F(require("fs"),1);var fx=class t{buildx;constructor(e){this.buildx=e?.buildx||new tt}async getCommand(e){return await this.buildx.getCommand(["imagetools",...e])}async getInspectCommand(e){return await this.getCommand(["inspect",...e])}async getCreateCommand(e){return await this.getCommand(["create",...e])}async inspectImage(e){return await this.inspect(e,"{{json .Image}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"config"),r;throw new Error("Unexpected output format")})}async inspectManifest(e){return await this.inspect(e,"{{json .Manifest}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"manifests"),r;throw new Error("Unexpected output format")})}async attestationDescriptors(e){let r=await this.inspectManifest(e);if(typeof r!="object"||r===null||!("manifests"in r)||!Array.isArray(r.manifests))throw new Error(`Nodescriptorfoundfor${e.name}`);let s=r.manifests.filter(o=>o.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return s;let n=e.platform,i=new Map;for(let o of r.manifests)o.digest&&i.set(o.digest,o);return s.filter(o=>{let a=o.annotations?.["vnd.docker.reference.digest"];if(!a)return!1;let c=i.get(a);return c?c.platform?.os===n.os&&c.platform?.architecture===n.architecture&&(c.platform?.variant??"")===(n.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],s=E0.tmpName({tmpdir:E0.tmpDir(),template:"imagetools-metadata-XXXXXX"}),n=[],i=[];for(let a of e.sources){if(a.startsWith("cwd://")){let c=a.substring(6);c.length>0&&n.push(c);continue}i.push(a)}if(e.tags)for(let a of e.tags)r.push("--tag",a);if(e.platforms)for(let a of e.platforms)r.push("--platform",a);if(e.annotations)for(let a of e.annotations)r.push("--annotation",a);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",s);for(let a of n)r.push("--file",a);for(let a of i)r.push(a);let o=await this.getCreat
${o.message}`),await new Promise(u=>setTimeout(u,Math.pow(2,a)*100))}throw o??new Error(`ImageToolsinspectcommandfailedfor${e.name}`)}async execInspect(e,r,s){return await Le.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(n=>{if(n.stderr.length>0&&n.exitCode!=0)throw new Error(n.stderr.trim());return s(JSON.parse(n.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown|not found: not found)/i.test(e)}};var kLe="application/vnd.in-toto+json";var ULe="https://fulcio.sigstore.dev",GLe="https://rekor.sigstore.dev",HLe="https://timestamp.sigstore.dev",rh="https://search.sigstore.dev";var xZ0="slsaprovenance1",pd=class t{cosign;imageTools;constructor(e){this.cosign=e?.cosign||new al,this.imageTools=e?.imageTools||new fx}async signAttestationManifests(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign attestation manifests");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let s=this.signingEndpoints(e.noTransparencyLog);G(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let n=t.noTransparencyLog(e.noTransparencyLog),i=[];await this.cosign.versionSatisfies(">=3.0.4")?await $l("Creating Sigstore protobuf signing config",async()=>{let o=E0.tmpName({template:"signing-config-XXXXXX.json",tmpdir:E0.tmpDir()}),a=["signing-config","create","--with-default-services=true",`--out=${o}`];n&&a.push("--no-default-rekor=true"),await Le.exec(this.cosign.binPath,a,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),G(JSON.stringify(JSON.parse(uu.default.readFileSync(o,{encoding:"utf-8"})),null,2)),i.push(`--signing-config=${o}`)}):(i.push("--use-signing-config"),n&&i.push("--tlog-upload=false"));for(let o of e.imageNames){let a=await this.imageTools.attestationDigests({name:`${o}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let c of a){let u=`${o}@${c}`;await $l(`Signingattestationmanifest${u}`,async()=>{let p=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...i];G(`[command]${this.cosign.binPath}${[...p,u].join(" ")}`);let l=await Le.getExecOutput(this.cosign.binPath,["--verbose",...p,u],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),A=al.parseCommandOutput(l.stderr.trim());if(l.exitCode!=0)if(A.errors&&A.errors.length>0){let M=A.errors.map(g=>`-[${g.code}]${g.message}:${g.detail}`).join(`
${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);G(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let n=t.getProvenanceBlobs(e);for(let i of Object.keys(n))await $l(`Signing${i}`,async()=>{let o=n[i],a=ud.default.join(ud.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),c=t.getProvenanceSubjects(o);if(c.length===0){Ri(`Nosubjectsfoundinprovenance${i},skipsigning.`);return}let u=await t.signPayload({data:o,type:kLe},s),p=t.parseBundle(u);G("Provenance blob signed for:");for(let l of c){let[A,h]=Object.entries(l.digest)[0]||[];G(`-${l.name}(${A}:${h})`)}p.tlogID&&G(`AttestationsignatureuploadedtoRekortransparencylog:${rh}?logIndex=${p.tlogID}`),G(`WritingSigstorebundleto:${a}`),uu.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=ud.default.dirname(n);await $l(`Verifyingsignaturebundle${i.bundlePath}`,async()=>{for(let a of i.subjects){let c=ud.default.join(o,a.name);G(`Verifyingsignedartifact${c}`);let u=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??xZ0];(r.noTransparencyLog||!i.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let p=await Le.getExecOutput(this.cosign.binPath,[...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){G("Verifying keyless verification bundle signature");let n=JSON.parse(uu.default.readFileSync(r,"utf-8")),i=(0,c4.bundleFromJSON)(n);G("Fetching Sigstore TUF trusted root metadata");let o=await VLe.getTrustedRoot(),a=(0,Ug.toTrustMaterial)(o);try{G("Verifying artifact signature");let c=(0,Ug.toSignedEntity)(i,uu.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 h=new Ug.Verifier(a).verify(c,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return P(`Sigstore.verifyArtifactsigner:${JSON.stringify(h)}`),{payload:n,certificate:u.toString(),tlogID:l}}catch(c){throw new Error(`Failedtoverifyartifactsignature:${c}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),G(`Uploadtotransparencylog:${e?"disabled":"enabled"}`),{fulcioURL:ULe,rekorURL:e?void 0:GLe,tsaServerURL:HLe}}static noTransparencyLog(e){return e??D0.context.payload.repository?.private}static getProvenanceBlobs(e){let r=ud.default.join(e.localExportDir,"provenance.json");if(uu.default.existsSync(r))return{[r]:uu.default.readFileSync(r)};let s=uu.default.readdirSync(e.localExportDir,{withFileTypes:!0}),n=s.filter(i=>i.isDirectory());if(n.length>0&&n.length===s.length&&n.every(i=>uu.default.existsSync(ud.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let o of n){let a=
`,bakeTarget:Zd("bake-target")||"docker-metadata-action",githubToken:Zd("github-token")}}async function ZLe(t,e){switch(t){case"workflow":return await WZ0(e);case"git":return await _Z0();default:throw new Error(`Invalidcontextsource:${t}`)}}async function WZ0(t){let e=D0.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 LZ0(e.sha,t),...e}}async function _Z0(){let t=await hp.context();return{commitDate:await hp.commitDate(t.sha),...t}}async function LZ0(t,e){let r=D0.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:D0.context.repo.owner,repo:D0.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 _(`FailedtogetcommitdatefromGitHubAPI:${s.message}`),new Date}}var ml=F(Zj(),1),FYe=F(require("fs"),1),TYe=F(require("path"),1),AB=F(i8e(),1),mi=F(Pje(),1),dz=F(RYe(),1);function SYe(t){let e=[];if(t.length==1){let r=!1,s=O1(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 wYe(e)}e=[];for(let r of t){let s={name:"",enable:!0},n=O1(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 wYe(e)}function wYe(t){e2("Processing images input");for(let e of t)ve(`name=${e.name},enable=${e.enable}`);return t2(),t}var kne=(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))(kne||{}),FW=(s=>(s.Branch="branch",s.Tag="tag",s.PR="pr",s))(FW||{}),TW=(r=>(r.Short="short",r.Long="long",r))(TW||{}),Qne=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(",")}},D2t={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function NYe(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(q2t(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);e2("Processing tags input");for(let s of r)ve(s.toString());return t2(),r}function q2t(t){let e=O1(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new Qne;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(kne).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(`Missi