varHje=Object.create;varfB=Object.defineProperty;varXje=Object.getOwnPropertyDescriptor;varVje=Object.getOwnPropertyNames;varjje=Object.getPrototypeOf,$je=Object.prototype.hasOwnProperty;varo=(t,e)=>fB(t,"name",{value:e,configurable:!0});varYje=(t,e)=>()=>(t&&(e=t(t=0)),e);varb=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Zne=(t,e)=>{for(varrine)fB(t,r,{get:e[r],enumerable:!0})},Jje=(t,e,r,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letsofVje(e))!$je.call(t,s)&&s!==r&&fB(t,s,{get:()=>e[s],enumerable:!(n=Xje(e,s))||n.enumerable});returnt};var_=(t,e,r)=>(r=t!=null?Hje(jje(t)):{},Jje(e||!t||!t.__esModule?fB(r,"default",{value:t,enumerable:!0}):r,t));varose=b(mh=>{"use strict";varEs0=require("net"),n$e=require("tls"),B_=require("http"),nse=require("https"),s$e=require("events"),ys0=require("assert"),i$e=require("util");mh.httpOverHttp=o$e;mh.httpsOverHttp=a$e;mh.httpOverHttps=c$e;mh.httpsOverHttps=u$e;functiono$e(t){vare=newlu(t);returne.request=B_.request,e}o(o$e,"httpOverHttp");functiona$e(t){vare=newlu(t);returne.request=B_.request,e.createSocket=sse,e.defaultPort=443,e}o(a$e,"httpsOverHttp");functionc$e(t){vare=newlu(t);returne.request=nse.request,e}o(c$e,"httpOverHttps");functionu$e(t){vare=newlu(t);returne.request=nse.request,e.createSocket=sse,e.defaultPort=443,e}o(u$e,"httpsOverHttps");functionlu(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||B_.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",o(function(n,s,i,a){for(varc=ise(s,i,a),u=0,p=e.requests.length;u<p;++u){varl=e.requests[u];if(l.host===c.host&&l.port===c.port){e.requests.splice(u,1),l.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)},"onFree"))}o(lu,"TunnelingAgent");i$e.inherits(lu,s$e.EventEmitter);lu.prototype.addRequest=o(function(e,r,n,s){vari=this,a=D_({request:e},i.options,ise(r,n,s));if(i.sockets.length>=this.maxSockets){i.requests.push(a);return}i.createSocket(a,function(c){c.on("free",u),c.on("close",p),c.on("agentRemove",p),e.onSocket(c);functionu(){i.emit("free",c,a)}o(u,"onFree");functionp(l){i.removeSocket(c),c.removeListener("free",u),c.removeListener("close",p),c.removeListener("agentRemove",p)}o(p,"onCloseOrRemove")})},"addRequest");lu.prototype.createSocket=o(function(e,r){varn=this,s={};n.sockets.push(s);vari=D_({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+newBuffer(i.proxyAuth).toString("base64")),ll("making CONNECT request");vara=n.request(i);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",u),a.once("connect",p),a.once("error",l),a.end();functionc(A){A.upgrade=!0}o(c,"onResponse");functionu(A,d,h){process.nextTick(function(){p(A,d,h)})}o(u,"onUpgrade");functionp(A,d,h){if(a.removeAllListeners(),d.removeAllListeners(),A.statusCode!==200){ll("tunneling socket could not be established, statusCode=%d",A.statusCode),d.destroy();varm=newError("tunneling socket could not be established, statusCode="+A.statusCode);m.code="ECONNRESET",e.request.emit("error",m),n.removeSocket(s);return}if(h.length>0){ll("got illegal response body from proxy"),d.destroy();varm=newError("got illegal response body from proxy");m.code="ECONNRESET",e.request.emit("error",m),n.removeSocket(s);return}returnll("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=d,r(d)}o(p,"onConnect");functionl(A){a.removeAllListeners(),ll(`tunneling socket could not be established, cause=%s
`);d.push(z),i+=z.byteLength,m&&(i=null),s=t,n=o(async function*(){for(let C of d)C.stream?yield*C.stream():yield C},"action"),a=`multipart/form-data;boundary=${u}`}else if(doe(t))s=t,i=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Oz.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:qKe(t)}if((typeof s=="string"||Oz.isBuffer(s))&&(i=Buffer.byteLength(s)),n!=null){let u;r=new ReadableStream({async start(){u=n(t)[Symbol.asyncIterator]()},async pull(p){let{value:l,done:A}=await u.next();if(A)queueMicrotask(()=>{p.close(),p.byobRequest?.respond(0)});else if(!Moe(r)){let d=new Uint8Array(l);d.byteLength&&p.enqueue(d)}return p.desiredSize>0},async cancel(p){await u.return()},type:"bytes"})}return[{stream:r,source:s,length:i},a]}o(zoe,"extractBody");function QKe(t,e=!1){return t instanceof ReadableStream&&(SW(!Oz.isDisturbed(t),"The body has already been consumed."),SW(!t.locked,"The stream is locked.")),zoe(t,e)}o(QKe,"safelyExtractBody");function PKe(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}o(PKe,"cloneBody");function kKe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(kKe,"throwIfAborted");function UKe(t){return{blob(){return Sh(this,r=>{let n=hoe(this);return n===null?n="":n&&(n=_Ke(n)),new FKe([r],{type:n})},t)},arrayBuffer(){return Sh(this,r=>new Uint8Array(r).buffer,t)},text(){return Sh(this,boe,t)},json(){return Sh(this,HKe,t)},formData(){return Sh(this,r=>{let n=hoe(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=WKe(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new foe;return i[Nh]=s,i}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),i=new foe;for(let[a,c]of s)i.append(a,c);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return Sh(this,r=>new Uint8Array(r),t)}}}o(UKe,"bodyMixinMethods");function GKe(t){Object.assign(t.prototype,UKe(t))}o(GKe,"mixinBody");async function Sh(t,e,r){if(vKe.brandCheck(t,r),Ooe(t))throw new TypeError("Body is unusable: Body has already been read");kKe(t[Nh]);let n=wKe(),s=o(a=>n.reject(a),"errorSteps"),i=o(a=>{try{n.resolve(e(a))}catch(c){s(c)}},"successSteps");return t[Nh].body==null?(i(Buffer.allocUnsafe(0)),n.promise):(await SKe(t[Nh].body,i,s),n.promise)}o(Sh,"consumeBody");function Ooe(t){let e=t[Nh].body;return e!=null&&(e.stream.locked||Oz.isDisturbed(e.stream))}o(Ooe,"bodyUnusable");function HKe(t){return JSON.parse(boe(t))}o(HKe,"parseJSONFromBytes");function hoe(t){let e=t[Nh].headersList,r=NKe(e);return r==="failure"?null:r}o(hoe,"bodyMimeType");Eoe.exports={extractBody:zoe,safelyExtractBody:QKe,cloneBody:PKe,mixinBody:GKe,streamRegistry:goe,hasFinalizationRegistry:moe,bodyUnusable:Ooe}});var Woe=b((bi0,_oe)=>{"use strict";var we=require("node:assert"),Fe=it(),{channels:yoe}=zh(),vW=fW(),{RequestContentLengthMismatchError:Ad,ResponseContentLengthMismatchError:Coe,RequestAbortedError:Noe,HeadersTimeoutError:XKe,HeadersOverflowError:VKe,SocketError:Fh,InformationalError:Th,BodyTimeoutError:jKe,HTTPParserError:$Ke,ResponseExceededMaxSizeError:YKe}=Et(),{kUrl:voe,kReset:Tn,kClient:VB,kParser:a0,kBlocking:Cz,kRunning:d1,kPending:Foe,kSize:Boe,kWriting:dl,kQueue:zo,kNoRef:Ez,kKeepAliveDefaultTimeout:JKe,kHostHeader:KKe,kPendingIdx:ZKe,kRunningIdx:fi,kError:jr,kPipelining:jB,kSocket:fd,kKeepAliveTimeoutValue:YB,kMaxHeadersSize:FW,kKeepAliveMaxTimeout:eZe,kKeepAliveTimeoutThreshold:tZe,kHeadersTimeout:rZe,kBodyTimeout:nZe,kStrictContentLength:_W,kMaxRequests:Doe,kCounter:sZe,kMaxResponseSize:iZe,kOnError:qoe,kResume:Mu,kHTTPContext:Toe}=h0(),zs=gie(),Ioe=Buffer.alloc(0),GB=Buffer[Symbol.species],HB=Fe.addListener,oZe=Fe.removeAllListeners,hd=Symbol("kIdleSocketValidation"),dd=Symbol("kIdleSocketValidationTimeout"),PW=Symbol("kSocketUsed"),TW;async function aZe(){let t=p
`}return yoe.sendHeaders.hasSubscribers&&yoe.sendHeaders.publish({request:e,headers:z,socket:h}),!u||d===0?woe(m,null,t,e,h,l,z,A):Fe.isBuffer(u)?woe(m,u,t,e,h,l,z,A):Fe.isBlobLike(u)?typeof u.stream=="function"?Soe(m,u.stream(),t,e,h,l,z,A):hZe(m,u,t,e,h,l,z,A):Fe.isStream(u)?fZe(m,u,t,e,h,l,z,A):Fe.isIterable(u)?Soe(m,u,t,e,h,l,z,A):we(!1),!0}o(dZe,"writeH1");function fZe(t,e,r,n,s,i,a,c){we(i!==0||r[d1]===0,"stream body cannot be pipelined");let u=!1,p=new JB({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:c,header:a}),l=o(function(m){if(!u)try{!p.write(m)&&this.pause&&this.pause()}catch(z){Fe.destroy(this,z)}},"onData"),A=o(function(){u||e.resume&&e.resume()},"onDrain"),d=o(function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!u){let m=new Noe;queueMicrotask(()=>h(m))}},"onClose"),h=o(function(m){if(!u){if(u=!0,we(s.destroyed||s[dl]&&r[d1]<=1),s.off("drain",A).off("error",h),e.removeListener("data",l).removeListener("end",h).removeListener("close",d),!m)try{p.end()}catch(z){m=z}p.destroy(m),m&&(m.code!=="UND_ERR_INFO"||m.message!=="reset")?Fe.destroy(e,m):Fe.destroy(e)}},"onFinished");e.on("data",l).on("end",h).on("error",h).on("close",d),e.resume&&e.resume(),s.on("drain",A).on("error",h),e.errorEmitted??e.errored?setImmediate(()=>h(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>h(null)),(e.closeEmitted??e.closed)&&setImmediate(d)}o(fZe,"writeStream");function woe(t,e,r,n,s,i,a,c){try{e?Fe.isBuffer(e)&&(we(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${a}content-length:${i}\r
`,"latin1"):(we(i===null,"no body must not have content length"),s.write(`${a}\r
`,"latin1")),n.onRequestSent(),r[Mu]()}catch(u){t(u)}}o(woe,"writeBuffer");async function hZe(t,e,r,n,s,i,a,c){we(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new Ad;let u=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${a}content-length:${i}\r
`,"latin1"),s.write(u),s.uncork(),n.onBodySent(u),n.onRequestSent(),!c&&n.reset!==!1&&(s[Tn]=!0),r[Mu]()}catch(u){t(u)}}o(hZe,"writeBlob");async function Soe(t,e,r,n,s,i,a,c){we(i!==0||r[d1]===0,"iterator body cannot be pipelined");let u=null;function p(){if(u){let d=u;u=null,d()}}o(p,"onDrain");let l=o(()=>new Promise((d,h)=>{we(u===null),s[jr]?h(s[jr]):u=d}),"waitForDrain");s.on("close",p).on("drain",p);let A=new JB({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:c,header:a});try{for await(let d of e){if(s[jr])throw s[jr];A.write(d)||await l()}A.end()}catch(d){A.destroy(d)}finally{s.off("close",p).off("drain",p)}}o(Soe,"writeIterable");var JB=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[dl]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:a,expectsPayload:c,header:u}=this;if(r[jr])throw r[jr];if(r.destroyed)return!1;let p=Buffer.byteLength(e);if(!p)return!0;if(s!==null&&a+p>s){if(i[_W])throw new Ad;process.emitWarning(new Ad)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[Tn]=!0),s===null?r.write(`${u}transfer-encoding:chunked\r
`,"latin1"),r!==null&&s!==r){if(n[_W])throw new Ad;process.emitWarning(new Ad)}e[a0].timeout&&e[a0].timeoutType===xh&&e[a0].timeout.refresh&&e[a0].timeout.refresh(),n[Mu]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[dl]=!1,e&&(we(n[d1]<=1,"pipeline should only contain this request"),s(e))}};_oe.exports=uZe});var Xoe=b((mi0,Hoe)=>{"use strict";var hi=require("node:assert"),{pipeline:bZe}=require("node:stream"),lt=it(),{RequestContentLengthMismatchError:kW,RequestAbortedError:Loe,SocketError:Bz,InformationalError:UW}=Et(),{kUrl:KB,kReset:eD,kClient:_h,kRunning:tD,kPending:MZe,kQueue:fl,kPendingIdx:GW,kRunningIdx:Oo,kError:yo,kSocket:S1,kStrictContentLength:mZe,kOnError:HW,kMaxConcurrentStreams:Goe,kHTTP2Session:Eo,kResume:hl,kSize:gZe,kHTTPContext:zZe}=h0(),mu=Symbol("open streams"),Qoe,Poe=!1,ZB;try{ZB=require("node:http2")}catch{ZB={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:OZe,HTTP2_HEADER_METHOD:EZe,HTTP2_HEADER_PATH:yZe,HTTP2_HEADER_SCHEME:CZe,HTTP2_HEADER_CONTENT_LENGTH:BZe,HTTP2_HEADER_EXPECT:DZe,HTTP2_HEADER_STATUS:qZe}}=ZB;function IZe(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}o(IZe,"parseH2Headers");async function RZe(t,e){t[S1]=e,Poe||(Poe=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=ZB.connect(t[KB],{createConnection:o(()=>e,"createConnection"),peerMaxConcurrentStreams:t[Goe]});r[mu]=0,r[_h]=t,r[S1]=e,lt.addListener(r,"error",SZe),lt.addListener(r,"frameError",NZe),lt.addListener(r,"end",vZe),lt.addListener(r,"goaway",FZe),lt.addListener(r,"close",function(){let{[_h]:s}=this,{[S1]:i}=s,a=this[S1][yo]||this[yo]||new Bz("closed",lt.getSocketInfo(i));if(s[Eo]=null,s.destroyed){hi(s[MZe]===0);let c=s[fl].splice(s[Oo]);for(let u=0;u<c.length;u++){let p=c[u];lt.errorRequest(s,p,a)}}}),r.unref(),t[Eo]=r,e[Eo]=r,lt.addListener(e,"error",function(s){hi(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[yo]=s,this[_h][HW](s)}),lt.addListener(e,"end",function(){lt.destroy(this,new Bz("other side closed",lt.getSocketInfo(this)))}),lt.addListener(e,"close",function(){let s=this[yo]||new Bz("closed",lt.getSocketInfo(this));t[S1]=null,this[Eo]!=null&&this[Eo].destroy(s),t[GW]=t[Oo],hi(t[tD]===0),t.emit("disconnect",t[KB],[t],s),t[hl]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return xZe(t,...s)},resume(){wZe(t)},destroy(s,i){n?queueMicrotask(i):e.destroy(s).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}o(RZe,"connectH2");function wZe(t){let e=t[S1];e?.destroyed===!1&&(t[gZe]===0&&t[Goe]===0?(e.unref(),t[Eo].unref()):(e.ref(),t[Eo].ref()))}o(wZe,"resumeH2");function SZe(t){hi(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[S1][yo]=t,this[_h][HW](t)}o(SZe,"onHttp2SessionError");function NZe(t,e,r){if(r===0){let n=new UW(`HTTP/2:"frameError"received-type${t},code${e}`);this[S1][yo]=n,this[_h][HW](n)}}o(NZe,"onHttp2FrameError");function vZe(){let t=new Bz("other side closed",lt.getSocketInfo(this[S1]));this.destroy(t),lt.destroy(this[S1],t)}o(vZe,"onHttp2SessionEnd");function FZe(t){let e=this[yo]||new Bz(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,lt.getSocketInfo(this)),r=this[_h];if(r[S1]=null,r[zZe]=null,this[Eo]!=null&&(this[Eo].destroy(e),this[Eo]=null),lt.destroy(this[S1],e),r[Oo]<r[fl].length){let n=r[fl][r[Oo]];r[fl][r[Oo]++]=null,lt.errorRequest(r,n,e),r[GW]=r[Oo]}hi(r[tD]===0),r.emit("disconnect",r[KB],[r],e),r[hl]()}o(FZe,"onHTTP2GoAway");function TZe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(TZe,"shouldSendContentLength");function xZe(t,e){let r=t[Eo],{method:n,path:s,host:i,upgrade:a,expectContinue:c,signal:u,headers:p}=e,{body:l}=e;if(a)return lt.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let A={};for(let w=0;w<p.length;w+=2){let N=p[w+0],x=p[w+1];if(Array.isArray(x))for(let Q=0;Q<x.length;Q++)A[N]?A[N]+=`,${x[Q]}`:A[N]=x[Q];else A[N]=x}let d,{hostname:h,port:m}=t[KB];A[OZ
globstarwhile`,t,l,e,A,d),this.matchOne(t.slice(l),e.slice(A),r))return this.debug("globstar found match!",l,a,d),!0;if(d==="."||d===".."||!n.dot&&d.charAt(0)==="."){this.debug("dot detected!",t,l,e,A);break}this.debug("globstar swallow a segment, and continue"),l++}return!!(r&&(this.debug(`
`;if(n.username||n.password){let d=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(d).toString("base64")}`}i.Host=`${a}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(i))c+=`${d}:${i[d]}\r
`)+4,e.outputData[0].data=e._header+n.substring(s),_b("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(_b("Creating `tls.Socket`: %o",this.connectOpts),i=hft.connect(this.connectOpts)):(_b("Creating `net.Socket`: %o",this.connectOpts),i=fft.connect(this.connectOpts)),await(0,Mft.once)(i,"connect"),i}};RI.protocols=["http","https"];wi.HttpProxyAgent=RI;function gft(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(gft,"omit")});var zme=b(UI=>{"use strict";Object.defineProperty(UI,"__esModule",{value:!0});UI.state=void 0;UI.state={instrumenterImplementation:void 0}});var _me=b(jI=>{"use strict";Object.defineProperty(jI,"__esModule",{value:!0});jI.state=void 0;jI.state={operationRequestMap:new WeakMap}});var hOe=b(tM=>{"use strict";Object.defineProperty(tM,"__esModule",{value:!0});var Lgt=require("os"),Qgt=require("util");function Pgt(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}o(Pgt,"_interopDefaultLegacy");var kgt=Pgt(Qgt);function Ugt(t,...e){process.stderr.write(`${kgt.default.format(t,...e)}${Lgt.EOL}`)}o(Ugt,"log");var iOe=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,aOe,NG=[],vG=[],d5=[];iOe&&FG(iOe);var cOe=Object.assign(t=>uOe(t),{enable:FG,enabled:TG,disable:Ggt,log:Ugt});function FG(t){aOe=t,NG=[],vG=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?vG.push(new RegExp(`^${n.substr(1)}$`)):NG.push(new RegExp(`^${n}$`));for(let n of d5)n.enabled=TG(n.namespace)}o(FG,"enable");function TG(t){if(t.endsWith("*"))return!0;for(let e of vG)if(e.test(t))return!1;for(let e of NG)if(e.test(t))return!0;return!1}o(TG,"enabled");function Ggt(){let t=aOe||"";return FG(""),t}o(Ggt,"disable");function uOe(t){let e=Object.assign(r,{enabled:TG(t),destroy:Hgt,log:cOe.log,namespace:t,extend:Xgt});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t}${n[0]}`),e.log(...n))}return o(r,"debug"),d5.push(e),e}o(uOe,"createDebugger");function Hgt(){let t=d5.indexOf(this);return t>=0?(d5.splice(t,1),!0):!1}o(Hgt,"destroy");function Xgt(t){let e=uOe(`${this.namespace}:${t}`);return e.log=this.log,e}o(Xgt,"extend");var x3=cOe,pOe=new Set,l5=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,f5,h5=x3("azure");h5.log=(...t)=>{x3.log(...t)};var xG=["verbose","info","warning","error"];l5&&(fOe(l5)?lOe(l5):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${l5}';loggingisnotenabled.Acceptablevalues:${xG.join(", ")}.`));function lOe(t){if(t&&!fOe(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${xG.join(",")}`);f5=t;let e=[];for(let r of pOe)dOe(r)&&e.push(r.namespace);x3.enable(e.join(","))}o(lOe,"setLogLevel");function Vgt(){return f5}o(Vgt,"getLogLevel");var oOe={verbose:400,info:300,warning:200,error:100};function jgt(t){let e=h5.extend(t);return AOe(h5,e),{error:A5(e,"error"),warning:A5(e,"warning"),info:A5(e,"info"),verbose:A5(e,"verbose")}}o(jgt,"createClientLogger");function AOe(t,e){e.log=(...r)=>{t.log(...r)}}o(AOe,"patchLogMethod");function A5(t,e){let r=Object.assign(t.extend(e),{level:e});if(AOe(t,r),dOe(r)){let n=x3.disable();x3.enable(n+","+r.namespace)}return pOe.add(r),r}o(A5,"createLogger");function dOe(t){return!!(f5&&oOe[t.level]<=oOe[f5])}o(dOe,"shouldEnable");function fOe(t){return xG.includes(t)}o(fOe,"isAzureLogLevel");tM.AzureLogger=h5;tM.createClientLogger=jgt;tM.getLogLevel=Vgt;tM.setLogLevel=lOe});var LG=b(W3=>{"use strict";Object.defineProperty(W3,"__esModule",{value:!0});var rM=new WeakMap,b5=new WeakMap,_3=class t{static{o(this,"AbortSignal")}constructor(){this.onabort=null,rM.set(this,[]),b5.set(this,!1)}get aborted(){if(!b5.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return b5.get(this)}static get none(){return new t}addEventListener(e,r){if(!rM.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");rM.get(this).push(r)}removeEventListener(e,r){if(!rM.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=rM.get(this),s=n.indexOf(r);s>-
Seehttps://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}o(c4t,"logUnexpecedPropertyAccessOnce");function u4t(){Object.keys(Jw).forEach(function(t){delete Jw[t]})}o(u4t,"resetLoggedProperties")});var Zw=b(pc=>{"use strict";pc.__esModule=!0;pc.HandlebarsEnvironment=dV;function aCe(t){return t&&t.__esModule?t:{default:t}}o(aCe,"_interopRequireDefault");var I2=ln(),p4t=js(),lV=aCe(p4t),l4t=aV(),A4t=nCe(),d4t=uV(),Kw=aCe(d4t),f4t=pV(),h4t="4.7.9";pc.VERSION=h4t;var b4t=8;pc.COMPILER_REVISION=b4t;var M4t=7;pc.LAST_COMPATIBLE_COMPILER_REVISION=M4t;var m4t={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"};pc.REVISION_CHANGES=m4t;var AV="[object Object]";function dV(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},l4t.registerDefaultHelpers(this),A4t.registerDefaultDecorators(this)}o(dV,"HandlebarsEnvironment");dV.prototype={constructor:dV,logger:Kw.default,log:Kw.default.log,registerHelper:o(function(e,r){if(I2.toString.call(e)===AV){if(r)throw new lV.default("Arg not supported with multiple helpers");I2.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:o(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:o(function(e,r){if(I2.toString.call(e)===AV)I2.extend(this.partials,e);else{if(typeof r>"u")throw new lV.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:o(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:o(function(e,r){if(I2.toString.call(e)===AV){if(r)throw new lV.default("Arg not supported with multiple decorators");I2.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:o(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:o(function(){f4t.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var g4t=Kw.default.log;pc.log=g4t;pc.createFrame=I2.createFrame;pc.logger=Kw.default});var uCe=b((eS,cCe)=>{"use strict";eS.__esModule=!0;function fV(t){this.string=t}o(fV,"SafeString");fV.prototype.toString=fV.prototype.toHTML=function(){return""+this.string};eS.default=fV;cCe.exports=eS.default});var pCe=b(hV=>{"use strict";hV.__esModule=!0;hV.wrapHelper=z4t;function z4t(t,e){if(typeof t!="function")return t;var r=o(function(){var s=arguments[arguments.length-1];return arguments[arguments.length-1]=e(s),t.apply(this,arguments)},"wrapper");return r}o(z4t,"wrapHelper")});var bCe=b(nA=>{"use strict";nA.__esModule=!0;nA.checkRevision=D4t;nA.template=q4t;nA.wrapProgram=tS;nA.resolvePartial=I4t;nA.invokePartial=R4t;nA.noop=fCe;function O4t(t){return t&&t.__esModule?t:{default:t}}o(O4t,"_interopRequireDefault");function E4t(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}o(E4t,"_interopRequireWildcard");var y4t=ln(),wM=E4t(y4t),C4t=js(),Ku=O4t(C4t),Zu=Zw(),lCe=aV(),B4t=pCe(),ACe=pV();function D4t(t){var e=t&&t[0]||1,r=Zu.COMPILER_REVISION;if(!(e>=Zu.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Zu.COMPILER_REVISION))if(e<Zu.LAST_COMPATIBLE_COMPILER_REVISION){var n=Zu.REVISION_CHANGES[r],s=Zu.REVISION_CHANGES[e];throw new Ku.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+s+").")}else throw new Ku.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}o(D4t,"checkRevision");function q4t(t,e){if(!e)throw new Ku.default("No environment passed to template");if(!t||!t.main)throw new Ku.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 n(a,c,u){u.hash&&(c=wM.extend({},c,u.hash),u.ids&&(u.ids[0]=!0)),a=e.VM.res
`+a+"^"},"showPosition"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,c,u,p,l;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),d=0;d<A.length&&(c=this._input.match(this.rules[A[d]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,u=d,!this.options.flex)));d++);return a?(l=a[0].match(/(?:\r\n?|\n).*/g),l&&(this.yylineno+=l.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:l?l[l.length-1].length-l[l.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],i=this.performAction.call(this,this.yy,this,A[u],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`.Unrecognizedtext.
${y6(p)}${p}`)}catch(p){if(p.code==="ENOENT")return;throw p}return C6(t,u)}o(Owe,"insert");si.exports.find=Gvt;async function Gvt(t,e){let r=wy(t,e);try{return(await E6(r)).reduce((s,i)=>i&&i.key===e?C6(t,i):s,null)}catch(n){if(n.code==="ENOENT")return null;throw n}}o(Gvt,"find");si.exports.delete=Hvt;function Hvt(t,e,r={}){if(!r.removeFully)return Owe(t,e,null,r);let n=wy(t,e);return zwe(n,{recursive:!0,force:!0})}o(Hvt,"del");si.exports.lsStream=Ewe;function Ewe(t){let e=jJ(t),r=new xvt({objectMode:!0});return Promise.resolve().then(async()=>{let{default:n}=await Promise.resolve().then(()=>(O6(),z6)),s=await XJ(e);return await n(s,async i=>{let a=wc.join(e,i),c=await XJ(a);await n(c,async u=>{let p=wc.join(a,u),l=await XJ(p);await n(l,async A=>{let d=wc.join(p,A);try{let m=(await E6(d)).reduce((z,C)=>(z.set(C.key,C),z),new Map);for(let z of m.values()){let C=C6(t,z);C&&r.write(C)}}catch(h){if(h.code==="ENOENT")return;throw h}},{concurrency:HJ})},{concurrency:HJ})},{concurrency:HJ}),r.end(),r}).catch(n=>r.emit("error",n)),r}o(Ewe,"lsStream");si.exports.ls=Xvt;async function Xvt(t){return(await Ewe(t).collect()).reduce((r,n)=>(r[n.key]=n,r),{})}o(Xvt,"ls");si.exports.bucketEntries=E6;async function E6(t,e){let r=await vvt(t,"utf8");return Vvt(r,e)}o(E6,"bucketEntries");function Vvt(t){let e=[];return t.split(`
`).forEach(r=>{if(!r)return;let n=r.split(" ");if(!n[1]||y6(n[1])!==n[0])return;let s;try{s=JSON.parse(n[1])}catch{}s&&e.push(s)}),e}o(Vvt,"_bucketEntries");si.exports.bucketDir=jJ;function jJ(t){return wc.join(t,`index-v${Pvt}`)}o(jJ,"bucketDir");si.exports.bucketPath=wy;function wy(t,e){let r=ywe(e);return wc.join.apply(wc,[jJ(t)].concat(Qvt(r)))}o(wy,"bucketPath");si.exports.hashKey=ywe;function ywe(t){return Cwe(t,"sha256")}o(ywe,"hashKey");si.exports.hashEntry=y6;function y6(t){return Cwe(t,"sha1")}o(y6,"hashEntry");function Cwe(t,e){return Svt.createHash(e).update(t).digest("hex")}o(Cwe,"hash");function C6(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?Lvt(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}o(C6,"formatEntry");function XJ(t){return Fvt(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}o(XJ,"readdirOrEmpty")});var Om=b(D6=>{"use strict";Object.defineProperty(D6,"__esModule",{value:!0});D6.LRUCache=void 0;var jvt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Dwe=new Set,$J=typeof process=="object"&&process?process:{},qwe=o((t,e,r,n)=>{typeof $J.emitWarning=="function"?$J.emitWarning(t,e,r,n):console.error(`[${r}]${e}:${t}`)},"emitWarning"),B6=globalThis.AbortController,Bwe=globalThis.AbortSignal;if(typeof B6>"u"){Bwe=class{static{o(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(n,s){this._onabort.push(s)}},B6=class{static{o(this,"AbortController")}constructor(){e()}signal=new Bwe;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let s of this.signal._onabort)s(n);this.signal.onabort?.(n)}}};let t=$J.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=o(()=>{t&&(t=!1,qwe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var $vt=o(t=>!Dwe.has(t),"shouldWarn"),OA=o(t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),"isPosInt"),Iwe=o(t=>OA(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?zm:null:null,"getUintArray"),zm=class extends Array{static{o(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},YJ=class t{static{o(this,"Stack")}heap;length;static#e=!1;static create(e){let r=Iwe(e);if(!r)return[];t.#e=!0;let n=new t(e,r);return t.#e=!1,n}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]}},JJ=class t{static{o(this,"LRUCache")}#e;#t;#n;#r;#s;#i;#a;#o;get perf(){return this.#o}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#c;#l;#A;#d;#u;#b;#O;#M;#m;#B;#g;#y;#C;#h;#E;#D;#z;#p;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#h,sizes:e.#y,keyMap:e.#A,keyList:e.#d,valList:e.#u,next:e.#b,prev:e.#O,get head(){return e.#M},get tail(){return e.#m},free:e.#B,isBackgroundFetch:o(r=>e.#f(r),"isBackgroundFetch"),backgroundFetch:o((r,n,s,i)=>e.#U(r,n,s,i),"backgroundFetch"),moveToTail:o(r=>e.#_(r),"moveToTail"),indexes:o(r=>e.#w(r),"indexes"),rindexes:o(r=>e.#N(r),"rindexes"),isStale:o(r=>e.#I(r),"isStale")}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#c}get fetchMethod(){return this.#i}get memoMethod(){return this.#a}get dispose(){return this.#n}get onInsert(){return this.#r}get disposeAfter(){return this.#s}constructor(e){let{max:r=0,ttl:n,ttlResolution
globstarwhile`,e,d,r,h,m),this.matchOne(e.slice(d),r.slice(h),n))return this.debug("globstar found match!",d,u,m),!0;if(m==="."||m===".."||!s.dot&&m.charAt(0)==="."){this.debug("dot detected!",e,d,r,h);break}this.debug("globstar swallow a segment, and continue"),d++}return!!(n&&(this.debug(`
`;if(n.username||n.password){let d=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(d).toString("base64")}`}i.Host=`${a}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(i))c+=`${d}:${i[d]}\r
`);let{connect:p,buffered:l}=await u;if(e.emit("proxyConnect",p),this.emit("proxyConnect",p,e),p.statusCode===200){if(e.once("socket",zWt),r.secureEndpoint){pC("Upgrading socket connection to TLS");let d=r.servername||r.host;return QNe.connect({...PNe(r,"host","path","port"),socket:s,servername:uC.isIP(d)?void 0:d})}return s}s.destroy();let A=new uC.Socket({writable:!1});return A.readable=!0,e.once("socket",d=>{pC("Replaying proxy buffer for failed request"),(0,hWt.default)(d.listenerCount("data")>0),d.push(l),d.push(null)}),A}};Rv.protocols=["http","https"];to.HttpsProxyAgent=Rv;function zWt(t){t.resume()}o(zWt,"resume");function PNe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(PNe,"omit")});var jNe=b(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var HNe=require("buffer"),Mf={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."};Pp.ERRORS=Mf;function OWt(t){if(!HNe.Buffer.isEncoding(t))throw new Error(Mf.INVALID_ENCODING)}o(OWt,"checkEncoding");Pp.checkEncoding=OWt;function XNe(t){return typeof t=="number"&&isFinite(t)&&BWt(t)}o(XNe,"isFiniteInteger");Pp.isFiniteInteger=XNe;function VNe(t,e){if(typeof t=="number"){if(!XNe(t)||t<0)throw new Error(e?Mf.INVALID_OFFSET:Mf.INVALID_LENGTH)}else throw new Error(e?Mf.INVALID_OFFSET_NON_NUMBER:Mf.INVALID_LENGTH_NON_NUMBER)}o(VNe,"checkOffsetOrLengthValue");function EWt(t){VNe(t,!1)}o(EWt,"checkLengthValue");Pp.checkLengthValue=EWt;function yWt(t){VNe(t,!0)}o(yWt,"checkOffsetValue");Pp.checkOffsetValue=yWt;function CWt(t,e){if(t<0||t>e.length)throw new Error(Mf.INVALID_TARGET_OFFSET)}o(CWt,"checkTargetOffset");Pp.checkTargetOffset=CWt;function BWt(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}o(BWt,"isInteger");function DWt(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof HNe.Buffer.prototype[t]>"u")throw new Error(`PlatformdoesnotsupportBuffer.prototype.${t}.`)}o(DWt,"bigIntAndBufferInt64Check");Pp.bigIntAndBufferInt64Check=DWt});var YNe=b(dZ=>{"use strict";Object.defineProperty(dZ,"__esModule",{value:!0});var nt=jNe(),$Ne=4096,qWt="utf8",AZ=class t{static{o(this,"SmartBuffer")}constructor(e){if(this.length=0,this._encoding=qWt,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(nt.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(nt.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(nt.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(nt.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe($Ne);else{if(typeof e<"u")throw new Error(nt.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe($Ne)}}static fromSize(e,r){return new this({size:e,encoding:r})}static fromBuffer(e,r){return new this({buff:e,encoding:r})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let r=e;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}read
`,FHt=/\u2014 (\S+) (\S+)\n/g;function THt(t,e){let r=t.inclusionProof,n=T0e.fromString(r.checkpoint.envelope),s=qT.fromString(n.note);if(!xHt(n,e))throw new UC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return s}o(THt,"verifyCheckpoint");function xHt(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(n=>{let s=e.find(i=>Bxe.crypto.bufferEqual(i.logID.subarray(0,4),n.keyHint)&&i.baseURL.match(n.name));return s?Bxe.crypto.verify(r,s.publicKey,n.signature):!1})}o(xHt,"verifySignedNote");var T0e=class t{static{o(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(F0e))throw new UC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(F0e),n=e.slice(0,r+1),i=e.slice(r+F0e.length).matchAll(FHt),a=Array.from(i,c=>{let[,u,p]=c,l=Buffer.from(p,"base64");if(l.length<5)throw new UC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:u,keyHint:l.subarray(0,4),signature:l.subarray(4)}});if(a.length===0)throw new UC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(n,a)}},qT=class t{static{o(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,n,s){this.origin=e,this.logSize=r,this.logHash=n,this.rest=s}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new UC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let n=r[0],s=BigInt(r[1]),i=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(n,s,i,a)}};GC.LogCheckpoint=qT});var qxe=b(L0e=>{"use strict";Object.defineProperty(L0e,"__esModule",{value:!0});L0e.verifyMerkleInclusion=LHt;var W0e=ta(),x0e=kr(),_Ht=Buffer.from([0]),WHt=Buffer.from([1]);function LHt(t,e){let r=t.inclusionProof,n=BigInt(r.logIndex),s=BigInt(e.logSize);if(n<0n||n>=s)throw new x0e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${n}`});let{inner:i,border:a}=QHt(n,s);if(r.hashes.length!==i+a)throw new x0e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,i),u=r.hashes.slice(i),p=XHt(t.canonicalizedBody),l=kHt(PHt(p,c,n),u);if(!W0e.crypto.bufferEqual(l,e.logHash))throw new x0e.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}o(LHt,"verifyMerkleInclusion");function QHt(t,e){let r=UHt(t,e),n=GHt(t>>BigInt(r));return{inner:r,border:n}}o(QHt,"decompInclProof");function PHt(t,e,r){return e.reduce((n,s,i)=>r>>BigInt(i)&BigInt(1)?_0e(s,n):_0e(n,s),t)}o(PHt,"chainInner");function kHt(t,e){return e.reduce((r,n)=>_0e(n,r),t)}o(kHt,"chainBorderRight");function UHt(t,e){return HHt(t^e-BigInt(1))}o(UHt,"innerProofSize");function GHt(t){return t.toString(2).split("1").length-1}o(GHt,"onesCount");function HHt(t){return t===0n?0:t.toString(2).length}o(HHt,"bitLength");function _0e(t,e){return W0e.crypto.digest("sha256",WHt,t,e)}o(_0e,"hashChildren");function XHt(t){return W0e.crypto.digest("sha256",_Ht,t)}o(XHt,"hashLeaf")});var Rxe=b(Q0e=>{"use strict";Object.defineProperty(Q0e,"__esModule",{value:!0});Q0e.verifyTLogSET=$Ht;var Ixe=ta(),VHt=kr(),jHt=yg();function $Ht(t,e){if(!(0,jHt.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(s=>{let i=YHt(t),a=Buffer.from(Ixe.json.canonicalize(i),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return Ixe.crypto.verify(a,s.publicKey,c)}))throw new VHt.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}o($Ht,"verifyTLogSET");function YHt(t){let{integratedTime:e,logIndex:r,logId:n,canonicalizedBody:s}=t;return{body:s.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:n.keyId.toString("hex")}}o(YHt,"toVerificationPayload")});var Sxe=b(IT=>{"use strict";Object.defineProperty(IT,"__esModule",{value:!0});IT.verifyTLogBody=tXt;IT.verifyTLogInclusion=rXt;var wxe=aee(),U0e=kr(),P0e=Exe(),k0e=yxe(),JHt=Cxe(),KHt=Dxe(),ZHt=qxe(),eXt=Rxe();function tXt(t,e){let{kind:r,version:n}=t.kindVersion,s=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==s.kind||n!==s.apiVersion)throw new U0e.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${n},received:${s.kind}/${s.apiVersion}`});switch(r){case"dsse":if(n==P0e.DSSE_API_VERSION_V1)return(0,P0e.verifyDSSETLogBody)(s,e);{let i=wxe.Entry.fromJSON(s);return(0,P0e.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,JHt.verifyIntotoTLogBody)(s,e);case"hashedrekord":if(n==k0e.HASHEDREKORD_API_VERSION_V1)return(0,k0e.verifyHashedRekordTLogBody)(s,e);{let i=wxe.Entry.fromJSON(s);return(0,k0e.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new U0e.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}o(tXt,"verifyTLogBody");function rXt(t,e){let r=!1;if(nXt(t)&&((0,eXt.verifyTLogSET)(t,e),r=!0),sXt(t)){let n=(0,KHt.verifyCheckpoint)(t,e);(0,ZHt.verifyMerkleInclusion)(t,n),r=!0}if(!r)throw new U0e.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}o(rXt,"verifyTLogInclusion");function nXt(t){return t.inclusionPromise!==void 0}o(nXt,"isTLogEntryWithInclusionPromise");function sXt(t){return t.inclusionProof!==void 0}o(sXt,"isTLogEntryWithInclusionProof")});var xxe=b(RT=>{"use strict";Object.defineProperty(RT,"__esModule",{value:!0});RT.Verifier=
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,a=!1,c;return{s:o(function(){r=(0,L10.default)(t)},"s"),n:o(function(){var p=r.next();return i=p.done,p},"n"),e:o(function(p){a=!0,c=p},"e"),f:o(function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}o(R4,"_createForOfIteratorHelper");function V10(t,e){var r;if(t){if(typeof t=="string")return $Ue(t,e);var n=(0,Ao.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,U10.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $Ue(t,e)}}o(V10,"_unsupportedIterableToArray");function $Ue(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}o($Ue,"_arrayLikeToArray");var d0="xregexp",Yf={astral:!1,namespacing:!1},H0={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},nu={},q4={},Hg={},Kre=[],Xg="default",YUe="class",j10={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]/},$10=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,Y10=H0.exec.call(/()??/,"")[1]===void 0,J10=(0,$f.default)(/x/)!==void 0,K10={},tGe=K10.toString;function ene(t){var e=!0;try{if(new RegExp("",t),t==="y"){var r=(function(){return"gy"})(),n=".a".replace(new RegExp("a",r),".")==="..";n&&(e=!1)}}catch{e=!1}return e}o(ene,"hasNativeFlag");var rGe=ene("u"),tne=ene("y"),nGe={g:!0,i:!0,m:!0,u:rGe,y:tne};function sGe(t,e,r,n,s){var i;if(t[d0]={captureNames:e},s)return t;if(t.__proto__)t.__proto__=pe.prototype;else for(var a in pe.prototype)t[a]=pe.prototype[a];return t[d0].source=r,t[d0].flags=n&&(0,X10.default)(i=n.split("")).call(i).join(""),t}o(sGe,"augment");function I4(t){return H0.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}o(I4,"clipDuplicates");function Kf(t,e){var r;if(!pe.isRegExp(t))throw new TypeError("Type RegExp expected");var n=t[d0]||{},s=Z10(t),i="",a="",c=null,u=null;return e=e||{},e.removeG&&(a+="g"),e.removeY&&(a+="y"),a&&(s=H0.replace.call(s,new RegExp("[".concat(a,"]+"),"g"),"")),e.addG&&(i+="g"),e.addY&&(i+="y"),i&&(s=I4(s+i)),e.isInternalOnly||(n.source!==void 0&&(c=n.source),(0,$f.default)(n)!=null&&(u=i?I4((0,$f.default)(n)+i):(0,$f.default)(n))),t=sGe(new RegExp(e.source||t.source,s),er0(t)?(0,Ao.default)(r=n.captureNames).call(r,0):null,c,u,e.isInternalOnly),t}o(Kf,"copyRegex");function iGe(t){return(0,eGe.default)(t,16)}o(iGe,"dec");function oGe(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||H0.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||tr0(t.input,t.index+t[0].length,r)?"":"(?:)"}o(oGe,"getContextualTokenSeparator");function Z10(t){return J10?(0,$f.default)(t):H0.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}o(Z10,"getNativeFlags");function er0(t){return!!(t[d0]&&t[d0].captureNames)}o(er0,"hasNamedCapture");function aGe(t){return(0,eGe.default)(t,10).toString(16)}o(aGe,"hex");function tr0(t,e,r){var n="\\(\\?#[^)]*\\)",s="#[^#\\n]*",i="[?*+]|{\\d+(?:,\\d*)?}";return H0.test.call((0,Jf.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,Ao.default)(t).call(t,e))}o(tr0,"isQuantifierNext");function rne(t,e){return tGe.call(t)==="[object ".concat(e,"]")}o(rne,"isType");function cGe(t){for(;t.length<4;)t="0".concat(t);return t}o(cGe,"pad4");function rr0(t,e){if(I4(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=H0.replace.call(t,/^\(\?([\w$]+)\)/,function(i,a){if(H0.test.call(/[gy]/,a))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(i));return e=I4(e
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,a=!1,c;return{s:o(function(){r=(0,Wr0.default)(t)},"s"),n:o(function(){var p=r.next();return i=p.done,p},"n"),e:o(function(p){a=!0,c=p},"e"),f:o(function(){try{!i&&r.return!=null&&r.return()}finally{if(a)throw c}},"f")}}o(Xr0,"_createForOfIteratorHelper");function Vr0(t,e){var r;if(t){if(typeof t=="string")return $Ge(t,e);var n=(0,Ur0.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return(0,kr0.default)(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $Ge(t,e)}}o(Vr0,"_unsupportedIterableToArray");function $Ge(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}o($Ge,"_arrayLikeToArray");var jr0=o(function(e){var r={},n=e._dec,s=e._hex,i=e._pad4;function a(d){return d.replace(/[- _]+/g,"").toLowerCase()}o(a,"normalize");function c(d){var h=/^\\[xu](.+)/.exec(d);return h?n(h[1]):d.charCodeAt(d[0]==="\\"?1:0)}o(c,"charCode");function u(d){var h="",m=-1;return(0,Hr0.default)(e).call(e,d,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(z){var C=c(z[1]);C>m+1&&(h+="\\u".concat(i(s(m+1))),C>m+2&&(h+="-\\u".concat(i(s(C-1))))),m=c(z[2]||z[1])}),m<65535&&(h+="\\u".concat(i(s(m+1))),m<65534&&(h+="-\\uFFFF")),h}o(u,"invertBmp");function p(d){var h="b!";return r[d][h]||(r[d][h]=u(r[d].bmp))}o(p,"cacheInvertedBmp");function l(d,h){var m=r[d],z="";if(m.bmp&&!m.isBmpLast){var C;z=(0,one.default)(C="[".concat(m.bmp,"]")).call(C,m.astral?"|":"")}if(m.astral&&(z+=m.astral),m.isBmpLast&&m.bmp){var E;z+=(0,one.default)(E="".concat(m.astral?"|":"","[")).call(E,m.bmp,"]")}return h?"(?:(?!".concat(z,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(z,")")}o(l,"buildAstral");function A(d,h){var m=h?"a!":"a=";return r[d][m]||(r[d][m]=l(d,h))}o(A,"cacheAstral"),e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(d,h,m){var z="Invalid double negation ",C="Unknown Unicode token ",E="Unicode token missing data ",B="Astral mode required for Unicode token ",I="Astral mode does not support Unicode tokens within character classes",w=d[1]==="P"||!!d[2],N=(0,Gr0.default)(m).call(m,"A"),x=a(d[4]||d[3]),Q=r[x];if(d[1]==="P"&&d[2])throw new SyntaxError(z+d[0]);if(!r.hasOwnProperty(x))throw new SyntaxError(C+d[0]);if(Q.inverseOf){if(x=a(Q.inverseOf),!r.hasOwnProperty(x)){var $;throw new ReferenceError((0,one.default)($="".concat(E+d[0]," -> ")).call($,Q.inverseOf))}Q=r[x],w=!w}if(!(Q.bmp||N))throw new SyntaxError(B+d[0]);if(N){if(h==="class")throw new SyntaxError(I);return A(x,w)}return h==="class"?w?p(x):Q.bmp:"".concat((w?"[^":"[")+Q.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(d){var h="Unicode token requires name",m="Unicode token has no character data ",z=Xr0(d),C;try{for(z.s();!(C=z.n()).done;){var E=C.value;if(!E.name)throw new Error(h);if(!(E.inverseOf||E.bmp||E.astral))throw new Error(m+E.name);r[a(E.name)]=E,E.alias&&(r[a(E.alias)]=E)}}catch(B){z.e(B)}finally{z.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(d){var h=a(d);return r[h]}},"_default");T4.default=jr0;YGe.exports=T4.default});var ZGe=b((S01,KGe)=>{KGe.exports=[{name:"InAdlam",astral:"\uD83A[\uDD00-\uDD5F]"},{name:"InAegean_Numbers",astral:"\uD800[\uDD00-\uDD3F]"},{name:"InAhom",astral:"\uD805[\uDF00-\uDF3F]"},{name:"InAlchemical_Symbols",astral:"\uD83D[\uDF00-\uDF7F]"},{name:"InAlphabetic_Presentation_Forms",bmp:"\uFB00-\uFB4F"},{name:"InAnatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE7F]"},{name:"InAncient_Greek_Musical_Notation",astral:"\uD834[\uDE00-\uDE4F]"},{name:"InAncient_Greek_Numbers",astral:"\uD800[\uDD40-\uDD8F]"},{name:"InAncient_Symbols",astral:"\uD800[\uDD90-\uDDCF]"},{name:"InArabic",bmp:"\u0600-\u06FF"},{name:"InArabic_Extended_A",bmp:"\u08A0-\u08FF"},{name:"InArabic_Mathematical_Alphabetic_Symbols",astral:"\uD83B[\uDE00-\uDEFF]"},{name:"InArabic_Presentation_Forms_A",bmp:"\uFB50-\uFDFF"},{name:"InArabic_Presentation_Forms_B",
Supportbooleaninputlist:\`true | True | TRUE | false | False | FALSE\``)}o(nde,"getBooleanInput");functionAQ(t,e){if(process.env.GITHUB_OUTPUT||"")returncz("OUTPUT",MB(t,e));process.stdout.write(lQ.EOL),la("set-output",{name:t},pa(e))}o(AQ,"setOutput");functionsde(t){process.exitCode=pQ.Failure,Mb(t)}o(sde,"setFailed");functionIu(){returnprocess.env.RUNNER_DEBUG==="1"}o(Iu,"isDebug");functionT(t){la("debug",{},t)}o(T,"debug");functionMb(t,e={}){la("error",O_(e),tinstanceofError?t.toString():t)}o(Mb,"error");functionyt(t,e={}){la("warning",O_(e),tinstanceofError?t.toString():t)}o(yt,"warning");functionW(t){process.stdout.write(t+lQ.EOL)}o(W,"info");function_d(t){y_("group",t)}o(_d,"startGroup");functionWd(){y_("endgroup")}o(Wd,"endGroup");functionpr(t,e){returnNot(this,void0,void0,function*(){_d(t);letr;try{r=yielde()}finally{Wd()}returnr})}o(pr,"group");functionmq(t,e){if(process.env.GITHUB_STATE||"")returncz("STATE",MB(t,e));la("save-state",{name:t},pa(e))}o(mq,"saveState");functionide(t){returnprocess.env[`STATE_${t}`]||""}o(ide,"getState");varOw=_(require("fs"),1),CX=_(require("os"),1),BX=_(require("path"),1);varade=_(require("os"),1);functionMO(t){returnt==null?"":typeoft=="string"||tinstanceofString?t:JSON.stringify(t)}o(MO,"toCommandValue");functioncde(t,e,r){letn=newdQ(t,e,r);process.stdout.write(n.toString()+ade.EOL)}o(cde,"issueCommand");varode="::",dQ=class{static{o(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){lete=ode+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";letr=!0;for(letninthis.properties)if(this.properties.hasOwnProperty(n)){lets=this.properties[n];s&&(r?r=!1:e+=",",e+=`${n}=${Fot(s)}`)}}returne+=`${ode}${vot(this.message)}`,e}};functionvot(t){returnMO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(vot,"escapeData");functionFot(t){returnMO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(Fot,"escapeProperty");varAde=_(require("os"),1);varpde=require("os"),mO=require("fs");varfQ=function(t,e,r,n){functions(i){returniinstanceofr?i:newr(function(a){a(i)})}returno(s,"adopt"),new(r||(r=Promise))(function(i,a){functionc(l){try{p(n.next(l))}catch(A){a(A)}}o(c,"fulfilled");functionu(l){try{p(n.throw(l))}catch(A){a(A)}}o(u,"rejected");functionp(l){l.done?i(l.value):s(l.value).then(c,u)}o(p,"step"),p((n=n.apply(t,e||[])).next())})},{access:Tot,appendFile:xot,writeFile:_ot}=mO.promises,ude="GITHUB_STEP_SUMMARY";varhQ=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){returnfQ(this,void0,void0,function*(){if(this._filePath)returnthis._filePath;lete=process.env[ude];if(!e)thrownewError(`Unable to find environment variable for $${ude}. Check if your runtime environment supports job summaries.`);try{yieldTot(e,mO.constants.R_OK|mO.constants.W_OK)}catch{thrownewError(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}returnthis._filePath=e,this._filePath})}wrap(e,r,n={}){lets=Object.entries(n).map(([i,a])=>`${i}="${a}"`).join("");returnr?`<${e}${s}>${r}</${e}>`:`<${e}${s}>`}write(e){returnfQ(this,void0,void0,function*(){letr=!!e?.overwrite,n=yieldthis.filePath();returnyield(r?_ot:xot)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){returnfQ(this,void0,void0,function*(){returnthis.emptyBuffer().write({overwrite:!0})})}stringify(){returnthis._buffer}isEmptyBuffer(){returnthis._buffer.length===0}emptyBuffer(){returnthis._buffer="",this}addRaw(e,r=!1){returnthis._buffer+=e,r?this.addEOL():this}addEOL(){returnthis.addRaw(pde.EOL)}addCodeBlock(e,r){letn=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);returnthis.addRaw(s).addEOL()}addList(e,r=!1){letn=r?"ol":"ul",s=e.map(a=>this.wrap("li",a)).join(""),i=this.wrap(n,s);returnthis.addRaw(i).addEOL()}addTable(e){letr=e.map(s=>{leti=s.map(a=>{if(typeofa=="string")returnthis.wrap("td",a);let{he
${$dt.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function cI(t){return t instanceof nn?!0:Gd(t)&&t.name==="RestError"}o(cI,"isRestError");function Qn(t,e){return Buffer.from(t,e)}o(Qn,"stringToUint8Array");var uI=_(require("node:http"),1),pI=_(require("node:https"),1),QP=_(require("node:zlib"),1),iMe=require("node:stream");var qi=HO("ts-http-runtime");var Ydt={};function XO(t){return t&&typeof t.pipe=="function"}o(XO,"isReadableStream");function sMe(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=o(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}o(sMe,"isStreamComplete");function oMe(t){return t&&typeof t.byteLength=="number"}o(oMe,"isArrayBuffer");var lI=class extends iMe.Transform{static{o(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(s){n(s)}}constructor(e){super(),this.progressCallback=e}},PP=class{static{o(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new wa("The operation was aborted. Request has already been canceled.");n=o(p=>{p.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let p=new vo;qi.info(`requestto'${p.sanitizeUrl(e.url)}'timedout.canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),a=i?.includes("gzip")||i?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let p=e2t(c);p!==null&&e.headers.set("Content-Length",p)}let u;try{if(c&&e.onUploadProgress){let m=e.onUploadProgress,z=new lI(m);z.on("error",C=>{qi.error("Error in upload progress",C)}),XO(c)?c.pipe(z):z.end(c),c=z}let p=await this.makeRequest(e,r,c);s!==void 0&&clearTimeout(s);let l=Jdt(p),d={status:p.statusCode??0,headers:l,request:e};if(e.method==="HEAD")return p.resume(),d;u=a?Kdt(p,l):p;let h=e.onDownloadProgress;if(h){let m=new lI(h);m.on("error",z=>{qi.error("Error in download progress",z)}),u.pipe(m),u=m}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(d.status)?d.readableStreamBody=u:d.bodyAsText=await Zdt(u),d}finally{if(e.abortSignal&&n){let p=Promise.resolve();XO(c)&&(p=sMe(c));let l=Promise.resolve();XO(u)&&(l=sMe(u)),Promise.all([p,l]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(A=>{qi.warning("Error when cleaning up abortListener on httpRequest",A)})}}}makeRequest(e,r,n){let s=new URL(e.url),i=s.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannotconnectto${e.url}whileallowInsecureConnectionisfalse.`);let c={agent:e.agent??this.getOrCreateAgent(e,i),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((u,p)=>{let l=i?uI.default.request(c,u):pI.default.request(c,u);l.once("error",A=>{p(new nn(A.message,{code:A.code??nn.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let A=new wa("The operation was aborted. Rejecting from abort signal callback while making request.");l.destroy(A),p(A)}),n&&XO(n)?n.pipe(l):n?typeof n=="string"||Buffer.isBuffer(n)?l.end(n):oMe(n)?l.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(qi.error("Unrecognized body type",n),p(new nn("Unrecognized body type"))):l.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?uI.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new uI.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return pI.default.globalAgent;let s=e.tlsSettings??Ydt,i=this.cachedHttpsAgents.get(s);return i&&i.options.keepAlive===!n||(qi.info("No cached TLS Agent exi
`;return e}o(Sft,"encodeHeaders");function Nft(t){return t instanceof Uint8Array?t.byteLength:FI(t)?t.size===-1?void 0:t.size:void 0}o(Nft,"getLength");function vft(t){let e=0;for(let r of t){let n=Nft(r);if(n===void 0)return;e+=n}return e}o(vft,"getTotalLength");async function Fft(t,e,r){let n=[Qn(`--${r}`,"utf-8"),...e.flatMap(i=>[Qn(`\r
`,"utf-8")],s=vft(n);s&&t.headers.set("Content-Length",s),t.body=await cme(n)}o(Fft,"buildRequestBody");var YO="multipartPolicy",Tft=70,xft=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function _ft(t){if(t.length>Tft)throw new Error(`Multipartboundary"${t}"exceedsmaximumlengthof70characters`);if(Array.from(t).some(e=>!xft.has(e)))throw new Error(`Multipartboundary"${t}"containsinvalidcharacters`)}o(_ft,"assertValidBoundary");function xI(){return{name:YO,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,n=t.headers.get("Content-Type")??"multipart/mixed",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Gotmultipartrequestbody,butcontent-typeheaderwasnotmultipart:${n}`);let[,i,a]=s;if(a&&r&&a!==r)throw new Error(`Multipartboundarywasspecifiedas${a}intheheader,butgot${r}intherequestbody`);return r??=a,r?_ft(r):r=wft(),t.headers.set("Content-Type",`${i};boundary=${r}`),await Fft(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}o(xI,"multipartPolicy");function _I(){return aI()}o(_I,"createEmptyPipeline");var ume=sI({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),KM0=ume.logger;function va(t){return ume.createClientLogger(t)}o(va,"createClientLogger");var Fa=va("core-rest-pipeline");function ak(t={}){return dI({logger:Fa.info,...t})}o(ak,"logPolicy");var ck=fI;function uk(t={}){return hI(t)}o(uk,"redirectPolicy");var WI=_(require("node:os"),1),LI=_(require("node:process"),1);function pme(){return"User-Agent"}o(pme,"getHeaderName");async function lme(t){if(LI.default&&LI.default.versions){let e=`${WI.default.type()}${WI.default.release()};${WI.default.arch()}`,r=LI.default.versions;r.bun?t.set("Bun",`${r.bun}(${e})`):r.deno?t.set("Deno",`${r.deno}(${e})`):r.node&&t.set("Node",`${r.node}(${e})`)}}o(lme,"setPlatformSpecificData");var QI="1.22.2";function Hft(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}o(Hft,"getUserAgentString");function Ame(){return pme()}o(Ame,"getUserAgentHeaderName");async function PI(t){let e=new Map;e.set("core-rest-pipeline",QI),await lme(e);let r=Hft(e);return t?`${t}${r}`:r}o(PI,"getUserAgentValue");var dme=Ame(),fme="userAgentPolicy";function pk(t={}){let e=PI(t.userAgentPrefix);return{name:fme,async sendRequest(r,n){return r.headers.has(dme)||r.headers.set(dme,await e),n(r)}}}o(pk,"userAgentPolicy");var Ls=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function lk(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((i,a)=>{function c(){a(new Ls(s??"The operation was aborted."))}o(c,"rejectOnAbort");function u(){n?.removeEventListener("abort",p)}o(u,"removeListeners");function p(){r?.(),u(),c()}if(o(p,"onAbort"),n?.aborted)return c();try{t(l=>{u(),i(l)},l=>{u(),a(l)})}catch(l){a(l)}n?.addEventListener("abort",p)})}o(lk,"createAbortablePromise");var Yft="The delay was aborted.";function JO(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return lk(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:o(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:s??Yft})}o(JO,"delay");function Ql(t){if(Gd(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknownerror${e}`}}o(Ql,"getErrorMessage");function hme(t){return Gd(t)}o(hme,"isError");function Wb(){return Ud()}o(Wb,"randomUUID");var St=Vd;var bme=Symbol("rawContent");function dk(t){return typeof t[bme]=="function"}o(dk,"hasRawContent");function Mme(t){return dk(t)?t[bme]():t}o(Mme,"getRawContent");var kI=YO;function fk(){let t=xI();return{name:kI,sendRequest:o(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)dk(n.body)&&(n.body=Mme(n.body));return t.sendRequest(e,r)},"sendRequest")}}o(fk,"multipartPolicy");var hk=bI;function bk(){return MI()}o(bk,"decompressResponsePolicy");fun
`&&t[i]!=="\r";i++)u+=t[i];if(u=u.trim(),u[u.length-1]==="/"&&(u=u.substring(0,u.length-1),i--),!zbt(u)){let A;return u.trim().length===0?A="Invalid space after '<'.":A="Tag '"+u+"' is an invalid name.",K0("InvalidTag",A,sn(t,i))}let p=hbt(t,i);if(p===!1)return K0("InvalidAttr","Attributes for '"+u+"' have open quote.",sn(t,i));let l=p.value;if(i=p.index,l[l.length-1]==="/"){let A=i-l.length;l=l.substring(0,l.length-1);let d=rge(l,e);if(d===!0)n=!0;else return K0(d.err.code,d.err.msg,sn(t,A+d.err.line))}else if(c)if(p.tagClosed){if(l.trim().length>0)return K0("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",sn(t,a));if(r.length===0)return K0("InvalidTag","Closing tag '"+u+"' has not been opened.",sn(t,a));{let A=r.pop();if(u!==A.tagName){let d=sn(t,A.tagStartPos);return K0("InvalidTag","Expected closing tag '"+A.tagName+"' (opened in line "+d.line+", col "+d.col+") instead of closing tag '"+u+"'.",sn(t,a))}r.length==0&&(s=!0)}}else return K0("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",sn(t,i));else{let A=rge(l,e);if(A!==!0)return K0(A.err.code,A.err.msg,sn(t,i-l.length+A.err.line));if(s===!0)return K0("InvalidXml","Multiple possible root nodes found.",sn(t,i));e.unpairedTags.indexOf(u)!==-1||r.push({tagName:u,tagStartPos:a}),n=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=tge(t,i);continue}else if(t[i+1]==="?"){if(i=ege(t,++i),i.err)return i}else break;else if(t[i]==="&"){let A=mbt(t,i);if(A==-1)return K0("InvalidChar","char '&' is not expected.",sn(t,i));i=A}else if(s===!0&&!Zme(t[i]))return K0("InvalidXml","Extra text at the end",sn(t,i));t[i]==="<"&&i--}}else{if(Zme(t[i]))continue;return K0("InvalidChar","char '"+t[i]+"' is not expected.",sn(t,i))}if(n){if(r.length==1)return K0("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",sn(t,r[0].tagStartPos));if(r.length>0)return K0("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return K0("InvalidXml","Start tag expected.",1);return!0}o(tR,"validate");function Zme(t){return t===" "||t===" "||t===`
`||t==="\r"}o(Zme,"isWhiteSpace");function ege(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let n=t.substr(r,e-r);if(e>5&&n==="xml")return K0("InvalidXml","XML declaration allowed only at the start of the document.",sn(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}o(ege,"readPI");function tge(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}o(tge,"readCommentAndCDATA");var dbt='"',fbt="'";function hbt(t,e){let r="",n="",s=!1;for(;e<t.length;e++){if(t[e]===dbt||t[e]===fbt)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){s=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:s}}o(hbt,"readAttributeStr");var bbt=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function rge(t,e){let r=ZI(t,bbt),n={};for(let s=0;s<r.length;s++){if(r[s][1].length===0)return K0("InvalidAttr","Attribute '"+r[s][2]+"' has no space in starting.",u3(r[s]));if(r[s][3]!==void 0&&r[s][4]===void 0)return K0("InvalidAttr","Attribute '"+r[s][2]+"' is without value.",u3(r[s]));if(r[s][3]===void 0&&!e.allowBooleanAttributes)return K0("InvalidAttr","boolean attribute '"+r[s][2]+"' is not allowed.",u3(r[s]));let i=r[s][2];if(!gbt(i))return K0("InvalidAttr","Attribute '"+i+"' is an invalid name.",u3(r[s]));if(!Object.prototype.hasOwnProperty.call(n,i))n[i]=1;else return K0("InvalidAttr","Attribute '"+i+"' is repeated.",u3(r[s]))}return!0}o(rge,"validateAttributeString");function Mbt(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}o(Mbt,"validateNumberAmpersand");function mbt(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Mbt(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}o(mbt,"validateAmpersand");function K0(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}o(K0,"getErrorObject");function gbt(t){return Pk(t)}o(gbt,"validateAttrName");function zbt(t){return Pk(t)}o(zbt,"validateTagName");function sn(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}o(sn,"getLineNumberForPosition");function u3(t){return t.startIndex+t[1].length}o(u3,"getPositionFromMatch");var nge={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"},sge={Agrave:"\xC0",agrave:"\xE0",Aacute:"\xC1",aacute:"\xE1",Acirc:"\xC2",acirc:"\xE2",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",Aring:"\xC5",aring:"\xE5",AElig:"\xC6",aelig:"\xE6",Ccedil:"\xC7",ccedil:"\xE7",Egrave:"\xC8",egrave:"\xE8",Eacute:"\xC9",eacute:"\xE9",Ecirc:"\xCA",ecirc:"\xEA",Euml:"\xCB",euml:"\xEB",Igrave:"\xCC",igrave:"\xEC",Iacute:"\xCD",iacute:"\xED",Icirc:"\xCE",icirc:"\xEE",Iuml:"\xCF",iuml:"\xEF",ETH:"\xD0",eth:"\xF0",Ntilde:"\xD1",ntil
`);let e=new Gn("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let s=this.options,i=new A3(s.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let p=t.charCodeAt(c+1);if(p===47){let l=Gb(t,">",c,"Closing Tag is not closed."),A=t.substring(c+2,l).trim();if(s.removeNSPrefix){let h=A.indexOf(":");h!==-1&&(A=A.substr(h+1))}A=$k(s.transformTagName,A,"",s).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let d=this.matcher.getCurrentTag();if(A&&s.unpairedTagsSet.has(A))throw new Error(`Unpairedtagcannotbeusedasclosingtag:</${A}>`);d&&s.unpairedTagsSet.has(d)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=l}else if(p===63){let l=Yk(t,c,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let A=this.buildAttributesMap(l.tagExp,this.matcher,l.tagName,!0);if(A){let d=A[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(d)||1),i.setXmlVersion(Number(d)||1)}if(!(s.ignoreDeclaration&&l.tagName==="?xml"||s.ignorePiTags)){let d=new Gn(l.tagName);d.add(s.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&s.ignoreAttributes!==!0&&(d[":@"]=A),this.addChild(r,d,this.readonlyMatcher,c)}c=l.closeIndex+1}else if(p===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let l=Gb(t,"-->",c+4,"Comment is not closed.");if(s.commentPropName){let A=t.substring(c+4,l-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(s.commentPropName,[{[s.textNodeName]:A}])}c=l}else if(p===33&&t.charCodeAt(c+2)===68){let l=i.readDocType(t,c);this.entityDecoder.addInputEntities(l.entities),c=l.i}else if(p===33&&t.charCodeAt(c+2)===91){let l=Gb(t,"]]>",c,"CDATA is not closed.")-2,A=t.substring(c+9,l);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let d=this.parseTextData(A,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);d==null&&(d=""),s.cdataPropName?r.add(s.cdataPropName,[{[s.textNodeName]:A}]):r.add(s.textNodeName,d),c=l+2}else{let l=Yk(t,c,s.removeNSPrefix);if(!l){let x=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${x}"`)}let A=l.tagName,d=l.rawTagName,h=l.tagExp,m=l.attrExpPresent,z=l.closeIndex;if({tagName:A,tagExp:h}=$k(s.transformTagName,A,h,s),s.strictReservedNames&&(A===s.commentPropName||A===s.cdataPropName||A===s.textNodeName||A===s.attributesGroupName))throw new Error(`Invalid tag name: ${A}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let C=r;C&&s.unpairedTagsSet.has(C.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;h.length>0&&h.lastIndexOf("/")===h.length-1&&(E=!0,A[A.length-1]==="/"?(A=A.substr(0,A.length-1),h=A):h=h.substr(0,h.length-1),m=A!==h);let B=null,I={},w;w=Ubt(d),A!==e.tagname&&this.matcher.push(A,{},w),A!==h&&m&&(B=this.buildAttributesMap(h,this.matcher,A),B&&(I=kbt(B,s))),A!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=c;if(this.isCurrentNodeStopNode){let x="";if(E)c=l.closeIndex;else if(s.unpairedTagsSet.has(A))c=l.closeIndex;else{let $=this.readStopNodeData(t,d,z+1);if(!$)throw new Error(`Unexpected end of ${d}`);c=$.i,x=$.tagContent}let Q=new Gn(A);B&&(Q[":@"]=B),Q.add(s.textNodeName,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,Q,this.readonlyMatcher,N)}else{if(E){({tagName:A,tagExp:h}=$k(s.transformTagName,A,h,s));let x=new Gn(A);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(s.unpairedTagsSet.has(A)){let x=new Gn(A);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=l.closeIndex;continue}else{let x=new Gn(A);if(this.tagsNodeStack.length>s.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),r=x}n="",c=z}}}else n+=t[c];return e.child},"parseXml"
`}),n}getCanonicalizedResourceString(e){let r=fR(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let s=hR(e.url),i={};if(s){let a=[];for(let c in s)if(Object.prototype.hasOwnProperty.call(s,c)){let u=c.toLowerCase();i[u]=s[c],a.push(u)}a.sort();for(let c of a)n+=`
${c}:${decodeURIComponent(i[c])}`}return n}};var N0=class extends r2{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new M3(e,r,this)}computeHMACSHA256(e){return(0,Tge.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var E1=va("storage-common");var Si;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Si||(Si={}));var Xl={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Si.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},EMt=new Ls("The operation was aborted."),m3=class extends Wa{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=Xl){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Xl.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Xl.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Xl.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Xl.maxRetryDelayInMs):Xl.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Xl.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Xl.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let s=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;i||(s.url=dR(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=Hl(s.url,_u.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(E1.info(`RetryPolicy:=====>Try=${n}${i?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(s),!this.shouldRetry(i,n,a))return a;r=r||!i&&a.status===404}catch(c){if(E1.error(`RetryPolicy:Caughterror,message:${c.message},code:${c.code}`),!this.shouldRetry(i,n,a,c))throw c}return await this.delay(i,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)return E1.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(s){for(let a of i)if(s.name.toUpperCase().includes(a)||s.message.toUpperCase().includes(a)||s.code&&s.code.toString().toUpperCase()===a)return E1.info(`RetryPolicy:Networkerror${a}found,willretry.`),!0}if(n||s){let a=n?n.status:s?s.statusCode:0;if(!e&&a===404)return E1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return E1.info(`RetryPolicy:Willretryforstatuscode${a}.`),!0}if(n&&n?.status>=400){let a=n.headers.get(Ue.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return s?.code==="PARSE_ERROR"&&s?.message.startsWith('Error "Error: Unclosed root tag')?(E1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let s=0;if(e)switch(this.retryOptions.retryPolicyType){case Si.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Si.FIXED:s=this.retryOptions.retryDelayInMs;break}else s=Math.random()*1e3;return E1.info(`RetryPolicy:Delayfor${s}ms`),bR(s,n,EMt)}};var g3=class{static{o(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new m3(e,r,this.retryOptions)}};var yMt="storageBrowserPolicy";function xge(){return{name:yMt,async sendRequest(t,e){return St||((t.method==="GET"||t.method==="HEAD")&&(t.url=Hl(t.url,_u.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Ue.COOKIE),t.headers.delete(Ue.CONTENT_LENGTH)),e(t)}}}o(xge,"storageBrowserPolicy");var CMt="StorageCorrectContentLengthPolicy";function _ge(){function t(e){e.body&&(
`}),c}o(n,"getCanonicalizedHeadersString");function s(i){let a=fR(i.url)||"/",c="";c+=`/${t.accountName}${a}`;let u=hR(i.url),p={};if(u){let l=[];for(let A in u)if(Object.prototype.hasOwnProperty.call(u,A)){let d=A.toLowerCase();p[d]=u[A],l.push(d)}l.sort();for(let A of l)c+=`
`),i=e.computeHMACSHA256(s);return{sasQueryParameters:new Lo(t.version,i,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:s}}o(Ngt,"generateBlobSASQueryParameters20150405");function vgt(t,e){if(t=l2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=tc.parse(t.permissions.toString()).toString():s=rc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",p2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Wo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}o(vgt,"generateBlobSASQueryParameters20181109");function Fgt(t,e){if(t=l2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=tc.parse(t.permissions.toString()).toString():s=rc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",p2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Wo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,a,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,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}o(Fgt,"generateBlobSASQueryParameters20201206");function Tgt(t,e){if(t=l2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=tc.parse(t.permissions.toString()).toString():s=rc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",p2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Nt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Nt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Wo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,a,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,e.userDelegationKey),stringToSign:i}}o(Tgt,"generateBlobSASQueryParametersUDK20181109");function xgt(t,e){if(t=l2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=tc.parse(t.permissions.toString()).toString():s=rc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",p2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Nt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Nt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Wo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,a,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,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}o(xgt,"generateBlobSASQueryParametersUDK20200210");function _gt(t,e){if(t=l2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=tc.parse(t.permissions.toString()).toString():s=rc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",p2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Nt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Nt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Wo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,a,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,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}o(_gt,"generateBlobSASQueryParametersUDK20201206");function Wgt(t,e){if(t=l2(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",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=tc.parse(t.permissions.toString()).toString():s=rc.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Nt(t.startsOn,!1):"",t.expiresOn?Nt(t.expiresOn,!1):"",p2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Nt(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Nt(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Wo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Lo(t.version,a,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,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}o(Wgt,"generateBlobSASQueryParametersUDK20250705");function p2(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}o(p2,"getCanonicalName");function l2(t){let e=t.version?t.version:zR;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}o(l2,"SASSignatureValuesSanityCheckAndAutofill");var N3=class{static{o(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=Wb()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Fo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Fo||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ye.withSpan("BlobLeaseClient-acquireLease",r,async n=>Re(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Fo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Fo||r.conditions?.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return ye.withSpan("BlobLeaseClient-changeLease",r,async n=>{let s=Re(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,s})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.i
Ifyouareusingself-hostedrunners,pleasemakesureyourrunnerhasaccesstoallGitHubendpoints:https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};sM.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var h2=class extends Error{static{o(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries.
Moreinfoonstoragelimits:https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};h2.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var k3=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var jzt=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(n.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(n.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):s(l.value).then(c,u)}o(p,"step"),p((n=n.apply(t,e||[])).next())})},tH=class{static{o(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);W(`Sent ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function KOe(t,e,r){return jzt(this,void 0,void 0,function*(){var n;let s=new Xu(t),i=s.getBlockBlobClient(),a=new tH((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),T(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let u=yield i.uploadFile(e,c);if(u._response.status>=400)throw new B5(`uploadCacheArchiveSDK: upload failed with status code ${u._response.status}`);return u}catch(u){throw yt(`uploadCacheArchiveSDK: internal error uploading cache archive: ${u.message}`),u}finally{a.stopDisplayTimer()}})}o(KOe,"uploadCacheArchiveSDK");var e3e=_(require("buffer"),1),nc=_(require("fs"),1),t3e=_(require("stream"),1),r3e=_(require("util"),1);var D5=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(n.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(n.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):s(l.value).then(c,u)}o(p,"step"),p((n=n.apply(t,e||[])).next())})};function q5(t){return t?t>=200&&t<300:!1}o(q5,"isSuccessStatusCode");function $zt(t){return t?t>=500:!0}o($zt,"isServerErrorStatusCode");function Yzt(t){return t?[S0.BadGateway,S0.ServiceUnavailable,S0.GatewayTimeout].includes(t):!1}o(Yzt,"isRetryableStatusCode");function Jzt(t){return D5(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(Jzt,"sleep");function ZOe(t,e,r){return D5(this,arguments,void 0,function*(n,s,i,a=Kq,c=Zq,u=void 0){let p="",l=1;for(;l<=a;){let A,d,h=!1;try{A=yield s()}catch(m){u&&(A=u(m)),h=!0,p=m.message}if(A&&(d=i(A),!$zt(d)))return A;if(d&&(h=Yzt(d),p=`Cache service responded with ${d}`),T(`${n} - Attempt ${l} of ${a} failed with error: ${p}`),!h){T(`${n} - Error is not retryable`);break}yield Jzt(c),l++}throw Error(`${n} failed: ${p}`)})}o(ZOe,"retry");function U3(t,e){return D5(this,arguments,void 0,function*(r,n,s=Kq,i=Zq){return yield ZOe(r,n,a=>a.statusCode,s,i,a=>{if(a instanceof Ra)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}o(U3,"retryTypedResponse");function iM(t,e){return D5(this,arguments,void 0,function*(r,n,s=Kq,i=Zq){return yield ZOe(r,n,a=>a.message.statusCode,s,i)})}o(iM,"retryHttpClientResponse");var xi=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a
Othercacheswithsimilarkey:`);for(let c of i?.artifactCaches||[])T(`CacheKey:${c?.cacheKey},CacheVersion:${c?.cacheVersion},CacheScope:${c?.scope},CacheCreated:${c?.creationTime}`)}}})}o(iOt,"printCachesListForDiagnostics");function iH(t,e,r){return jn(this,void 0,void 0,function*(){let n=new A3e.URL(t),s=o3e(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield s3e(t,e,s):s.concurrentBlobDownloads?yield n3e(t,e,s):yield R5(t,e):yield R5(t,e)})}o(iH,"downloadCache");function f3e(t,e,r){return jn(this,void 0,void 0,function*(){let n=sH(),s=Rb(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:s,cacheSize:r?.cacheSize};return yield U3("reserveCache",()=>jn(this,void 0,void 0,function*(){return n.postJson(H3("caches"),i)}))})}o(f3e,"reserveCache");function l3e(t,e){return`bytes${t}-${e}/*`}o(l3e,"getContentRange");function oOt(t,e,r,n,s){return jn(this,void 0,void 0,function*(){T(`Uploadingchunkofsize${s-n+1}bytesatoffset${n}withcontentrange:${l3e(n,s)}`);let i={"Content-Type":"application/octet-stream","Content-Range":l3e(n,s)},a=yield iM(`uploadChunk(start:${n},end:${s})`,()=>jn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!q5(a.message.statusCode))throw new Error(`Cacheservicerespondedwith${a.message.statusCode}duringuploadchunk.`)})}o(oOt,"uploadChunk");function aOt(t,e,r,n){return jn(this,void 0,void 0,function*(){let s=Ia(r),i=H3(`caches/${e.toString()}`),a=oM.openSync(r,"r"),c=rH(n),u=qP("uploadConcurrency",c.uploadConcurrency),p=qP("uploadChunkSize",c.uploadChunkSize),l=[...new Array(u).keys()];T("Awaiting all uploads");let A=0;try{yield Promise.all(l.map(()=>jn(this,void 0,void 0,function*(){for(;A<s;){let d=Math.min(s-A,p),h=A,m=A+d-1;A+=p,yield oOt(t,i,()=>oM.createReadStream(r,{fd:a,start:h,end:m,autoClose:!1}).on("error",z=>{throw new Error(`Cacheuploadfailedbecausefilereadfailedwith${z.message}`)}),h,m)}})))}finally{oM.closeSync(a)}})}o(aOt,"uploadFile");function cOt(t,e,r){return jn(this,void 0,void 0,function*(){let n={size:r};return yield U3("commitCache",()=>jn(this,void 0,void 0,function*(){return t.postJson(H3(`caches/${e.toString()}`),n)}))})}o(cOt,"commitCache");function oH(t,e,r,n){return jn(this,void 0,void 0,function*(){if(rH(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield KOe(r,e,n)}else{let i=sH();T("Upload cache"),yield aOt(i,t,e,n),T("Commiting cache");let a=Ia(e);W(`CacheSize:~${Math.round(a/(1024*1024))}MB(${a}B)`);let c=yield cOt(i,t,a);if(!q5(c.statusCode))throw new Error(`Cacheservicerespondedwith${c.statusCode}duringcommitcache.`);W("Cache saved successfully")}})}o(oH,"saveCache");var cEe=_(tEe(),1),r1=_(t1(),1),Hs=_(t1(),1),z2=_(t1(),1),O2=_(t1(),1),E2=_(t1(),1);var eX=_(t1(),1),tX=_(t1(),1),iEe=_(t1(),1),oEe=_(t1(),1),aEe=_(t1(),1);var JH=_(t1(),1),KH=_(t1(),1),rEe=_(t1(),1),nEe=_(t1(),1),sEe=_(t1(),1);var ZH=class extends sEe.MessageType{static{o(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,nEe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,rEe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let i=s??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,u]=e.tag();switch(c){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let p=n.readUnknownField;if(p==="throw")throw new globalThis.Error(`Unknownfield${c}(wiretype${u})for${this.typeName}`);let l=e.skip(u);p!==!1&&(p===!0?KH.UnknownFieldHandler.onRead:p)(this.typeName,i,c,u,l)}}return i}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,JH.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,JH.WireType.Varint).int64(e.permission);let s=n.writeUnknownFields;return s!==!1&&(s==!0?KH.UnknownFieldHandler.onWrite:s)(this.typeName,e,r),r}},bw=new ZH;var rX=class extends aEe.Mess
`));let n=yield MX(r,"create");yield mX(n,t)})}o(zX,"createTar");var yM=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(l){try{p(n.next(l))}catch(A){a(A)}}o(c,"fulfilled");function u(l){try{p(n.throw(l))}catch(A){a(A)}}o(u,"rejected");function p(l){l.done?i(l.value):s(l.value).then(c,u)}o(p,"step"),p((n=n.apply(t,e||[])).next())})},ko=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},EM=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},zw=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function AEe(t){if(!t||t.length===0)throw new ko("Path Validation Error: At least one directory or file path is required")}o(AEe,"checkPaths");function OX(t){if(t.length>512)throw new ko(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new ko(`KeyValidationError:${t}cannotcontaincommas.`)}o(OX,"checkKey");function EX(){return G3()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}o(EX,"isFeatureAvailable");function dEe(t,e,r,n){return yM(this,arguments,void 0,function*(s,i,a,c,u=!1){let p=G3();return T(`Cacheserviceversion:${p}`),AEe(s),p==="v2"?yield yEt(s,i,a,c,u):yield EEt(s,i,a,c,u)})}o(dEe,"restoreCache");function EEt(t,e,r,n){return yM(this,arguments,void 0,function*(s,i,a,c,u=!1){a=a||[];let p=[i,...a];if(T("Resolved Keys:"),T(JSON.stringify(p)),p.length>10)throw new ko("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of p)OX(d);let l=yield kO(),A="";try{let d=yield d3e(p,s,{compressionMethod:l,enableCrossOsArchive:u});if(!d?.archiveLocation)return;if(c?.lookupOnly)return W("Lookup only - skipping download"),d.cacheKey;A=aE.join(yield QO(),_l(l)),T(`ArchivePath:${A}`),yield iH(d.archiveLocation,A,c),Iu()&&(yield oE(A,l));let h=Ia(A);return W(`CacheSize:~${Math.round(h/(1024*1024))}MB(${h}B)`),yield gX(A,l),W("Cache restored successfully"),d.cacheKey}catch(d){let h=d;if(h.name===ko.name)throw d;h instanceof Ra&&typeof h.statusCode=="number"&&h.statusCode>=500?Mb(`Failedtorestore:${d.message}`):yt(`Failedtorestore:${d.message}`)}finally{try{yield PO(A)}catch(d){T(`Failedtodeletearchive:${d}`)}}})}o(EEt,"restoreCacheV1");function yEt(t,e,r,n){return yM(this,arguments,void 0,function*(s,i,a,c,u=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let p=[i,...a];if(T("Resolved Keys:"),T(JSON.stringify(p)),p.length>10)throw new ko("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of p)OX(A);let l="";try{let A=bX(),d=yield kO(),h={key:i,restoreKeys:a,version:Rb(s,d,u)},m=yield A.GetCacheEntryDownloadURL(h);if(!m.ok){T(`Cachenotfoundforversion${h.version}ofkeys:${p.join(", ")}`);return}if(h.key!==m.matchedKey?W(`Cachehitforrestore-key:${m.matchedKey}`):W(`Cachehitfor:${m.matchedKey}`),c?.lookupOnly)return W("Lookup only - skipping download"),m.matchedKey;l=aE.join(yield QO(),_l(d)),T(`Archivepath:${l}`),T(`Startingdownloadofarchiveto:${l}`),yield iH(m.signedDownloadUrl,l,c);let C=Ia(l);return W(`CacheSize:~${Math.round(C/(1024*1024))}MB(${C}B)`),Iu()&&(yield oE(l,d)),yield gX(l,d),W("Cache restored successfully"),m.matchedKey}catch(A){let d=A;if(d.name===ko.name)throw A;d instanceof Ra&&typeof d.statusCode=="number"&&d.statusCode>=500?Mb(`Failedtorestore:${A.message}`):yt(`Failedtorestore:${A.message}`)}finally{try{l&&(yield PO(l))}catch(A){T(`Failedtodeletearchive:${A}`)}}})}o(yEt,"restoreCacheV2");function yX(t,e,r){return yM(this,arguments,void 0,function*(n,s,i,a=!1){let c=G3();return T(`Cacheserviceversion:${c}`),AEe(n),OX(s),c==="v2"?yield BEt(n,s,i,a):yield CEt(n,s,i,a)})}o(yX,"saveCache");function CEt(t,e,r){return yM(this,arguments,void 0,fu
`)}o(gyt,"_buildMessageForResponseErrors");var zyt=class extends Error{static{o(this,"GraphqlResponseError")}constructor(t,e,r){super(gyt(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},Oyt=["method","baseUrl","url","headers","request","query","mediaType","operationName"],Eyt=["query","method","url"],eye=/\/api\/v3\/?$/;function yyt(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(Eyt.includes(a))return Promise.reject(new Error(`[@octokit/graphql]"${a}"cannotbeusedasvariablename`))}let n=typeof e=="string"?Object.assign({query:e},r):e,s=Object.keys(n).reduce((a,c)=>Oyt.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),i=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return eye.test(i)&&(s.url=i.replace(eye,"/api/graphql")),t(s).then(a=>{if(a.data.errors){let c={};for(let u of Object.keys(a.headers))c[u]=a.headers[u];throw new zyt(s,c,a.data)}return a.data.data})}o(yyt,"graphql");function xX(t,e){let r=t.defaults(e);return Object.assign(o((s,i)=>yyt(r,s,i),"newApi"),{defaults:xX.bind(null,r),endpoint:r.endpoint})}o(xX,"withDefaults");var wv0=xX(lE,{headers:{"user-agent":`octokit-graphql.js/${myt}${tA()}`},method:"POST",url:"/graphql"});function tye(t){return xX(t,{method:"POST",url:"/graphql"})}o(tye,"withCustomRequest");var _X="(?:[a-zA-Z0-9_-]+)",rye="\\.",nye=new RegExp(`^${_X}${rye}${_X}${rye}${_X}$`),Cyt=nye.test.bind(nye);async function Byt(t){let e=Cyt(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}o(Byt,"auth");function Dyt(t){return t.split(/\./).length===3?`bearer${t}`:`token${t}`}o(Dyt,"withAuthorizationPrefix");async function qyt(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=Dyt(t),e(s)}o(qyt,"hook");var sye=o(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(Byt.bind(null,e),{hook:qyt.bind(null,e)})},"createTokenAuth2");var WX="7.0.6";var iye=o(()=>{},"noop"),Iyt=console.warn.bind(console),Ryt=console.error.bind(console);function wyt(t={}){return typeof t.debug!="function"&&(t.debug=iye),typeof t.info!="function"&&(t.info=iye),typeof t.warn!="function"&&(t.warn=Iyt),typeof t.error!="function"&&(t.error=Ryt),t}o(wyt,"createLogger");var oye=`octokit-core.js/${WX}${tA()}`,vw=class{static{o(this,"Octokit")}static VERSION=WX;static defaults(e){return class extends this{static{o(this,"OctokitWithDefaults")}constructor(...n){let s=n[0]||{};if(typeof e=="function"){super(e(s));return}super(Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent}${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{o(this,"NewOctokit")}static plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new vEe.Collection,n={baseUrl:lE.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent}${oye}`:oye,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=lE.defaults(n),this.graphql=tye(this.request).defaults(n),this.log=wyt(e.log),this.hook=r,e.authStrategy){let{authStrategy:i,...a}=e,c=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},e.auth));r.wrap("request",c.hook),this.auth=c}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let i=sye(e.auth);r.wrap("request",i.hook),this.auth=i}let s=this.constructor;for(let i=0;i<s.plugins.length;++i)
`,a).length:A,p?(c===null?0:c.length)+u.length:0,p?u.length+A:0);return d<h},"__needMoreData"),parse:o(function(n,s,i,a){let{bom:c,comment_no_infix:u,encoding:p,from_line:l,ltrim:A,max_record_size:d,raw:h,relax_quotes:m,rtrim:z,skip_empty_lines:C,to:E,to_line:B}=this.options,{comment:I,escape:w,quote:N,record_delimiter:x}=this.options,{bomSkipped:Q,previousBuf:$,rawBuffer:me,escapeIsQuote:De}=this.state,Z;if($===void 0)if(n===void 0){a();return}else Z=n;else $!==void 0&&n===void 0?Z=$:Z=Buffer.concat([$,n]);if(Q===!1)if(c===!1)this.state.bomSkipped=!0;else if(Z.length<3){if(s===!1){this.state.previousBuf=Z;return}}else{for(let J in LM)if(LM[J].compare(Z,0,LM[J].length)===0){let ve=LM[J].length;this.state.bufBytesStart+=ve,Z=Z.slice(ve);let re=JV({...this.original_options,encoding:J});for(let ze in re)this.options[ze]=re[ze];({comment:I,escape:w,quote:N}=this.options);break}this.state.bomSkipped=!0}let qe=Z.length,Y;for(Y=0;Y<qe&&!this.__needMoreData(Y,qe,s);Y++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),B!==-1&&this.info.lines>B){this.state.stop=!0,a();return}this.state.quoting===!1&&x.length===0&&this.__autoDiscoverRecordDelimiter(Z,Y)&&(x=this.options.record_delimiter);let J=Z[Y];if(h===!0&&me.append(J),(J===pDt||J===lDt)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(w!==null&&this.state.quoting===!0&&this.__isEscape(Z,Y,J)&&Y+w.length<qe)if(De){if(this.__isQuote(Z,Y+w.length)){this.state.escaping=!0,Y+=w.length-1;continue}}else{this.state.escaping=!0,Y+=w.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(Z,Y))if(this.state.quoting===!0){let ze=Z[Y+N.length],at=z&&this.__isCharTrimable(Z,Y+N.length),Lt=I!==null&&this.__compareBytes(I,Z,Y+N.length,ze),Pe=this.__isDelimiter(Z,Y+N.length,ze),s0=x.length===0?this.__autoDiscoverRecordDelimiter(Z,Y+N.length):this.__isRecordDelimiter(ze,Z,Y+N.length);if(w!==null&&this.__isEscape(Z,Y,J)&&this.__isQuote(Z,Y+w.length))Y+=w.length-1;else if(!ze||Pe||s0||Lt||at){this.state.quoting=!1,this.state.wasQuoting=!0,Y+=N.length-1;continue}else if(m===!1){let Rt=this.__error(new Ot("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got"${String.fromCharCode(ze)}"`,`atline${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Rt!==void 0)return Rt}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(N),Y+=N.length-1}else if(this.state.field.length!==0){if(m===!1){let ze=this.__infoField(),at=Object.keys(LM).map(Pe=>LM[Pe].equals(this.state.field.toString())?Pe:!1).filter(Boolean)[0],Lt=this.__error(new Ot("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`aquoteisfoundonfield${JSON.stringify(ze.column)}atline${ze.lines},valueis${JSON.stringify(this.state.field.toString(p))}`,at?`(${at}bom)`:void 0],this.options,ze,{field:this.state.field}));if(Lt!==void 0)return Lt}}else{this.state.quoting=!0,Y+=N.length-1;continue}if(this.state.quoting===!1){let ze=this.__isRecordDelimiter(J,Z,Y);if(ze!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=l){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),Y+=ze-1;continue}if(C===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,Y+=ze-1;continue}this.info.bytes=this.state.bufBytesStart+Y;let Pe=this.__onField();if(Pe!==void 0)return Pe;this.info.bytes=this.state.bufBytesStart+Y+ze;let s0=this.__onRecord(i);if(s0!==void 0)return s0;if(E!==-1&&this.info.records>=E){this.state.stop=!0,a();return}}this.state.commenting=!1,Y+=ze-1;continue}if(this.state.commenting)continue;if(I!==null&&(u===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(I,Z,Y,J)!==0){this.state.commenting=!0;continue}let at=this.__isDelimite
Moreinfo:${u.url}`);let h=u.range&&u.range.length>0?u.range[0]?.start.line:void 0,m=!1;for(let z of a)if(z.remote||z.path.endsWith(p)&&z.content===l){c.push({title:A,message:d,file:z.path,startLine:h}),m=!0;break}m||T(`Buildx.convertWarningsToGitHubAnnotations:skippingwarningwithoutmatchingDockerfile${p}:${A}`)}return c}};var v2=_(require("fs"),1),ej=_(require("path"),1);var CS=class t{static{o(this,"Build")}buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new e0,this.iidFilename=`build-iidfile-${Bt.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${Bt.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),n=e?.attrs||{},s=Object.entries(n).filter(([h])=>!r.has(h)),i=Bt.parseBoolOrDefault(n["fetch-by-commit"]),a=e?.ref||n.ref||un.ref;a.startsWith("refs/")?a.startsWith("refs/pull/")&&Bt.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(a=a.replace(/\/merge$/g,"/head")):a=`refs/heads/${a}`;let c=`${Ct.serverURL}/${un.repo.owner}/${un.repo.repo}.git`,u=e?.checksum||n.checksum,p=e?.subdir||n.subdir,l=e?.format;if(!l){if(l="fragment",s.length>0)l="query";else if(Bt.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(l="query")}catch{}}let A=un.sha||a;a.startsWith("refs/pull/")&&a.endsWith("/head")&&(A=typeof un.payload.pull_request?.head?.sha=="string"?un.payload.pull_request.head.sha:a);let d=u||A;if(l==="query"){let h=[`ref=${i||u?a:d}`],m=i?d:u;m&&h.push(`checksum=${m}`),p&&p!=="."&&h.push(`subdir=${p}`);for(let[z,C]of s)h.push(`${z}=${C}`);return`${c}?${h.join("&")}`}return`${c}#${d}${p&&p!=="."?`:${p}`:""}`}getImageIDFilePath(){return ej.default.join(zt.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(v2.default.existsSync(e))return v2.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return ej.default.join(zt.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!v2.default.existsSync(e))return;let r=v2.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,n]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${n}`}static resolveSecretFile(e){let[r,n]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${n}`}static resolveSecretEnv(e){let[r,n]=t.parseSecretKvp(e);return`id=${r},env=${n}`}static resolveSecret(e,r){let[n,s]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!v2.default.existsSync(s))throw new Error(`secretfile${s}notfound`);return[n,s]}let i=zt.tmpName({tmpdir:zt.tmpDir()});return v2.default.writeFileSync(i,s),[n,i]}static getProvenanceInput(e){let r=Ss(e);if(!r)return r;try{return nde(e)?`builder-id=${Ct.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${Ct.workflowRunURL(!0)}`;let r=Ys(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of r)if(n.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return e;return`${e},builder-id=${Ct.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let n="registry",s="",i="",a=Ys(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let c of a){let u=c.toString().split(/(?<=^[^=]+?)=/).map(p=>p.trim());u[0]==="type"?n=u[1]:u[0]==="repository"?s=u[1]:u[0]==="ghtoken"&&(i=u[1])}return n==="gha"&&(s||(e=`${e},repository=${Ct.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExp
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let s of n){if(s.length==1&&!s[0].startsWith("type="))return e=="local";for(let[i,a]of s.map(c=>c.split("=").map(u=>u.trim())))if(i=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let n=Ys(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let s of n)for(let[i,a]of s.map(c=>c.split("=").map(u=>u.trim())))if(i=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=Ys(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),n=[];for(let s of r)for(let i of s)try{let a=Bt.parseBool(i);n.push(`disabled=${!a}`)}catch{n.push(i)}return n.join(",")}static hasGitAuthTokenSecret(e,r){for(let n of e){if(r&&n.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(n.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let n=e.indexOf("="),s=e.substring(0,n),i=e.substring(n+1);if(s.length==0||i.length==0)throw new Error(`${e}isnotavalidsecret`);return r&&Ea(i),[s,i]}};var tj=_(require("fs"),1),F4e=_(require("path"),1);var BS=class t{static{o(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new e0,this.metadataFilename=`bake-metadata-${Bt.generateRandomString()}.json`}getMetadataFilePath(){return F4e.default.join(zt.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!tj.default.existsSync(e))return;let r=tj.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let n in e)"buildx.build.ref"in e[n]&&r.push(e[n]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});let n=["bake"],s,i=[],a=[...e.files||[],e.source];if(a){for(let u of a.map(p=>p?p.trim():""))if(u.length!=0){if(!Bt.isValidRef(u)){i.push(u);continue}if(s)throw new Error("Only one remote bake definition can be defined");s=u}}s&&n.push(s);for(let u of i)n.push("--file",u);if(e.overrides)for(let u of e.overrides)n.push("--set",u);if(e.vars)for(let u of e.vars)n.push("--var",u);if(e.allow)for(let u of e.allow)n.push("--allow",u);e.call&&n.push("--call",e.call),e.load&&n.push("--load"),e.noCache&&n.push("--no-cache"),e.provenance&&n.push("--provenance",e.provenance),e.push&&n.push("--push"),e.sbom&&n.push("--sbom",e.sbom);let c=await this.buildx.getCommand([...n,"--print",...e.targets||[]]);return await We.getExecOutput(c.command,c.args,r).then(u=>{if(u.stderr.length>0&&u.exitCode!=0)throw new Error(`cannotparsebakedefinitions:${u.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(u.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let n in r.target){let s=r.target[n];s.attest&&Array.isArray(s.attest)&&(s.attest=s.attest.map(i=>t.parseAttestEntry(i))),s["cache-from"]&&Array.isArray(s["cache-from"])&&(s["cache-from"]=s["cache-from"].map(i=>t.parseCacheEntry(i))),s["cache-to"]&&Array.isArray(s["cache-to"])&&(s["cache-to"]=s["cache-to"].map(i=>t.parseCacheEntry(i))),s.output&&Array.isArray(s.output)&&(s.output=s.output.map(i=>t.parseExportEntry(i))),s.secret&&Array.isArray(s.secret)&&(s.secret=s.secret.map(i=>t.parseSecretEntry(i))),s.ssh&&Array.isArray(s.ssh)&&(s.ssh=s.ssh.map(i=>t.parseSSHEntry(i)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},n=Ys(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of n){let[i,a]=s.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(i){case"type":r.type=a;break;case"disabled":r.disabled=Bt.parseBool(a);break;default:r[i]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},n=Ys(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&!n[0].includes("="))return r.type="registry",r.ref=n[0],r;for(let s of n){let[i,a]=s.toString().
`).map(s=>s.trim()).filter(s=>s.length>0);return n}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var Hxe=require("crypto"),jc=_(require("fs"),1),HA=_(require("path"),1);var HC=_(SE(),1),$c=_(Fve(),1),Xxe=_(Hte(),1),Bg=_(Wxe(),1);var X0e=_(SE(),1);var Qxe=_(vs(),1);var Lxe="application/vnd.oci.empty.v1+json";var Vp=class{static{o(this,"Cosign")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await We.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(T(`Cosign.isAvailablecmderr:${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(T(`Cosign.isAvailableerror:${r}`),!1));return T(`Cosign.isAvailable:${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await We.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 We.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return T("Cosign.versionSatisfies false: undefined version"),!1;let s=Qxe.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return T(`Cosign.versionSatisfies${n}statisfies${e}:${s}`),s}static parseCommandOutput(e){let r,n,s,i;for(let a of e.split(/\r?\n/)){let c=a.trim();if(!c.startsWith("{")||!c.endsWith("}"))continue;let u;try{u=JSON.parse(c)}catch{continue}if(u&&Array.isArray(u.errors)&&u.errors.length>0&&(i=u.errors),!r&&u&&Array.isArray(u.manifests)&&u.manifests.length>0){let p=u.manifests[0];p?.artifactType===X0e.BUNDLE_V03_MEDIA_TYPE&&typeof p.digest=="string"?r=p.digest:p?.artifactType===Lxe&&typeof p.digest=="string"&&(n=p.digest)}if(!s&&u&&u.mediaType===X0e.BUNDLE_V03_MEDIA_TYPE&&(s=u),s&&(r||n)){i=void 0;break}}return{bundle:s,signatureManifestDigest:r||n,errors:i}}};var V0e=_(require("fs"),1);var wT=class t{static{o(this,"ImageTools")}buildx;constructor(e){this.buildx=e?.buildx||new e0}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 n=r.manifests.filter(a=>a.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return n;let s=e.platform,i=new Map;for(let a of r.manifests)a.digest&&i.set(a.digest,a);return n.filter(a=>{let c=a.annotations?.["vnd.docker.reference.digest"];if(!c)return!1;let u=i.get(c);return u?u.platform?.os===s.os&&u.platform?.architecture===s.architecture&&(u.platform?.variant??"")===(s.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],n=zt.tmpName({tmpdir:zt.tmpDir(),template:"imagetools-metadata-XXXXXX"}),s=[],i=[];for(let c of e.sources){if(c.startsWith("cwd://")){let u=c.substring(6);u.length>0&&s.push(u);continue}i.push(c)}if(e.tags)for(let c of e.tags)r.push("--tag",c);if(e.platforms)for(let c of e.platforms)r.push("--platform",c);if(e.annotations)for(let c of e.annotations)r.push("--annotation",c);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",n);for(let c of s)r.push("--file",c
${a.message}`),await new Promise(p=>setTimeout(p,Math.pow(2,c)*100))}throw a??new Error(`ImageToolsinspectcommandfailedfor${e.name}`)}async execInspect(e,r,n){return await We.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(s=>{if(s.stderr.length>0&&s.exitCode!=0)throw new Error(s.stderr.trim());return n(JSON.parse(s.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown|not found: not found)/i.test(e)}};var Pxe="application/vnd.in-toto+json";var kxe="https://fulcio.sigstore.dev",Uxe="https://rekor.sigstore.dev",Gxe="https://timestamp.sigstore.dev",Wf="https://search.sigstore.dev";var uXt="slsaprovenance1",XA=class t{static{o(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new Vp,this.imageTools=e?.imageTools||new wT}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 n=this.signingEndpoints(e.noTransparencyLog);W(`UsingSigstoresigningendpoint:${n.fulcioURL}`);let s=t.noTransparencyLog(e.noTransparencyLog),i=[];await this.cosign.versionSatisfies(">=3.0.4")?await pr("Creating Sigstore protobuf signing config",async()=>{let a=zt.tmpName({template:"signing-config-XXXXXX.json",tmpdir:zt.tmpDir()}),c=["signing-config","create","--with-default-services=true",`--out=${a}`];s&&c.push("--no-default-rekor=true"),await We.exec(this.cosign.binPath,c,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),W(JSON.stringify(JSON.parse(jc.default.readFileSync(a,{encoding:"utf-8"})),null,2)),i.push(`--signing-config=${a}`)}):(i.push("--use-signing-config"),s&&i.push("--tlog-upload=false"));for(let a of e.imageNames){let c=await this.imageTools.attestationDigests({name:`${a}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let u of c){let p=`${a}@${u}`;await pr(`Signingattestationmanifest${p}`,async()=>{let l=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...i];W(`[command]${this.cosign.binPath}${[...l,p].join(" ")}`);let A=await We.getExecOutput(this.cosign.binPath,["--verbose",...l,p],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),d=Vp.parseCommandOutput(A.stderr.trim());if(A.exitCode!=0)if(d.errors&&d.errors.length>0){let m=d.errors.map(z=>`-[${z.code}]${z.message}:${z.detail}`).join(`
${p}`),await new Promise(l=>setTimeout(l,Math.pow(2,a)*100));else throw i}else throw new Error(`Cosignverifycommandfailedwith:${c.stderr.trim().split(/\r?\n/).filter(p=>p.length>0).pop()??"unknown error"}`)}throw i}async signProvenanceBlobs(e){let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n=this.signingEndpoints(e.noTransparencyLog);W(`UsingSigstoresigningendpoint:${n.fulcioURL}`);let s=t.getProvenanceBlobs(e);for(let i of Object.keys(s))await pr(`Signing${i}`,async()=>{let a=s[i],c=HA.default.join(HA.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),u=t.getProvenanceSubjects(a);if(u.length===0){yt(`Nosubjectsfoundinprovenance${i},skipsigning.`);return}let p=await t.signPayload({data:a,type:Pxe},n),l=t.parseBundle(p);W("Provenance blob signed for:");for(let A of u){let[d,h]=Object.entries(A.digest)[0]||[];W(`-${A.name}(${d}:${h})`)}l.tlogID&&W(`AttestationsignatureuploadedtoRekortransparencylog:${Wf}?logIndex=${l.tlogID}`),W(`WritingSigstorebundleto:${c}`),jc.default.writeFileSync(c,JSON.stringify(l.payload,null,2),{encoding:"utf-8"}),r[i]={...l,bundlePath:c,subjects:u}})}catch(n){throw new Error(`SigningBuildKitprovenanceblobsfailed:${n.message}`)}return r}async verifySignedArtifacts(e,r){let n={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[s,i]of Object.entries(e)){let a=HA.default.dirname(s);await pr(`Verifyingsignaturebundle${i.bundlePath}`,async()=>{for(let c of i.subjects){let u=HA.default.join(a,c.name);W(`Verifyingsignedartifact${u}`);let p=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??uXt];(r.noTransparencyLog||!i.tlogID)&&p.push("--use-signed-timestamps","--insecure-ignore-tlog");let l=await We.getExecOutput(this.cosign.binPath,[...p,"--bundle",i.bundlePath,u],{ignoreReturnCode:!0});if(l.stderr.length>0&&l.exitCode!=0)throw new Error(l.stderr);n[u]={bundlePath:i.bundlePath,cosignArgs:p}}})}return n}async verifyArtifact(e,r,n){W("Verifying keyless verification bundle signature");let s=JSON.parse(jc.default.readFileSync(r,"utf-8")),i=(0,HC.bundleFromJSON)(s);W("Fetching Sigstore TUF trusted root metadata");let a=await Xxe.getTrustedRoot(),c=(0,Bg.toTrustMaterial)(a);try{W("Verifying artifact signature");let u=(0,Bg.toSignedEntity)(i,jc.default.readFileSync(e)),p=t.parseCertificate(i),l=i.verificationMaterial.tlogEntries,A=l.length>0?l[0].logIndex:void 0;if(n?.subjectAlternativeName&&n?.subjectAlternativeName instanceof RegExp){let m=p.subjectAltName?.replace(/^uri:/i,"");if(m){if(!m.match(n.subjectAlternativeName))throw new Error(`SigningcertificatesubjectAlternativeName"${m}"doesnotmatchexpectedpattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let h=new Bg.Verifier(c).verify(u,{subjectAlternativeName:n?.subjectAlternativeName&&typeof n.subjectAlternativeName=="string"?n.subjectAlternativeName:void 0,extensions:n?.issuer?{issuer:n.issuer}:void 0});return T(`Sigstore.verifyArtifactsigner:${JSON.stringify(h)}`),{payload:s,certificate:p.toString(),tlogID:A}}catch(u){throw new Error(`Failedtoverifyartifactsignature:${u}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),W(`Uploadtotransparencylog:${e?"disabled":"enabled"}`),{fulcioURL:kxe,rekorURL:e?void 0:Uxe,tsaServerURL:Gxe}}static noTransparencyLog(e){return e??Ct.context.payload.repository?.private}static getProvenanceBlobs(e){let r=HA.default.join(e.localExportDir,"provenance.json");if(jc.default.existsSync(r))return{[r]:jc.default.readFileSync(r)};let n=jc.default.readdirSync(e.localExportDir,{withFileTypes:!0}),s=n.filter(i=>i.isDirectory());if(s.length>0&&s.length===n.length&&s.every(i=>jc.default.existsSync(HA.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let a of s){let c=
`,bakeTarget:Ss("bake-target")||"docker-metadata-action",githubToken:Ss("github-token")}}o(Jxe,"getInputs");async function Kxe(t,e){switch(t){case"workflow":return await pXt(e);case"git":return await lXt();default:throw new Error(`Invalidcontextsource:${t}`)}}o(Kxe,"getContext");async function pXt(t){let e=Ct.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 AXt(e.sha,t),...e}}o(pXt,"getContextFromWorkflow");async function lXt(){let t=await tp.context();return{commitDate:await tp.commitDate(t.sha),...t}}o(lXt,"getContextFromGit");async function AXt(t,e){let r=Ct.context.payload;if(r.commits){let n=r.commits.find(s=>s.id===t)?.timestamp;if(n)return new Date(n)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let n=await e.github.octokit.rest.repos.getCommit({owner:Ct.context.repo.owner,repo:Ct.context.repo.repo,ref:t});if(n.data.commit.committer?.date)return new Date(n.data.commit.committer.date);throw new Error("Committer date not found")}catch(n){return T(`FailedtogetcommitdatefromGitHubAPI:${n.message}`),new Date}}o(AXt,"getCommitDateFromWorkflow");var sl=_(jV(),1),jHe=_(require("fs"),1),$He=_(require("path"),1),U4=_(s_e(),1),pi=_(LHe(),1),Yg=_(vs(),1);var ut=class t extends Error{static{o(this,"CsvError")}constructor(e,r,n,...s){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let i of s)for(let a in i){let c=i[a];this[a]=Buffer.isBuffer(c)?c.toString(n.encoding):c==null?c:JSON.parse(JSON.stringify(c))}}};var k4=o(function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)},"is_object");var Wx=o(function(t){let e=[];for(let r=0,n=t.length;r<n;r++){let s=t[r];if(s==null||s===!1)e[r]={disabled:!0};else if(typeof s=="string"||typeof s=="number")e[r]={name:`${s}`};else if(k4(s)){if(typeof s.name!="string")throw new ut("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property"name"isrequiredatposition${r}`,"when column is an object literal"]);e[r]=s}else throw new ut("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got${JSON.stringify(s)}atposition${r}`])}return e},"normalize_columns_array");var gne=class{static{o(this,"ResizeableBuffer")}constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let r=this.length+e.length;if(r>=this.size&&(this.resize(),r>=this.size))throw Error("INVALID_BUFFER_STATE");let n=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{let r=this.length++;r===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,r)}}append(e){let r=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let r=Buffer.allocUnsafe(this.size);this.buf.copy(r,0,0,e),this.buf=r}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},zne=gne;var QHe=o(function(t){let e=[32,9,10,13,12,11,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288,65279].reduce((n,s)=>{let i=Buffer.from(String.fromCharCode(s),t.encoding);return s!==63&&i.length===1&&i[0]===63||n.push(i),n},[]),r=new Uint8Array(256);for(let n of e)r[n[0]]=1;return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,delimiterBufPrevious:void 0,delimiterDiscovered:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Arra
`,a).length:A,p?(c===null?0:c.length)+u.length:0,p?u.length+A:0);return d<h},"__needMoreData"),parse:o(function(n,s,i,a){let{bom:c,comment_no_infix:u,delimiter_auto:p,encoding:l,from_line:A,ltrim:d,max_record_size:h,raw:m,relax_quotes:z,rtrim:C,skip_empty_lines:E,to:B,to_line:I}=this.options,{comment:w,escape:N,quote:x,record_delimiter:Q}=this.options,{bomSkipped:$,delimiterDiscovered:me,delimiterBufPrevious:De,rawBuffer:Z,escapeIsQuote:qe}=this.state;if(!me&&p){let ze;if(De===void 0?ze=n:De!==void 0&&n===void 0?ze=De:ze=Buffer.concat([De,n]),n=void 0,s||ze.length>p.size)this.options.delimiter=[Buffer.from(kHe(ze,this.options.delimiter_auto))],this.state.previousBuf=ze,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=ze;return}}let{previousBuf:Y}=this.state,J;if(Y===void 0)if(n===void 0){a();return}else J=n;else Y!==void 0&&n===void 0?J=Y:J=Buffer.concat([Y,n]);if($===!1)if(c===!1)this.state.bomSkipped=!0;else if(J.length<3){if(s===!1){this.state.previousBuf=J;return}}else{for(let ze in $g)if($g[ze].compare(J,0,$g[ze].length)===0){let at=$g[ze].length;this.state.bufBytesStart+=at,J=J.slice(at);let Lt=jg({...this.original_options,encoding:ze});for(let Pe in Lt)this.options[Pe]=Lt[Pe];({comment:w,escape:N,quote:x}=this.options);break}this.state.bomSkipped=!0}let ve=J.length,re;for(re=0;re<ve&&!this.__needMoreData(re,ve,s);re++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),I!==-1&&this.info.lines>I){this.state.stop=!0,a();return}this.state.quoting===!1&&Q.length===0&&this.__autoDiscoverRecordDelimiter(J,re)&&(Q=this.options.record_delimiter);let ze=J[re];if(m===!0&&Z.append(ze),(ze===rs0||ze===ns0)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(N!==null&&this.state.quoting===!0&&this.__isEscape(J,re,ze)&&re+N.length<ve)if(qe){if(this.__isQuote(J,re+N.length)){this.state.escaping=!0,re+=N.length-1;continue}}else{this.state.escaping=!0,re+=N.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(J,re))if(this.state.quoting===!0){let Pe=J[re+x.length],s0=C&&this.__isCharTrimable(J,re+x.length),Rt=w!==null&&this.__compareBytes(w,J,re+x.length,Pe),ce=this.__isDelimiter(J,re+x.length,Pe),li=Q.length===0?this.__autoDiscoverRecordDelimiter(J,re+x.length):this.__isRecordDelimiter(Pe,J,re+x.length);if(N!==null&&this.__isEscape(J,re,ze)&&this.__isQuote(J,re+N.length))re+=N.length-1;else if(!Pe||ce||li||Rt||s0){this.state.quoting=!1,this.state.wasQuoting=!0,re+=x.length-1;continue}else if(z===!1){let Sn=this.__error(new ut("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got"${String.fromCharCode(Pe)}"`,`atline${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(Sn!==void 0)return Sn}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(x),re+=x.length-1}else if(this.state.field.length!==0){if(z===!1){let Pe=this.__infoField(),s0=Object.keys($g).map(ce=>$g[ce].equals(this.state.field.toString())?ce:!1).filter(Boolean)[0],Rt=this.__error(new ut("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`aquoteisfoundonfield${JSON.stringify(Pe.column)}atline${Pe.lines},valueis${JSON.stringify(this.state.field.toString(l))}`,s0?`(${s0}bom)`:void 0],this.options,Pe,{field:this.state.field}));if(Rt!==void 0)return Rt}}else{this.state.quoting=!0,re+=x.length-1;continue}if(this.state.quoting===!1){let Pe=this.__isRecordDelimiter(ze,J,re);if(Pe!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=A){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),re+=Pe-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,re+=Pe-1;continue}this.info.bytes=this.state.bufBytesStart+r
`,i),Buffer.from("\r",i)];e:for(let c=0;c<a.length;c++){let u=a[c].length;for(let p=0;p<u;p++)if(a[c][p]!==n[s+p])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:o(function(n){let{encoding:s,raw:i,skip_records_with_error:a}=this.options,c=typeof n=="string"?new Error(n):n;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(c,i?this.state.rawBuffer.toString(s):void 0)}catch(u){return u}return}else return c},"__error"),__infoDataSet:o(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:o(function(){let{columns:n,raw:s,encoding:i}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:s?this.state.rawBuffer.toString(i):void 0}},"__infoRecord"),__infoField:o(function(){let{columns:n}=this.options,s=Array.isArray(n),i=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:i,column:s===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var Zf=o(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=Lx(e),s=o(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),i=o(()=>{},"close"),a=n.parse(t,!0,s,i);if(a!==void 0)throw a;return r},"parse");function HHe(t){let e=[];if(t.length==1){let r=!1,n=Zf(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of n){let i=s.toString().split("=").map(a=>a.trim());if(i.length==1)e.push({name:i[0],enable:!0});else{r=!0;break}}if(!r)return GHe(e)}e=[];for(let r of t){let n={name:"",enable:!0},s=Zf(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of s){let a=i.toString().split("=").map(c=>c.trim());if(a.length==1)n.name=a[0];else{let c=a[0].toLowerCase(),u=a[1];switch(c){case"name":{n.name=u;break}case"enable":{if(!["true","false"].includes(u))throw new Error(`Invalidenableattributevalue:${r}`);n.enable=/true/i.test(u);break}default:throw new Error(`Unknownimageattribute:${r}`)}}}if(n.name.length==0)throw new Error(`Imagenameattributeempty:${r}`);e.push(n)}return GHe(e)}o(HHe,"Transform");function GHe(t){_d("Processing images input");for(let e of t)W(`name=${e.name},enable=${e.enable}`);return Wd(),t}o(GHe,"output");var Ene=(u=>(u.Schedule="schedule",u.Semver="semver",u.Pep440="pep440",u.Match="match",u.Edge="edge",u.Ref="ref",u.Raw="raw",u.Sha="sha",u))(Ene||{}),Qx=(n=>(n.Branch="branch",n.Tag="tag",n.PR="pr",n))(Qx||{}),Px=(r=>(r.Short="short",r.Long="long",r))(Px||{}),One=class{static{o(this,"Tag")}type;attrs;constructor(){this.attrs={}}toString(){let e=[`type=${this.type}`];for(let r in this.attrs)e.push(`${r}=${this.attrs[r]}`);return e.join(",")}},is0={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function XHe(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let n of t)e.push(os0(n));let r=e.sort((n,s)=>Number(n.attrs.priority)<Number(s.attrs.priority)?1:Number(n.attrs.priority)>Number(s.attrs.priority)?-1:0);_d("Processing tags input");for(let n of r)W(n.toString());return Wd(),r}o(XHe,"Transform");function os0(t){let e=Zf(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new One;for(let n of e){let s=n.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim());if(s.length==1)r.attrs.value=s[0];else{let i=s[0].toLowerCase(),a=s[1];switch(i){case"type":{if(!Object.values(Ene).includes(a))throw new Error(`Unknowntagtypeattribute:${a}`);r.type=a;break}default:{r.attrs[i]=a;break}}}}switch(r.type==null&&(r.type="raw"),r.type){case"schedule":{Object.prototype.hasOwnProperty.call(r.attrs,"pattern")||(r.attrs.pattern="nightly");break}case"semver":case"pep440":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missingpatternattributefor${t}`);Object.prototype.hasOwnProp