varOje=Object.create;varcW=Object.defineProperty;varEje=Object.getOwnPropertyDescriptor;varyje=Object.getOwnPropertyNames;varCje=Object.getPrototypeOf,Bje=Object.prototype.hasOwnProperty;varDje=(t,e)=>()=>(t&&(e=t(t=0)),e);varf=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Wse=(t,e)=>{for(varrine)cW(t,r,{get:e[r],enumerable:!0})},qje=(t,e,r,s)=>{if(e&&typeofe=="object"||typeofe=="function")for(letnofyje(e))!Bje.call(t,n)&&n!==r&&cW(t,n,{get:()=>e[n],enumerable:!(s=Eje(e,n))||s.enumerable});returnt};varT=(t,e,r)=>(r=t!=null?Oje(Cje(t)):{},qje(e||!t||!t.__esModule?cW(r,"default",{value:t,enumerable:!0}):r,t));varGse=f(Ah=>{"use strict";var$st=require("net"),vje=require("tls"),dW=require("http"),Pse=require("https"),Fje=require("events"),Yst=require("assert"),Tje=require("util");Ah.httpOverHttp=xje;Ah.httpsOverHttp=Wje;Ah.httpOverHttps=_je;Ah.httpsOverHttps=Lje;functionxje(t){vare=newcu(t);returne.request=dW.request,e}functionWje(t){vare=newcu(t);returne.request=dW.request,e.createSocket=kse,e.defaultPort=443,e}function_je(t){vare=newcu(t);returne.request=Pse.request,e}functionLje(t){vare=newcu(t);returne.request=Pse.request,e.createSocket=kse,e.defaultPort=443,e}functioncu(t){vare=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||dW.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(s,n,i,o){for(vara=Use(n,i,o),c=0,u=e.requests.length;c<u;++c){varp=e.requests[c];if(p.host===a.host&&p.port===a.port){e.requests.splice(c,1),p.request.onSocket(s);return}}s.destroy(),e.removeSocket(s)})}Tje.inherits(cu,Fje.EventEmitter);cu.prototype.addRequest=function(e,r,s,n){vari=this,o=fW({request:e},i.options,Use(r,s,n));if(i.sockets.length>=this.maxSockets){i.requests.push(o);return}i.createSocket(o,function(a){a.on("free",c),a.on("close",u),a.on("agentRemove",u),e.onSocket(a);functionc(){i.emit("free",a,o)}functionu(p){i.removeSocket(a),a.removeListener("free",c),a.removeListener("close",u),a.removeListener("agentRemove",u)}})};cu.prototype.createSocket=function(e,r){vars=this,n={};s.sockets.push(n);vari=fW({},s.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+newBuffer(i.proxyAuth).toString("base64")),al("making CONNECT request");varo=s.request(i);o.useChunkedEncodingByDefault=!1,o.once("response",a),o.once("upgrade",c),o.once("connect",u),o.once("error",p),o.end();functiona(l){l.upgrade=!0}functionc(l,A,h){process.nextTick(function(){u(l,A,h)})}functionu(l,A,h){if(o.removeAllListeners(),A.removeAllListeners(),l.statusCode!==200){al("tunneling socket could not be established, statusCode=%d",l.statusCode),A.destroy();varM=newError("tunneling socket could not be established, statusCode="+l.statusCode);M.code="ECONNRESET",e.request.emit("error",M),s.removeSocket(n);return}if(h.length>0){al("got illegal response body from proxy"),A.destroy();varM=newError("got illegal response body from proxy");M.code="ECONNRESET",e.request.emit("error",M),s.removeSocket(n);return}returnal("tunneling connection has established"),s.sockets[s.sockets.indexOf(n)]=A,r(A)}functionp(l){o.removeAllListeners(),al(`tunneling socket could not be established, cause=%s
`);A.push(g),i+=g.byteLength,M&&(i=null),n=t,s=async function*(){for(let y of A)y.stream?yield*y.stream():yield y},o=`multipart/form-data;boundary=${c}`}else if(Kie(t))n=t,i=t.size,t.type&&(o=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(dz.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:sKe(t)}if((typeof n=="string"||dz.isBuffer(n))&&(i=Buffer.byteLength(n)),s!=null){let c;r=new ReadableStream({async start(){c=s(t)[Symbol.asyncIterator]()},async pull(u){let{value:p,done:l}=await c.next();if(l)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!roe(r)){let A=new Uint8Array(p);A.byteLength&&u.enqueue(A)}return u.desiredSize>0},async cancel(u){await c.return()},type:"bytes"})}return[{stream:r,source:n,length:i},o]}function bKe(t,e=!1){return t instanceof ReadableStream&&(m_(!dz.isDisturbed(t),"The body has already been consumed."),m_(!t.locked,"The stream is locked.")),ioe(t,e)}function MKe(t,e){let[r,s]=e.stream.tee();return e.stream=r,{stream:s,length:e.length,source:e.source}}function mKe(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function gKe(t){return{blob(){return Bh(this,r=>{let s=eoe(this);return s===null?s="":s&&(s=dKe(s)),new pKe([r],{type:s})},t)},arrayBuffer(){return Bh(this,r=>new Uint8Array(r).buffer,t)},text(){return Bh(this,toe,t)},json(){return Bh(this,OKe,t)},formData(){return Bh(this,r=>{let s=eoe(this);if(s!==null)switch(s.essence){case"multipart/form-data":{let n=fKe(r,s);if(n==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new Zie;return i[Dh]=n,i}case"application/x-www-form-urlencoded":{let n=new URLSearchParams(r.toString()),i=new Zie;for(let[o,a]of n)i.append(o,a);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return Bh(this,r=>new Uint8Array(r),t)}}}function zKe(t){Object.assign(t.prototype,gKe(t))}async function Bh(t,e,r){if(uKe.brandCheck(t,r),ooe(t))throw new TypeError("Body is unusable: Body has already been read");mKe(t[Dh]);let s=oKe(),n=o=>s.reject(o),i=o=>{try{s.resolve(e(o))}catch(a){n(a)}};return t[Dh].body==null?(i(Buffer.allocUnsafe(0)),s.promise):(await aKe(t[Dh].body,i,n),s.promise)}function ooe(t){let e=t[Dh].body;return e!=null&&(e.stream.locked||dz.isDisturbed(e.stream))}function OKe(t){return JSON.parse(toe(t))}function eoe(t){let e=t[Dh].headersList,r=cKe(e);return r==="failure"?null:r}aoe.exports={extractBody:ioe,safelyExtractBody:bKe,cloneBody:MKe,mixinBody:zKe,streamRegistry:noe,hasFinalizationRegistry:soe,bodyUnusable:ooe}});var moe=f((Dnt,Moe)=>{"use strict";var Re=require("node:assert"),Qe=t0(),{channels:coe}=fh(),z_=t_(),{RequestContentLengthMismatchError:pd,ResponseContentLengthMismatchError:EKe,RequestAbortedError:foe,HeadersTimeoutError:yKe,HeadersOverflowError:CKe,SocketError:_B,InformationalError:Ih,BodyTimeoutError:BKe,HTTPParserError:DKe,ResponseExceededMaxSizeError:qKe}=m0(),{kUrl:hoe,kReset:Ns,kClient:C_,kParser:Bt,kBlocking:bz,kRunning:Mr,kPending:IKe,kSize:uoe,kWriting:pl,kQueue:bo,kNoRef:fz,kKeepAliveDefaultTimeout:RKe,kHostHeader:wKe,kPendingIdx:SKe,kRunningIdx:ci,kError:ui,kPipelining:xB,kSocket:Rh,kKeepAliveTimeoutValue:LB,kMaxHeadersSize:O_,kKeepAliveMaxTimeout:NKe,kKeepAliveTimeoutThreshold:vKe,kHeadersTimeout:FKe,kBodyTimeout:TKe,kStrictContentLength:B_,kMaxRequests:poe,kCounter:xKe,kMaxResponseSize:WKe,kOnError:_Ke,kResume:ul,kHTTPContext:boe}=ut(),la=nie(),LKe=Buffer.alloc(0),vB=Buffer[Symbol.species],FB=Qe.addListener,QKe=Qe.removeAllListeners,E_;async function PKe(){let t=process.env.JEST_WORKER_ID?n_():void 0,e;try{e=await WebAssembly.compile(aie())}catch{e=await WebAssembly.compile(t||n_())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,s,n)=>0,wasm_on_status:(r,s,n)=>{Re(M1.ptr===r);let i=s-da+Aa.byteOffset;return M1.onStatus(new vB(Aa.buffer,i,n))||0},wasm_on_message_begin:r=>(Re(M1.ptr===r),M1.onMessageBegin()||0),wasm_on_he
`}return coe.sendHeaders.hasSubscribers&&coe.sendHeaders.publish({request:e,headers:g,socket:h}),!c||A===0?Aoe(M,null,t,e,h,p,g,l):Qe.isBuffer(c)?Aoe(M,c,t,e,h,p,g,l):Qe.isBlobLike(c)?typeof c.stream=="function"?doe(M,c.stream(),t,e,h,p,g,l):jKe(M,c,t,e,h,p,g,l):Qe.isStream(c)?VKe(M,c,t,e,h,p,g,l):Qe.isIterable(c)?doe(M,c,t,e,h,p,g,l):Re(!1),!0}function VKe(t,e,r,s,n,i,o,a){Re(i!==0||r[Mr]===0,"stream body cannot be pipelined");let c=!1,u=new QB({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o}),p=function(M){if(!c)try{!u.write(M)&&this.pause&&this.pause()}catch(g){Qe.destroy(this,g)}},l=function(){c||e.resume&&e.resume()},A=function(){if(queueMicrotask(()=>{e.removeListener("error",h)}),!c){let M=new foe;queueMicrotask(()=>h(M))}},h=function(M){if(!c){if(c=!0,Re(n.destroyed||n[pl]&&r[Mr]<=1),n.off("drain",l).off("error",h),e.removeListener("data",p).removeListener("end",h).removeListener("close",A),!M)try{u.end()}catch(g){M=g}u.destroy(M),M&&(M.code!=="UND_ERR_INFO"||M.message!=="reset")?Qe.destroy(e,M):Qe.destroy(e)}};e.on("data",p).on("end",h).on("error",h).on("close",A),e.resume&&e.resume(),n.on("drain",l).on("error",h),e.errorEmitted??e.errored?setImmediate(()=>h(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>h(null)),(e.closeEmitted??e.closed)&&setImmediate(A)}function Aoe(t,e,r,s,n,i,o,a){try{e?Qe.isBuffer(e)&&(Re(i===e.byteLength,"buffer body must have content length"),n.cork(),n.write(`${o}content-length:${i}\r
`,"latin1"):(Re(i===null,"no body must not have content length"),n.write(`${o}\r
`,"latin1")),s.onRequestSent(),r[ul]()}catch(c){t(c)}}async function jKe(t,e,r,s,n,i,o,a){Re(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new pd;let c=Buffer.from(await e.arrayBuffer());n.cork(),n.write(`${o}content-length:${i}\r
`,"latin1"),n.write(c),n.uncork(),s.onBodySent(c),s.onRequestSent(),!a&&s.reset!==!1&&(n[Ns]=!0),r[ul]()}catch(c){t(c)}}async function doe(t,e,r,s,n,i,o,a){Re(i!==0||r[Mr]===0,"iterator body cannot be pipelined");let c=null;function u(){if(c){let A=c;c=null,A()}}let p=()=>new Promise((A,h)=>{Re(c===null),n[ui]?h(n[ui]):c=A});n.on("close",u).on("drain",u);let l=new QB({abort:t,socket:n,request:s,contentLength:i,client:r,expectsPayload:a,header:o});try{for await(let A of e){if(n[ui])throw n[ui];l.write(A)||await p()}l.end()}catch(A){l.destroy(A)}finally{n.off("close",u).off("drain",u)}}var QB=class{constructor({abort:e,socket:r,request:s,contentLength:n,client:i,expectsPayload:o,header:a}){this.socket=r,this.request=s,this.contentLength=n,this.client=i,this.bytesWritten=0,this.expectsPayload=o,this.header=a,this.abort=e,r[pl]=!0}write(e){let{socket:r,request:s,contentLength:n,client:i,bytesWritten:o,expectsPayload:a,header:c}=this;if(r[ui])throw r[ui];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(n!==null&&o+u>n){if(i[B_])throw new pd;process.emitWarning(new pd)}r.cork(),o===0&&(!a&&s.reset!==!1&&(r[Ns]=!0),n===null?r.write(`${c}transfer-encoding:chunked\r
`,"latin1"),r!==null&&n!==r){if(s[B_])throw new pd;process.emitWarning(new pd)}e[Bt].timeout&&e[Bt].timeoutType===wh&&e[Bt].timeout.refresh&&e[Bt].timeout.refresh(),s[ul]()}}destroy(e){let{socket:r,client:s,abort:n}=this;r[pl]=!1,e&&(Re(s[Mr]<=1,"pipeline should only contain this request"),n(e))}};Moe.exports=UKe});var Doe=f((qnt,Boe)=>{"use strict";var pi=require("node:assert"),{pipeline:$Ke}=require("node:stream"),i0=t0(),{RequestContentLengthMismatchError:R_,RequestAbortedError:goe,SocketError:Mz,InformationalError:w_}=m0(),{kUrl:PB,kReset:UB,kClient:Sh,kRunning:GB,kPending:YKe,kQueue:ll,kPendingIdx:S_,kRunningIdx:Mo,kError:go,kSocket:I1,kStrictContentLength:JKe,kOnError:N_,kMaxConcurrentStreams:Coe,kHTTP2Session:mo,kResume:Al,kSize:KKe,kHTTPContext:ZKe}=ut(),fu=Symbol("open streams"),zoe,Ooe=!1,kB;try{kB=require("node:http2")}catch{kB={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:eZe,HTTP2_HEADER_METHOD:tZe,HTTP2_HEADER_PATH:rZe,HTTP2_HEADER_SCHEME:sZe,HTTP2_HEADER_CONTENT_LENGTH:nZe,HTTP2_HEADER_EXPECT:iZe,HTTP2_HEADER_STATUS:oZe}}=kB;function aZe(t){let e=[];for(let[r,s]of Object.entries(t))if(Array.isArray(s))for(let n of s)e.push(Buffer.from(r),Buffer.from(n));else e.push(Buffer.from(r),Buffer.from(s));return e}async function cZe(t,e){t[I1]=e,Ooe||(Ooe=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=kB.connect(t[PB],{createConnection:()=>e,peerMaxConcurrentStreams:t[Coe]});r[fu]=0,r[Sh]=t,r[I1]=e,i0.addListener(r,"error",pZe),i0.addListener(r,"frameError",lZe),i0.addListener(r,"end",AZe),i0.addListener(r,"goaway",dZe),i0.addListener(r,"close",function(){let{[Sh]:n}=this,{[I1]:i}=n,o=this[I1][go]||this[go]||new Mz("closed",i0.getSocketInfo(i));if(n[mo]=null,n.destroyed){pi(n[YKe]===0);let a=n[ll].splice(n[Mo]);for(let c=0;c<a.length;c++){let u=a[c];i0.errorRequest(n,u,o)}}}),r.unref(),t[mo]=r,e[mo]=r,i0.addListener(e,"error",function(n){pi(n.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[go]=n,this[Sh][N_](n)}),i0.addListener(e,"end",function(){i0.destroy(this,new Mz("other side closed",i0.getSocketInfo(this)))}),i0.addListener(e,"close",function(){let n=this[go]||new Mz("closed",i0.getSocketInfo(this));t[I1]=null,this[mo]!=null&&this[mo].destroy(n),t[S_]=t[Mo],pi(t[GB]===0),t.emit("disconnect",t[PB],[t],n),t[Al]()});let s=!1;return e.on("close",()=>{s=!0}),{version:"h2",defaultPipelining:1/0,write(...n){return hZe(t,...n)},resume(){uZe(t)},destroy(n,i){s?queueMicrotask(i):e.destroy(n).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}function uZe(t){let e=t[I1];e?.destroyed===!1&&(t[KKe]===0&&t[Coe]===0?(e.unref(),t[mo].unref()):(e.ref(),t[mo].ref()))}function pZe(t){pi(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[I1][go]=t,this[Sh][N_](t)}function lZe(t,e,r){if(r===0){let s=new w_(`HTTP/2:"frameError"received-type${t},code${e}`);this[I1][go]=s,this[Sh][N_](s)}}function AZe(){let t=new Mz("other side closed",i0.getSocketInfo(this[I1]));this.destroy(t),i0.destroy(this[I1],t)}function dZe(t){let e=this[go]||new Mz(`HTTP/2:"GOAWAY"framereceivedwithcode${t}`,i0.getSocketInfo(this)),r=this[Sh];if(r[I1]=null,r[ZKe]=null,this[mo]!=null&&(this[mo].destroy(e),this[mo]=null),i0.destroy(this[I1],e),r[Mo]<r[ll].length){let s=r[ll][r[Mo]];r[ll][r[Mo]++]=null,i0.errorRequest(r,s,e),r[S_]=r[Mo]}pi(r[GB]===0),r.emit("disconnect",r[PB],[r],e),r[Al]()}function fZe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function hZe(t,e){let r=t[mo],{method:s,path:n,host:i,upgrade:o,expectContinue:a,signal:c,headers:u}=e,{body:p}=e;if(o)return i0.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let l={};for(let R=0;R<u.length;R+=2){let N=u[R+0],x=u[R+1];if(Array.isArray(x))for(let L=0;L<x.length;L++)l[N]?l[N]+=`,${x[L]}`:l[N]=x[L];else l[N]=x}let A,{hostname:h,port:M}=t[PB];l[eZe]=i||`${h}${M?`:${M}`:""}`,l[tZe]=s;let g=R=>{e.aborted||e.completed||(R=R||new goe,i0.errorRequest(t,e,R),A!=null&&i0.destroy(A,R),i0.destroy(p,R),t[ll][t[Mo]++]=null,t[Al]())};try{e.onConnect(g)}catch(R){i0.errorRequest
globstarwhile`,t,p,e,l,A),this.matchOne(t.slice(p),e.slice(l),r))return this.debug("globstar found match!",p,o,A),!0;if(A==="."||A===".."||!s.dot&&A.charAt(0)==="."){this.debug("dot detected!",t,p,e,l);break}this.debug("globstar swallow a segment, and continue"),p++}return!!(r&&(this.debug(`
`;if(s.username||s.password){let A=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(A).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(i))a+=`${A}:${i[A]}\r
`)+4,e.outputData[0].data=e._header+s.substring(n),Sb("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(Sb("Creating `tls.Socket`: %o",this.connectOpts),i=V20.connect(this.connectOpts)):(Sb("Creating `net.Socket`: %o",this.connectOpts),i=X20.connect(this.connectOpts)),await(0,$20.once)(i,"connect"),i}};mI.protocols=["http","https"];Bi.HttpProxyAgent=mI;function J20(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var eme=f(NI=>{"use strict";Object.defineProperty(NI,"__esModule",{value:!0});NI.state=void 0;NI.state={instrumenterImplementation:void 0}});var Mme=f(WI=>{"use strict";Object.defineProperty(WI,"__esModule",{value:!0});WI.state=void 0;WI.state={operationRequestMap:new WeakMap}});var $ze=f($b=>{"use strict";Object.defineProperty($b,"__esModule",{value:!0});var Mg0=require("os"),mg0=require("util");function gg0(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var zg0=gg0(mg0);function Og0(t,...e){process.stderr.write(`${zg0.default.format(t,...e)}${Mg0.EOL}`)}var Lze=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Pze,mG=[],gG=[],rR=[];Lze&&zG(Lze);var kze=Object.assign(t=>Uze(t),{enable:zG,enabled:OG,disable:Eg0,log:Og0});function zG(t){Pze=t,mG=[],gG=[];let e=/\*/g,r=t.split(",").map(s=>s.trim().replace(e,".*?"));for(let s of r)s.startsWith("-")?gG.push(new RegExp(`^${s.substr(1)}$`)):mG.push(new RegExp(`^${s}$`));for(let s of rR)s.enabled=OG(s.namespace)}function OG(t){if(t.endsWith("*"))return!0;for(let e of gG)if(e.test(t))return!1;for(let e of mG)if(e.test(t))return!0;return!1}function Eg0(){let t=Pze||"";return zG(""),t}function Uze(t){let e=Object.assign(r,{enabled:OG(t),destroy:yg0,log:kze.log,namespace:t,extend:Cg0});function r(...s){e.enabled&&(s.length>0&&(s[0]=`${t}${s[0]}`),e.log(...s))}return rR.push(e),e}function yg0(){let t=rR.indexOf(this);return t>=0?(rR.splice(t,1),!0):!1}function Cg0(t){let e=Uze(`${this.namespace}:${t}`);return e.log=this.log,e}var q3=kze,Gze=new Set,eR=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,sR,nR=q3("azure");nR.log=(...t)=>{q3.log(...t)};var EG=["verbose","info","warning","error"];eR&&(jze(eR)?Hze(eR):console.error(`AZURE_LOG_LEVELsettounknownloglevel'${eR}';loggingisnotenabled.Acceptablevalues:${EG.join(", ")}.`));function Hze(t){if(t&&!jze(t))throw new Error(`Unknownloglevel'${t}'.Acceptablevalues:${EG.join(",")}`);sR=t;let e=[];for(let r of Gze)Vze(r)&&e.push(r.namespace);q3.enable(e.join(","))}function Bg0(){return sR}var Qze={verbose:400,info:300,warning:200,error:100};function Dg0(t){let e=nR.extend(t);return Xze(nR,e),{error:tR(e,"error"),warning:tR(e,"warning"),info:tR(e,"info"),verbose:tR(e,"verbose")}}function Xze(t,e){e.log=(...r)=>{t.log(...r)}}function tR(t,e){let r=Object.assign(t.extend(e),{level:e});if(Xze(t,r),Vze(r)){let s=q3.disable();q3.enable(s+","+r.namespace)}return Gze.add(r),r}function Vze(t){return!!(sR&&Qze[t.level]<=Qze[sR])}function jze(t){return EG.includes(t)}$b.AzureLogger=nR;$b.createClientLogger=Dg0;$b.getLogLevel=Bg0;$b.setLogLevel=Hze});var BG=f(R3=>{"use strict";Object.defineProperty(R3,"__esModule",{value:!0});var Yb=new WeakMap,iR=new WeakMap,I3=class t{constructor(){this.onabort=null,Yb.set(this,[]),iR.set(this,!1)}get aborted(){if(!iR.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return iR.get(this)}static get none(){return new t}addEventListener(e,r){if(!Yb.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Yb.get(this).push(r)}removeEventListener(e,r){if(!Yb.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let s=Yb.get(this),n=s.indexOf(r);n>-1&&s.splice(n,1)}dispatchEvent(e){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}};function Yze(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=Yb.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),iR.set(t,!0)}var yG=class extends Error{constructor(e){super(e),t
Seehttps://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function PC0(){Object.keys(Qw).forEach(function(t){delete Qw[t]})}});var kw=f(ac=>{"use strict";ac.__esModule=!0;ac.HandlebarsEnvironment=ZX;function Pye(t){return t&&t.__esModule?t:{default:t}}var y2=us(),kC0=Gn(),JX=Pye(kC0),UC0=VX(),GC0=Wye(),HC0=$X(),Pw=Pye(HC0),XC0=YX(),VC0="4.7.9";ac.VERSION=VC0;var jC0=8;ac.COMPILER_REVISION=jC0;var $C0=7;ac.LAST_COMPATIBLE_COMPILER_REVISION=$C0;var YC0={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"};ac.REVISION_CHANGES=YC0;var KX="[object Object]";function ZX(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},UC0.registerDefaultHelpers(this),GC0.registerDefaultDecorators(this)}ZX.prototype={constructor:ZX,logger:Pw.default,log:Pw.default.log,registerHelper:function(e,r){if(y2.toString.call(e)===KX){if(r)throw new JX.default("Arg not supported with multiple helpers");y2.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(y2.toString.call(e)===KX)y2.extend(this.partials,e);else{if(typeof r>"u")throw new JX.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(y2.toString.call(e)===KX){if(r)throw new JX.default("Arg not supported with multiple decorators");y2.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){XC0.resetLoggedProperties()}};var JC0=Pw.default.log;ac.log=JC0;ac.createFrame=y2.createFrame;ac.logger=Pw.default});var Uye=f((Uw,kye)=>{"use strict";Uw.__esModule=!0;function eV(t){this.string=t}eV.prototype.toString=eV.prototype.toHTML=function(){return""+this.string};Uw.default=eV;kye.exports=Uw.default});var Gye=f(tV=>{"use strict";tV.__esModule=!0;tV.wrapHelper=KC0;function KC0(t,e){if(typeof t!="function")return t;var r=function(){var n=arguments[arguments.length-1];return arguments[arguments.length-1]=e(n),t.apply(this,arguments)};return r}});var Yye=f(eA=>{"use strict";eA.__esModule=!0;eA.checkRevision=n40;eA.template=i40;eA.wrapProgram=Gw;eA.resolvePartial=o40;eA.invokePartial=a40;eA.noop=jye;function ZC0(t){return t&&t.__esModule?t:{default:t}}function e40(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var t40=us(),CM=e40(t40),r40=Gn(),ju=ZC0(r40),$u=kw(),Hye=VX(),s40=Gye(),Xye=YX();function n40(t){var e=t&&t[0]||1,r=$u.COMPILER_REVISION;if(!(e>=$u.LAST_COMPATIBLE_COMPILER_REVISION&&e<=$u.COMPILER_REVISION))if(e<$u.LAST_COMPATIBLE_COMPILER_REVISION){var s=$u.REVISION_CHANGES[r],n=$u.REVISION_CHANGES[e];throw new ju.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+n+").")}else throw new ju.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function i40(t,e){if(!e)throw new ju.default("No environment passed to template");if(!t||!t.main)throw new ju.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function s(o,a,c){c.hash&&(a=CM.extend({},a,c.hash),c.ids&&(c.ids[0]=!0)),o=e.VM.resolvePartial.call(this,o,a,c),c.hooks=this.hooks,c.protoAccessControl=this.protoAccessControl;var u=e.VM.invokePartial.call(this,o,a,c);if(u==null&&e.compile&&(c.partials[c.name]=e.compile(o,t.compilerOptions,e),u=c.partials[c.name](a,c)),u!=null){if(c.indent){for(var p=u.split(`
`+o+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,o,a,c,u,p;this._more||(this.yytext="",this.match="");for(var l=this._currentRules(),A=0;A<l.length&&(a=this._input.match(this.rules[l[A]]),!(a&&(!o||a[0].length>o[0].length)&&(o=a,c=A,!this.options.flex)));A++);return o?(p=o[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],i=this.performAction.call(this,this.yy,this,l[c],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`.Unrecognizedtext.
${A6(u)}${u}`)}catch(u){if(u.code==="ENOENT")return;throw u}return d6(t,c)}Zn.exports.find=Ev0;async function Ev0(t,e){let r=Oy(t,e);try{return(await l6(r)).reduce((n,i)=>i&&i.key===e?d6(t,i):n,null)}catch(s){if(s.code==="ENOENT")return null;throw s}}Zn.exports.delete=yv0;function yv0(t,e,r={}){if(!r.removeFully)return twe(t,e,null,r);let s=Oy(t,e);return ewe(s,{recursive:!0,force:!0})}Zn.exports.lsStream=rwe;function rwe(t){let e=FJ(t),r=new fv0({objectMode:!0});return Promise.resolve().then(async()=>{let{default:s}=await Promise.resolve().then(()=>(p6(),u6)),n=await NJ(e);return await s(n,async i=>{let o=qc.join(e,i),a=await NJ(o);await s(a,async c=>{let u=qc.join(o,c),p=await NJ(u);await s(p,async l=>{let A=qc.join(u,l);try{let M=(await l6(A)).reduce((g,y)=>(g.set(y.key,y),g),new Map);for(let g of M.values()){let y=d6(t,g);y&&r.write(y)}}catch(h){if(h.code==="ENOENT")return;throw h}},{concurrency:SJ})},{concurrency:SJ})},{concurrency:SJ}),r.end(),r}).catch(s=>r.emit("error",s)),r}Zn.exports.ls=Cv0;async function Cv0(t){return(await rwe(t).collect()).reduce((r,s)=>(r[s.key]=s,r),{})}Zn.exports.bucketEntries=l6;async function l6(t,e){let r=await lv0(t,"utf8");return Bv0(r,e)}function Bv0(t){let e=[];return t.split(`
`).forEach(r=>{if(!r)return;let s=r.split(" ");if(!s[1]||A6(s[1])!==s[0])return;let n;try{n=JSON.parse(s[1])}catch{}n&&e.push(n)}),e}Zn.exports.bucketDir=FJ;function FJ(t){return qc.join(t,`index-v${gv0}`)}Zn.exports.bucketPath=Oy;function Oy(t,e){let r=swe(e);return qc.join.apply(qc,[FJ(t)].concat(mv0(r)))}Zn.exports.hashKey=swe;function swe(t){return nwe(t,"sha256")}Zn.exports.hashEntry=A6;function A6(t){return nwe(t,"sha1")}function nwe(t,e){return uv0.createHash(e).update(t).digest("hex")}function d6(t,e,r){return!e.integrity&&!r?null:{key:e.key,integrity:e.integrity,path:e.integrity?Mv0(t,e.integrity):void 0,size:e.size,time:e.time,metadata:e.metadata}}function NJ(t){return Av0(t).catch(e=>{if(e.code==="ENOENT"||e.code==="ENOTDIR")return[];throw e})}});var hm=f(h6=>{"use strict";Object.defineProperty(h6,"__esModule",{value:!0});h6.LRUCache=void 0;var Dv0=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,owe=new Set,TJ=typeof process=="object"&&process?process:{},awe=(t,e,r,s)=>{typeof TJ.emitWarning=="function"?TJ.emitWarning(t,e,r,s):console.error(`[${r}]${e}:${t}`)},f6=globalThis.AbortController,iwe=globalThis.AbortSignal;if(typeof f6>"u"){iwe=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(s,n){this._onabort.push(n)}},f6=class{constructor(){e()}signal=new iwe;abort(s){if(!this.signal.aborted){this.signal.reason=s,this.signal.aborted=!0;for(let n of this.signal._onabort)n(s);this.signal.onabort?.(s)}}};let t=TJ.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=!1,awe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var qv0=t=>!owe.has(t),mA=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),cwe=t=>mA(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?fm:null:null,fm=class extends Array{constructor(e){super(e),this.fill(0)}},xJ=class t{heap;length;static#e=!1;static create(e){let r=cwe(e);if(!r)return[];t.#e=!0;let s=new t(e,r);return t.#e=!1,s}constructor(e,r){if(!t.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},WJ=class t{#e;#t;#s;#r;#n;#i;#c;#a;get perf(){return this.#a}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#l;#d;#A;#u;#b;#O;#M;#m;#B;#g;#y;#C;#h;#E;#D;#z;#p;static unsafeExposeInternals(e){return{starts:e.#C,ttls:e.#h,sizes:e.#y,keyMap:e.#d,keyList:e.#A,valList:e.#u,next:e.#b,prev:e.#O,get head(){return e.#M},get tail(){return e.#m},free:e.#B,isBackgroundFetch:r=>e.#f(r),backgroundFetch:(r,s,n,i)=>e.#U(r,s,n,i),moveToTail:r=>e.#W(r),indexes:r=>e.#w(r),rindexes:r=>e.#N(r),isStale:r=>e.#I(r)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#l}get size(){return this.#o}get fetchMethod(){return this.#i}get memoMethod(){return this.#c}get dispose(){return this.#s}get onInsert(){return this.#r}get disposeAfter(){return this.#n}constructor(e){let{max:r=0,ttl:s,ttlResolution:n=1,ttlAutopurge:i,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:u,onInsert:p,disposeAfter:l,noDisposeOnSet:A,noUpdateTTL:h,maxSize:M=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:O,memoMethod:B,noDeleteOnFetchRejection:I,noDeleteOnStaleGet:R,allowStaleOnFetchRejection:N,allowStaleOnFetchAbort:x,ignoreFetchAbort:L,perf:j}=e;if(j!==void 0&&typeof j?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#a=j??Dv0,r!==
globstarwhile`,e,A,r,h,M),this.matchOne(e.slice(A),r.slice(h),s))return this.debug("globstar found match!",A,c,M),!0;if(M==="."||M===".."||!n.dot&&M.charAt(0)==="."){this.debug("dot detected!",e,A,r,h);break}this.debug("globstar swallow a segment, and continue"),A++}return!!(s&&(this.debug(`
`;if(s.username||s.password){let A=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;i["Proxy-Authorization"]=`Basic${Buffer.from(A).toString("base64")}`}i.Host=`${o}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let A of Object.keys(i))a+=`${A}:${i[A]}\r
`);let{connect:u,buffered:p}=await c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200){if(e.once("socket",KW0),r.secureEndpoint){tC("Upgrading socket connection to TLS");let A=r.servername||r.host;return zNe.connect({...ONe(r,"host","path","port"),socket:n,servername:eC.isIP(A)?void 0:A})}return n}n.destroy();let l=new eC.Socket({writable:!1});return l.readable=!0,e.once("socket",A=>{tC("Replaying proxy buffer for failed request"),(0,VW0.default)(A.listenerCount("data")>0),A.push(p),A.push(null)}),l}};mv.protocols=["http","https"];Yi.HttpsProxyAgent=mv;function KW0(t){t.resume()}function ONe(t,...e){let r={},s;for(s in t)e.includes(s)||(r[s]=t[s]);return r}});var INe=f(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});var BNe=require("buffer"),Af={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."};Wp.ERRORS=Af;function ZW0(t){if(!BNe.Buffer.isEncoding(t))throw new Error(Af.INVALID_ENCODING)}Wp.checkEncoding=ZW0;function DNe(t){return typeof t=="number"&&isFinite(t)&&s_0(t)}Wp.isFiniteInteger=DNe;function qNe(t,e){if(typeof t=="number"){if(!DNe(t)||t<0)throw new Error(e?Af.INVALID_OFFSET:Af.INVALID_LENGTH)}else throw new Error(e?Af.INVALID_OFFSET_NON_NUMBER:Af.INVALID_LENGTH_NON_NUMBER)}function e_0(t){qNe(t,!1)}Wp.checkLengthValue=e_0;function t_0(t){qNe(t,!0)}Wp.checkOffsetValue=t_0;function r_0(t,e){if(t<0||t>e.length)throw new Error(Af.INVALID_TARGET_OFFSET)}Wp.checkTargetOffset=r_0;function s_0(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}function n_0(t){if(typeof BigInt>"u")throw new Error("Platform does not support JS BigInt type.");if(typeof BNe.Buffer.prototype[t]>"u")throw new Error(`PlatformdoesnotsupportBuffer.prototype.${t}.`)}Wp.bigIntAndBufferInt64Check=n_0});var wNe=f(ZK=>{"use strict";Object.defineProperty(ZK,"__esModule",{value:!0});var Ze=INe(),RNe=4096,i_0="utf8",KK=class t{constructor(e){if(this.length=0,this._encoding=i_0,this._writeOffset=0,this._readOffset=0,t.isSmartBufferOptions(e))if(e.encoding&&(Ze.checkEncoding(e.encoding),this._encoding=e.encoding),e.size)if(Ze.isFiniteInteger(e.size)&&e.size>0)this._buff=Buffer.allocUnsafe(e.size);else throw new Error(Ze.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(Ze.ERRORS.INVALID_SMARTBUFFER_BUFFER);else this._buff=Buffer.allocUnsafe(RNe);else{if(typeof e<"u")throw new Error(Ze.ERRORS.INVALID_SMARTBUFFER_OBJECT);this._buff=Buffer.allocUnsafe(RNe)}}static fromSize(e,r){return new this({size:e,encoding:r})}static fromBuffer(e,r){return new this({buff:e,encoding:r})}static fromOptions(e){return new this(e)}static isSmartBufferOptions(e){let r=e;return r&&(r.encoding!==void 0||r.size!==void 0||r.buff!==void 0)}readInt8(e){return this._readNumberValue(Buffer.prototype.readInt8,1,e)}readInt16BE(e){return this._readNumberValue(Buffer.prototype.readInt16BE,2,e)}readInt16LE(e){return this._readNumberValue(Buffer.prototype.readInt16LE,2,e)}readInt32BE(e){return this._readNumberValue(Buffe
`,AH0=/\u2014 (\S+) (\S+)\n/g;function dH0(t,e){let r=t.inclusionProof,s=Ote.fromString(r.checkpoint.envelope),n=bT.fromString(s.note);if(!fH0(s,e))throw new FC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return n}function fH0(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(s=>{let n=e.find(i=>ixe.crypto.bufferEqual(i.logID.subarray(0,4),s.keyHint)&&i.baseURL.match(s.name));return n?ixe.crypto.verify(r,n.publicKey,s.signature):!1})}var Ote=class t{note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(zte))throw new FC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(zte),s=e.slice(0,r+1),i=e.slice(r+zte.length).matchAll(AH0),o=Array.from(i,a=>{let[,c,u]=a,p=Buffer.from(u,"base64");if(p.length<5)throw new FC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:c,keyHint:p.subarray(0,4),signature:p.subarray(4)}});if(o.length===0)throw new FC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,o)}},bT=class t{origin;logSize;logHash;rest;constructor(e,r,s,n){this.origin=e,this.logSize=r,this.logHash=s,this.rest=n}static fromString(e){let r=e.trimEnd().split(`
`);if(r.length<3)throw new FC.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],n=BigInt(r[1]),i=Buffer.from(r[2],"base64"),o=r.slice(3);return new t(s,n,i,o)}};TC.LogCheckpoint=bT});var axe=f(Bte=>{"use strict";Object.defineProperty(Bte,"__esModule",{value:!0});Bte.verifyMerkleInclusion=MH0;var Cte=Jo(),Ete=kr(),hH0=Buffer.from([0]),bH0=Buffer.from([1]);function MH0(t,e){let r=t.inclusionProof,s=BigInt(r.logIndex),n=BigInt(e.logSize);if(s<0n||s>=n)throw new Ete.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalidindex:${s}`});let{inner:i,border:o}=mH0(s,n);if(r.hashes.length!==i+o)throw new Ete.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let a=r.hashes.slice(0,i),c=r.hashes.slice(i),u=CH0(t.canonicalizedBody),p=zH0(gH0(u,a,s),c);if(!Cte.crypto.bufferEqual(p,e.logHash))throw new Ete.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function mH0(t,e){let r=OH0(t,e),s=EH0(t>>BigInt(r));return{inner:r,border:s}}function gH0(t,e,r){return e.reduce((s,n,i)=>r>>BigInt(i)&BigInt(1)?yte(n,s):yte(s,n),t)}function zH0(t,e){return e.reduce((r,s)=>yte(s,r),t)}function OH0(t,e){return yH0(t^e-BigInt(1))}function EH0(t){return t.toString(2).split("1").length-1}function yH0(t){return t===0n?0:t.toString(2).length}function yte(t,e){return Cte.crypto.digest("sha256",bH0,t,e)}function CH0(t){return Cte.crypto.digest("sha256",hH0,t)}});var uxe=f(Dte=>{"use strict";Object.defineProperty(Dte,"__esModule",{value:!0});Dte.verifyTLogSET=qH0;var cxe=Jo(),BH0=kr(),DH0=Mg();function qH0(t,e){if(!(0,DH0.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(n=>{let i=IH0(t),o=Buffer.from(cxe.json.canonicalize(i),"utf8"),a=t.inclusionPromise.signedEntryTimestamp;return cxe.crypto.verify(o,n.publicKey,a)}))throw new BH0.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function IH0(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:n}=t;return{body:n.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString("hex")}}});var lxe=f(MT=>{"use strict";Object.defineProperty(MT,"__esModule",{value:!0});MT.verifyTLogBody=vH0;MT.verifyTLogInclusion=FH0;var pxe=VZ(),Rte=kr(),qte=rxe(),Ite=sxe(),RH0=nxe(),wH0=oxe(),SH0=axe(),NH0=uxe();function vH0(t,e){let{kind:r,version:s}=t.kindVersion,n=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==n.kind||s!==n.apiVersion)throw new Rte.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/versionmismatch-expected:${r}/${s},received:${n.kind}/${n.apiVersion}`});switch(r){case"dsse":if(s==qte.DSSE_API_VERSION_V1)return(0,qte.verifyDSSETLogBody)(n,e);{let i=pxe.Entry.fromJSON(n);return(0,qte.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,RH0.verifyIntotoTLogBody)(n,e);case"hashedrekord":if(s==Ite.HASHEDREKORD_API_VERSION_V1)return(0,Ite.verifyHashedRekordTLogBody)(n,e);{let i=pxe.Entry.fromJSON(n);return(0,Ite.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new Rte.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupportedkind:${r}`})}}function FH0(t,e){let r=!1;if(TH0(t)&&((0,NH0.verifyTLogSET)(t,e),r=!0),xH0(t)){let s=(0,wH0.verifyCheckpoint)(t,e);(0,SH0.verifyMerkleInclusion)(t,s),r=!0}if(!r)throw new Rte.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}function TH0(t){return t.inclusionPromise!==void 0}function xH0(t){return t.inclusionProof!==void 0}});var bxe=f(mT=>{"use strict";Object.defineProperty(mT,"__esModule",{value:!0});mT.Verifier=void 0;var WH0=require("util"),mg=kr(),Axe=JTe(),wte=KTe(),dxe=txe(),fxe=lxe(),Ste=class{trustMaterial;options;constructor(e,r={}){this.trustMaterial=e,this.options={ctlogThreshold:r.ctlogThreshold??1,tlogThreshold:r.tlogThreshold??1,timestampThreshold:r.timestampThreshold??r.tsaThreshold??1,tsaThreshold:0}}verify(e,r){let s=this.verifyTimestamps(e),n=this.verifySigningKey(e,s);return t
[`+w+"] ";for(_ in arguments[0])i(arguments[0],_)&&(D+=_+": "+arguments[0][_]+", ");D=D.slice(0,-2)}else D=arguments[w];z.push(D)}L(d+`
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,o=!1,a;return{s:function(){r=(0,g1t.default)(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function q1t(t,e){var r;if(t){if(typeof t=="string")return RUe(t,e);var s=(0,ao.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return(0,y1t.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return RUe(t,e)}}function RUe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}var at="xregexp",Hf={astral:!1,namespacing:!1},Qt={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},eu={},m4={},Lg={},_re=[],Qg="default",wUe="class",I1t={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]/},R1t=/\$(?:{([\w$]+)}|<([\w$]+)>|(\d\d?|[\s\S]))/g,w1t=Qt.exec.call(/()??/,"")[1]===void 0,S1t=(0,Gf.default)(/x/)!==void 0,N1t={},TUe=N1t.toString;function Qre(t){var e=!0;try{if(new RegExp("",t),t==="y"){var r=(function(){return"gy"})(),s=".a".replace(new RegExp("a",r),".")==="..";s&&(e=!1)}}catch{e=!1}return e}var xUe=Qre("u"),Pre=Qre("y"),WUe={g:!0,i:!0,m:!0,u:xUe,y:Pre};function _Ue(t,e,r,s,n){var i;if(t[at]={captureNames:e},n)return t;if(t.__proto__)t.__proto__=oe.prototype;else for(var o in oe.prototype)t[o]=oe.prototype[o];return t[at].source=r,t[at].flags=s&&(0,D1t.default)(i=s.split("")).call(i).join(""),t}function g4(t){return Qt.replace.call(t,/([\s\S])(?=[\s\S]*\1)/g,"")}function Vf(t,e){var r;if(!oe.isRegExp(t))throw new TypeError("Type RegExp expected");var s=t[at]||{},n=v1t(t),i="",o="",a=null,c=null;return e=e||{},e.removeG&&(o+="g"),e.removeY&&(o+="y"),o&&(n=Qt.replace.call(n,new RegExp("[".concat(o,"]+"),"g"),"")),e.addG&&(i+="g"),e.addY&&(i+="y"),i&&(n=g4(n+i)),e.isInternalOnly||(s.source!==void 0&&(a=s.source),(0,Gf.default)(s)!=null&&(c=i?g4((0,Gf.default)(s)+i):(0,Gf.default)(s))),t=_Ue(new RegExp(e.source||t.source,n),F1t(t)?(0,ao.default)(r=s.captureNames).call(r,0):null,a,c,e.isInternalOnly),t}function LUe(t){return(0,FUe.default)(t,16)}function QUe(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||Qt.test.call(/^\(\?[:=!]/,t.input.substr(t.index-3,3))||T1t(t.input,t.index+t[0].length,r)?"":"(?:)"}function v1t(t){return S1t?(0,Gf.default)(t):Qt.exec.call(/\/([a-z]*)$/i,RegExp.prototype.toString.call(t))[1]}function F1t(t){return!!(t[at]&&t[at].captureNames)}function PUe(t){return(0,FUe.default)(t,10).toString(16)}function T1t(t,e,r){var s="\\(\\?#[^)]*\\)",n="#[^#\\n]*",i="[?*+]|{\\d+(?:,\\d*)?}";return Qt.test.call((0,Xf.default)(r).call(r,"x")?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,(0,ao.default)(t).call(t,e))}function kre(t,e){return TUe.call(t)==="[object ".concat(e,"]")}function kUe(t){for(;t.length<4;)t="0".concat(t);return t}function x1t(t,e){if(g4(e)!==e)throw new SyntaxError("Invalid duplicate regex flag ".concat(e));t=Qt.replace.call(t,/^\(\?([\w$]+)\)/,function(i,o){if(Qt.test.call(/[gy]/,o))throw new SyntaxError("Cannot use flag g or y in mode modifier ".concat(i));return e=g4(e+o),""});var r=z4(e),s;try{for(r.s();!(s=r.n()).done;){var n=s.value;if(!WUe[n])throw new SyntaxError("Unknown regex flag ".concat(n))}}catch(i){r.e(i)}finally{r.f()}return{pattern:t,flags:e}}function UUe(t){var e={};return kre(t,"String")?((0,Lre.default)(oe).call(oe,t,/[^\s,]+/,function(r){e[r]=!0}),e):t}function SUe(t){if(!/^[\w$]$/.test(t))throw new Error("Flag must be
Inordertobeiterable,non-arrayobjectsmusthavea[Symbol.iterator]()method.`)}var i=!0,o=!1,a;return{s:function(){r=(0,mrt.default)(t)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,a=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw a}}}}function qrt(t,e){var r;if(t){if(typeof t=="string")return RGe(t,e);var s=(0,yrt.default)(r=Object.prototype.toString.call(t)).call(r,8,-1);if(s==="Object"&&t.constructor&&(s=t.constructor.name),s==="Map"||s==="Set")return(0,Ert.default)(t);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return RGe(t,e)}}function RGe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}var Irt=function(e){var r={},s=e._dec,n=e._hex,i=e._pad4;function o(A){return A.replace(/[- _]+/g,"").toLowerCase()}function a(A){var h=/^\\[xu](.+)/.exec(A);return h?s(h[1]):A.charCodeAt(A[0]==="\\"?1:0)}function c(A){var h="",M=-1;return(0,Brt.default)(e).call(e,A,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(g){var y=a(g[1]);y>M+1&&(h+="\\u".concat(i(n(M+1))),y>M+2&&(h+="-\\u".concat(i(n(y-1))))),M=a(g[2]||g[1])}),M<65535&&(h+="\\u".concat(i(n(M+1))),M<65534&&(h+="-\\uFFFF")),h}function u(A){var h="b!";return r[A][h]||(r[A][h]=c(r[A].bmp))}function p(A,h){var M=r[A],g="";if(M.bmp&&!M.isBmpLast){var y;g=(0,Xre.default)(y="[".concat(M.bmp,"]")).call(y,M.astral?"|":"")}if(M.astral&&(g+=M.astral),M.isBmpLast&&M.bmp){var O;g+=(0,Xre.default)(O="".concat(M.astral?"|":"","[")).call(O,M.bmp,"]")}return h?"(?:(?!".concat(g,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))"):"(?:".concat(g,")")}function l(A,h){var M=h?"a!":"a=";return r[A][M]||(r[A][M]=p(A,h))}e.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(A,h,M){var g="Invalid double negation ",y="Unknown Unicode token ",O="Unicode token missing data ",B="Astral mode required for Unicode token ",I="Astral mode does not support Unicode tokens within character classes",R=A[1]==="P"||!!A[2],N=(0,Crt.default)(M).call(M,"A"),x=o(A[4]||A[3]),L=r[x];if(A[1]==="P"&&A[2])throw new SyntaxError(g+A[0]);if(!r.hasOwnProperty(x))throw new SyntaxError(y+A[0]);if(L.inverseOf){if(x=o(L.inverseOf),!r.hasOwnProperty(x)){var j;throw new ReferenceError((0,Xre.default)(j="".concat(O+A[0]," -> ")).call(j,L.inverseOf))}L=r[x],R=!R}if(!(L.bmp||N))throw new SyntaxError(B+A[0]);if(N){if(h==="class")throw new SyntaxError(I);return l(x,R)}return h==="class"?R?u(x):L.bmp:"".concat((R?"[^":"[")+L.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=function(A){var h="Unicode token requires name",M="Unicode token has no character data ",g=Drt(A),y;try{for(g.s();!(y=g.n()).done;){var O=y.value;if(!O.name)throw new Error(h);if(!(O.inverseOf||O.bmp||O.astral))throw new Error(M+O.name);r[o(O.name)]=O,O.alias&&(r[o(O.alias)]=O)}}catch(B){g.e(B)}finally{g.f()}e.cache.flush("patterns")},e._getUnicodeProperty=function(A){var h=o(A);return r[h]}};D4.default=Irt;wGe.exports=D4.default});var vGe=f((L8t,NGe)=>{NGe.exports=[{name:"InAdlam",astral:"\uD83A[\uDD00-\uDD5F]"},{name:"InAegean_Numbers",astral:"\uD800[\uDD00-\uDD3F]"},{name:"InAhom",astral:"\uD805[\uDF00-\uDF3F]"},{name:"InAlchemical_Symbols",astral:"\uD83D[\uDF00-\uDF7F]"},{name:"InAlphabetic_Presentation_Forms",bmp:"\uFB00-\uFB4F"},{name:"InAnatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE7F]"},{name:"InAncient_Greek_Musical_Notation",astral:"\uD834[\uDE00-\uDE4F]"},{name:"InAncient_Greek_Numbers",astral:"\uD800[\uDD40-\uDD8F]"},{name:"InAncient_Symbols",astral:"\uD800[\uDD90-\uDDCF]"},{name:"InArabic",bmp:"\u0600-\u06FF"},{name:"InArabic_Extended_A",bmp:"\u08A0-\u08FF"},{name:"InArabic_Mathematical_Alphabetic_Symbols",astral:"\uD83B[\uDE00-\uDEFF]"},{name:"InArabic_Presentation_Forms_A",bmp:"\uFB50-\uFDFF"},{name:"InArabic_Presentation_Forms_B",bmp:"\uFE70-\uFEFF"},{name:"InArabic_Supplement",bmp:"\u0750-\u077F"},{name:"InArmenian",bmp:"\u0530-\u058F"},{name:"InArrows",bmp:"\u2190-\u21FF"},{name:"InAvestan",astral:"\uD802[\uDF00-\uDF3F]"},{name:"InBalinese",bmp:"\u1B00-\u1B7F"},{name:"InBamum",
Supportbooleaninputlist:\`true | True | TRUE | false | False | FALSE\``)}functionK8(t,e){if(process.env.GITHUB_OUTPUT||"")returnez("OUTPUT",oB(t,e));process.stdout.write(J8.EOL),aa("set-output",{name:t},oa(e))}function_Ae(t){process.exitCode=Y8.Failure,lb(t)}functionCu(){returnprocess.env.RUNNER_DEBUG==="1"}functionF(t){aa("debug",{},t)}functionlb(t,e={}){aa("error",uW(e),tinstanceofError?t.toString():t)}functiong0(t,e={}){aa("warning",uW(e),tinstanceofError?t.toString():t)}functionW(t){process.stdout.write(t+J8.EOL)}functionNd(t){lW("group",t)}functionvd(){lW("endgroup")}functioncr(t,e){returnpo0(this,void0,void0,function*(){Nd(t);letr;try{r=yielde()}finally{vd()}returnr})}functionaq(t,e){if(process.env.GITHUB_STATE||"")returnez("STATE",oB(t,e));aa("save-state",{name:t},oa(e))}functionLAe(t){returnprocess.env[`STATE_${t}`]||""}varpw=T(require("fs"),1),pX=T(require("os"),1),lX=T(require("path"),1);varPAe=T(require("os"),1);functioncO(t){returnt==null?"":typeoft=="string"||tinstanceofString?t:JSON.stringify(t)}functionkAe(t,e,r){lets=newZ8(t,e,r);process.stdout.write(s.toString()+PAe.EOL)}varQAe="::",Z8=class{constructor(e,r,s){e||(e="missing.command"),this.command=e,this.properties=r,this.message=s}toString(){lete=QAe+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";letr=!0;for(letsinthis.properties)if(this.properties.hasOwnProperty(s)){letn=this.properties[s];n&&(r?r=!1:e+=",",e+=`${s}=${Ao0(n)}`)}}returne+=`${QAe}${lo0(this.message)}`,e}};functionlo0(t){returncO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}functionAo0(t){returncO(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}varXAe=T(require("os"),1);varGAe=require("os"),uO=require("fs"),eQ=function(t,e,r,s){functionn(i){returniinstanceofr?i:newr(function(o){o(i)})}returnnew(r||(r=Promise))(function(i,o){functiona(p){try{u(s.next(p))}catch(l){o(l)}}functionc(p){try{u(s.throw(p))}catch(l){o(l)}}functionu(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},{access:do0,appendFile:fo0,writeFile:ho0}=uO.promises,UAe="GITHUB_STEP_SUMMARY";vartQ=class{constructor(){this._buffer=""}filePath(){returneQ(this,void0,void0,function*(){if(this._filePath)returnthis._filePath;lete=process.env[UAe];if(!e)thrownewError(`Unable to find environment variable for $${UAe}. Check if your runtime environment supports job summaries.`);try{yielddo0(e,uO.constants.R_OK|uO.constants.W_OK)}catch{thrownewError(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}returnthis._filePath=e,this._filePath})}wrap(e,r,s={}){letn=Object.entries(s).map(([i,o])=>`${i}="${o}"`).join("");returnr?`<${e}${n}>${r}</${e}>`:`<${e}${n}>`}write(e){returneQ(this,void0,void0,function*(){letr=!!e?.overwrite,s=yieldthis.filePath();returnyield(r?ho0:fo0)(s,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){returneQ(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(GAe.EOL)}addCodeBlock(e,r){lets=Object.assign({},r&&{lang:r}),n=this.wrap("pre",this.wrap("code",e),s);returnthis.addRaw(n).addEOL()}addList(e,r=!1){lets=r?"ol":"ul",n=e.map(o=>this.wrap("li",o)).join(""),i=this.wrap(s,n);returnthis.addRaw(i).addEOL()}addTable(e){letr=e.map(n=>{leti=n.map(o=>{if(typeofo=="string")returnthis.wrap("td",o);let{header:a,data:c,colspan:u,rowspan:p}=o,l=a?"th":"td",A=Object.assign(Object.assign({},u&&{colspan:u}),p&&{rowspan:p});returnthis.wrap(l,c,A)}).join("");returnthis.wrap("tr",i)}).join(""),s=this.wrap("table",r);returnthis.addRaw(s).addEOL()}addDetails(e,r){lets=this.wrap("details",this.wrap("summary",e)+r);returnthis.addRaw(s).addEOL()}addImage(e,r,s){let{width:n,height:i}=s||{},o=Object.assign(Object.assign({},n&&
${qd0.sanitize({...this,request:{...this.request,agent:s},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function Jq(t){return t instanceof rs?!0:Ld(t)&&t.name==="RestError"}function Ws(t,e){return Buffer.from(t,e)}var Kq=T(require("node:http"),1),Zq=T(require("node:https"),1),DP=T(require("node:zlib"),1),Lbe=require("node:stream");var Ei=xO("ts-http-runtime");var Id0={};function WO(t){return t&&typeof t.pipe=="function"}function _be(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function Qbe(t){return t&&typeof t.byteLength=="number"}var eI=class extends Lbe.Transform{loadedBytes=0;progressCallback;_transform(e,r,s){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),s()}catch(n){s(n)}}constructor(e){super(),this.progressCallback=e}},qP=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,s;if(e.abortSignal){if(e.abortSignal.aborted)throw new qa("The operation was aborted. Request has already been canceled.");s=u=>{u.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",s)}let n;e.timeout>0&&(n=setTimeout(()=>{let u=new Ro;Ei.info(`requestto'${u.sanitizeUrl(e.url)}'timedout.canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),o=i?.includes("gzip")||i?.includes("deflate"),a=typeof e.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){let u=Nd0(a);u!==null&&e.headers.set("Content-Length",u)}let c;try{if(a&&e.onUploadProgress){let M=e.onUploadProgress,g=new eI(M);g.on("error",y=>{Ei.error("Error in upload progress",y)}),WO(a)?a.pipe(g):g.end(a),a=g}let u=await this.makeRequest(e,r,a);n!==void 0&&clearTimeout(n);let p=Rd0(u),A={status:u.statusCode??0,headers:p,request:e};if(e.method==="HEAD")return u.resume(),A;c=o?wd0(u,p):u;let h=e.onDownloadProgress;if(h){let M=new eI(h);M.on("error",g=>{Ei.error("Error in download progress",g)}),c.pipe(M),c=M}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(A.status)?A.readableStreamBody=c:A.bodyAsText=await Sd0(c),A}finally{if(e.abortSignal&&s){let u=Promise.resolve();WO(a)&&(u=_be(a));let p=Promise.resolve();WO(c)&&(p=_be(c)),Promise.all([u,p]).then(()=>{s&&e.abortSignal?.removeEventListener("abort",s)}).catch(l=>{Ei.warning("Error when cleaning up abortListener on httpRequest",l)})}}}makeRequest(e,r,s){let n=new URL(e.url),i=n.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannotconnectto${e.url}whileallowInsecureConnectionisfalse.`);let a={agent:e.agent??this.getOrCreateAgent(e,i),hostname:n.hostname,path:`${n.pathname}${n.search}`,port:n.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((c,u)=>{let p=i?Kq.default.request(a,c):Zq.default.request(a,c);p.once("error",l=>{u(new rs(l.message,{code:l.code??rs.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let l=new qa("The operation was aborted. Rejecting from abort signal callback while making request.");p.destroy(l),u(l)}),s&&WO(s)?s.pipe(p):s?typeof s=="string"||Buffer.isBuffer(s)?p.end(s):Qbe(s)?p.end(ArrayBuffer.isView(s)?Buffer.from(s.buffer):Buffer.from(s)):(Ei.error("Unrecognized body type",s),u(new rs("Unrecognized body type"))):p.end()})}getOrCreateAgent(e,r){let s=e.disableKeepAlive;if(r)return s?Kq.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new Kq.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(s&&!e.tlsSettings)return Zq.default.globalAgent;let n=e.tlsSettings??Id0,i=this.cachedHttpsAgents.get(n);return i&&i.options.keepAlive===!s||(Ei.info("No cached TLS Agent exist, creating a new Agent"),i=new Zq.default.Agent({keepAlive:!s,...n}),this.cachedHttpsAgents.set(n,i)),i}}};function Rd0(t){let e=Sn();for(let r of Object.keys(t.headers)){let s=t.headers[r];Array.isArray(s)?s.length>0&&e.set(
`;return e}function pf0(t){return t instanceof Uint8Array?t.byteLength:yI(t)?t.size===-1?void 0:t.size:void 0}function lf0(t){let e=0;for(let r of t){let s=pf0(r);if(s===void 0)return;e+=s}return e}async function Af0(t,e,r){let s=[Ws(`--${r}`,"utf-8"),...e.flatMap(i=>[Ws(`\r
`,"utf-8")],n=lf0(s);n&&t.headers.set("Content-Length",n),t.body=await kMe(s)}var PO="multipartPolicy",df0=70,ff0=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function hf0(t){if(t.length>df0)throw new Error(`Multipartboundary"${t}"exceedsmaximumlengthof70characters`);if(Array.from(t).some(e=>!ff0.has(e)))throw new Error(`Multipartboundary"${t}"containsinvalidcharacters`)}function BI(){return{name:PO,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,s=t.headers.get("Content-Type")??"multipart/mixed",n=s.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!n)throw new Error(`Gotmultipartrequestbody,butcontent-typeheaderwasnotmultipart:${s}`);let[,i,o]=n;if(o&&r&&o!==r)throw new Error(`Multipartboundarywasspecifiedas${o}intheheader,butgot${r}intherequestbody`);return r??=o,r?hf0(r):r=cf0(),t.headers.set("Content-Type",`${i};boundary=${r}`),await Af0(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function DI(){return Yq()}var UMe=Vq({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),Edt=UMe.logger;function wa(t){return UMe.createClientLogger(t)}var Sa=wa("core-rest-pipeline");function VP(t={}){return rI({logger:Sa.info,...t})}var jP=sI;function $P(t={}){return nI(t)}var qI=T(require("node:os"),1),II=T(require("node:process"),1);function GMe(){return"User-Agent"}async function HMe(t){if(II.default&&II.default.versions){let e=`${qI.default.type()}${qI.default.release()};${qI.default.arch()}`,r=II.default.versions;r.bun?t.set("Bun",`${r.bun}(${e})`):r.deno?t.set("Deno",`${r.deno}(${e})`):r.node&&t.set("Node",`${r.node}(${e})`)}}var RI="1.22.2";function yf0(t){let e=[];for(let[r,s]of t){let n=s?`${r}/${s}`:r;e.push(n)}return e.join(" ")}function XMe(){return GMe()}async function wI(t){let e=new Map;e.set("core-rest-pipeline",RI),await HMe(e);let r=yf0(e);return t?`${t}${r}`:r}var VMe=XMe(),jMe="userAgentPolicy";function YP(t={}){let e=wI(t.userAgentPrefix);return{name:jMe,async sendRequest(r,s){return r.headers.has(VMe)||r.headers.set(VMe,await e),s(r)}}}var Tn=class extends Error{constructor(e){super(e),this.name="AbortError"}};function JP(t,e){let{cleanupBeforeAbort:r,abortSignal:s,abortErrorMsg:n}=e??{};return new Promise((i,o)=>{function a(){o(new Tn(n??"The operation was aborted."))}function c(){s?.removeEventListener("abort",u)}function u(){r?.(),c(),a()}if(s?.aborted)return a();try{t(p=>{c(),i(p)},p=>{c(),o(p)})}catch(p){o(p)}s?.addEventListener("abort",u)})}var If0="The delay was aborted.";function kO(t,e){let r,{abortSignal:s,abortErrorMsg:n}=e??{};return JP(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:s,abortErrorMsg:n??If0})}function Wl(t){if(Ld(t))return t.message;{let e;try{typeof t=="object"&&t?e=JSON.stringify(t):e=String(t)}catch{e="[unable to stringify input]"}return`Unknownerror${e}`}}function $Me(t){return Ld(t)}function Nb(){return _d()}var D0=kd;var YMe=Symbol("rawContent");function ZP(t){return typeof t[YMe]=="function"}function JMe(t){return ZP(t)?t[YMe]():t}var SI=PO;function ek(){let t=BI();return{name:SI,sendRequest:async(e,r)=>{if(e.multipartBody)for(let s of e.multipartBody.parts)ZP(s.body)&&(s.body=JMe(s.body));return t.sendRequest(e,r)}}}var tk=iI;function rk(){return oI()}function sk(t={}){return uI(t)}function nk(){return pI()}function _l(t){return kP(t)}function ik(t,e){return zI(t,e)}var KMe="setClientRequestIdPolicy";function ok(t="x-ms-client-request-id"){return{name:KMe,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}function ak(t){return OI(t)}function ck(t){return EI(t)}var vb={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function ZMe(t={}){let e=new uk(t.parentContext);return t.span&&(e=e.setValue(vb.span,t.span)),t.namespace&&(e=e.setValue(vb.namespace,t.namespace)),e}var uk=class t{_contextMap;constructor(e){this._contextMap=e instanceof t
`&&t[i]!=="\r";i++)c+=t[i];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),i--),!Kh0(c)){let l;return c.trim().length===0?l="Invalid space after '<'.":l="Tag '"+c+"' is an invalid name.",jt("InvalidTag",l,ss(t,i))}let u=Vh0(t,i);if(u===!1)return jt("InvalidAttr","Attributes for '"+c+"' have open quote.",ss(t,i));let p=u.value;if(i=u.index,p[p.length-1]==="/"){let l=i-p.length;p=p.substring(0,p.length-1);let A=xme(p,e);if(A===!0)s=!0;else return jt(A.err.code,A.err.msg,ss(t,l+A.err.line))}else if(a)if(u.tagClosed){if(p.trim().length>0)return jt("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",ss(t,o));if(r.length===0)return jt("InvalidTag","Closing tag '"+c+"' has not been opened.",ss(t,o));{let l=r.pop();if(c!==l.tagName){let A=ss(t,l.tagStartPos);return jt("InvalidTag","Expected closing tag '"+l.tagName+"' (opened in line "+A.line+", col "+A.col+") instead of closing tag '"+c+"'.",ss(t,o))}r.length==0&&(n=!0)}}else return jt("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",ss(t,i));else{let l=xme(p,e);if(l!==!0)return jt(l.err.code,l.err.msg,ss(t,i-p.length+l.err.line));if(n===!0)return jt("InvalidXml","Multiple possible root nodes found.",ss(t,i));e.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:o}),s=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=Tme(t,i);continue}else if(t[i+1]==="?"){if(i=Fme(t,++i),i.err)return i}else break;else if(t[i]==="&"){let l=Yh0(t,i);if(l==-1)return jt("InvalidChar","char '&' is not expected.",ss(t,i));i=l}else if(n===!0&&!vme(t[i]))return jt("InvalidXml","Extra text at the end",ss(t,i));t[i]==="<"&&i--}}else{if(vme(t[i]))continue;return jt("InvalidChar","char '"+t[i]+"' is not expected.",ss(t,i))}if(s){if(r.length==1)return jt("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",ss(t,r[0].tagStartPos));if(r.length>0)return jt("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return jt("InvalidXml","Start tag expected.",1);return!0}function vme(t){return t===" "||t===" "||t===`
`||t==="\r"}function Fme(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let s=t.substr(r,e-r);if(e>5&&s==="xml")return jt("InvalidXml","XML declaration allowed only at the start of the document.",ss(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function Tme(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}var Hh0='"',Xh0="'";function Vh0(t,e){let r="",s="",n=!1;for(;e<t.length;e++){if(t[e]===Hh0||t[e]===Xh0)s===""?s=t[e]:s!==t[e]||(s="");else if(t[e]===">"&&s===""){n=!0;break}r+=t[e]}return s!==""?!1:{value:r,index:e,tagClosed:n}}var jh0=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function xme(t,e){let r=kI(t,jh0),s={};for(let n=0;n<r.length;n++){if(r[n][1].length===0)return jt("InvalidAttr","Attribute '"+r[n][2]+"' has no space in starting.",e3(r[n]));if(r[n][3]!==void 0&&r[n][4]===void 0)return jt("InvalidAttr","Attribute '"+r[n][2]+"' is without value.",e3(r[n]));if(r[n][3]===void 0&&!e.allowBooleanAttributes)return jt("InvalidAttr","boolean attribute '"+r[n][2]+"' is not allowed.",e3(r[n]));let i=r[n][2];if(!Jh0(i))return jt("InvalidAttr","Attribute '"+i+"' is an invalid name.",e3(r[n]));if(!Object.prototype.hasOwnProperty.call(s,i))s[i]=1;else return jt("InvalidAttr","Attribute '"+i+"' is repeated.",e3(r[n]))}return!0}function $h0(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}function Yh0(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,$h0(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function jt(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Jh0(t){return qk(t)}function Kh0(t){return qk(t)}function ss(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function e3(t){return t.startIndex+t[1].length}var Wme={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"},_me={Agrave:"\xC0",agrave:"\xE0",Aacute:"\xC1",aacute:"\xE1",Acirc:"\xC2",acirc:"\xE2",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",Aring:"\xC5",aring:"\xE5",AElig:"\xC6",aelig:"\xE6",Ccedil:"\xC7",ccedil:"\xE7",Egrave:"\xC8",egrave:"\xE8",Eacute:"\xC9",eacute:"\xE9",Ecirc:"\xCA",ecirc:"\xEA",Euml:"\xCB",euml:"\xEB",Igrave:"\xCC",igrave:"\xEC",Iacute:"\xCD",iacute:"\xED",Icirc:"\xCE",icirc:"\xEE",Iuml:"\xCF",iuml:"\xEF",ETH:"\xD0",eth:"\xF0",Ntilde:"\xD1",ntilde:"\xF1",Ograve:"\xD2",ograve:"\xF2",Oacute:"\xD3",oacute:"\xF3",Ocirc:"\xD4",ocirc:"\xF4",Otilde:"\xD5",otilde:"\xF5",Ouml:"\xD6",ouml:"\xF6",Oslash:"\xD8",oslash:"\xF8",Ugrave:"\xD9",ugrave:"\xF9",Uacute:"\xDA",uacute:"\xFA",Ucirc:"\xDB",ucirc:"\xFB",Uuml:"\xDC",uuml:"\xFC",Yacute:"\xDD",yacute:"\xFD",THORN:"\xDE",tho
`);let e=new Ps("!xml"),r=e,s="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let n=this.options,i=new s3(n.processEntities),o=t.length;for(let a=0;a<o;a++)if(t[a]==="<"){let u=t.charCodeAt(a+1);if(u===47){let p=_b(t,">",a,"Closing Tag is not closed."),l=t.substring(a+2,p).trim();if(n.removeNSPrefix){let h=l.indexOf(":");h!==-1&&(l=l.substr(h+1))}l=Tk(n.transformTagName,l,"",n).tagName,r&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher));let A=this.matcher.getCurrentTag();if(l&&n.unpairedTagsSet.has(l))throw new Error(`Unpairedtagcannotbeusedasclosingtag:</${l}>`);A&&n.unpairedTagsSet.has(A)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),s="",a=p}else if(u===63){let p=xk(t,a,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let l=this.buildAttributesMap(p.tagExp,this.matcher,p.tagName,!0);if(l){let A=l[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(A)||1),i.setXmlVersion(Number(A)||1)}if(!(n.ignoreDeclaration&&p.tagName==="?xml"||n.ignorePiTags)){let A=new Ps(p.tagName);A.add(n.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&n.ignoreAttributes!==!0&&(A[":@"]=l),this.addChild(r,A,this.readonlyMatcher,a)}a=p.closeIndex+1}else if(u===33&&t.charCodeAt(a+2)===45&&t.charCodeAt(a+3)===45){let p=_b(t,"-->",a+4,"Comment is not closed.");if(n.commentPropName){let l=t.substring(a+4,p-2);s=this.saveTextToParentTag(s,r,this.readonlyMatcher),r.add(n.commentPropName,[{[n.textNodeName]:l}])}a=p}else if(u===33&&t.charCodeAt(a+2)===68){let p=i.readDocType(t,a);this.entityDecoder.addInputEntities(p.entities),a=p.i}else if(u===33&&t.charCodeAt(a+2)===91){let p=_b(t,"]]>",a,"CDATA is not closed.")-2,l=t.substring(a+9,p);s=this.saveTextToParentTag(s,r,this.readonlyMatcher);let A=this.parseTextData(l,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);A==null&&(A=""),n.cdataPropName?r.add(n.cdataPropName,[{[n.textNodeName]:l}]):r.add(n.textNodeName,A),a=p+2}else{let p=xk(t,a,n.removeNSPrefix);if(!p){let x=t.substring(Math.max(0,a-50),Math.min(o,a+50));throw new Error(`readTagExp returned undefined at position ${a}. Context: "${x}"`)}let l=p.tagName,A=p.rawTagName,h=p.tagExp,M=p.attrExpPresent,g=p.closeIndex;if({tagName:l,tagExp:h}=Tk(n.transformTagName,l,h,n),n.strictReservedNames&&(l===n.commentPropName||l===n.cdataPropName||l===n.textNodeName||l===n.attributesGroupName))throw new Error(`Invalid tag name: ${l}`);r&&s&&r.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,r,this.readonlyMatcher,!1));let y=r;y&&n.unpairedTagsSet.has(y.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let O=!1;h.length>0&&h.lastIndexOf("/")===h.length-1&&(O=!0,l[l.length-1]==="/"?(l=l.substr(0,l.length-1),h=l):h=h.substr(0,h.length-1),M=l!==h);let B=null,I={},R;R=Ob0(A),l!==e.tagname&&this.matcher.push(l,{},R),l!==h&&M&&(B=this.buildAttributesMap(h,this.matcher,l),B&&(I=zb0(B,n))),l!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=a;if(this.isCurrentNodeStopNode){let x="";if(O)a=p.closeIndex;else if(n.unpairedTagsSet.has(l))a=p.closeIndex;else{let j=this.readStopNodeData(t,A,g+1);if(!j)throw new Error(`Unexpected end of ${A}`);a=j.i,x=j.tagContent}let L=new Ps(l);B&&(L[":@"]=B),L.add(n.textNodeName,x),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,L,this.readonlyMatcher,N)}else{if(O){({tagName:l,tagExp:h}=Tk(n.transformTagName,l,h,n));let x=new Ps(l);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(n.unpairedTagsSet.has(l)){let x=new Ps(l);B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=p.closeIndex;continue}else{let x=new Ps(l);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximumnestedtagsexceeded");this.tagsNodeStack.push(r),B&&(x[":@"]=B),this.addChild(r,x,this.readonlyMatcher,N),r=x}s="",a=g}}}elses+=t[a];returne.child};functionq
`}),s}getCanonicalizedResourceString(e){let r=s5(e.url)||"/",s="";s+=`/${this.factory.accountName}${r}`;let n=n5(e.url),i={};if(n){let o=[];for(let a in n)if(Object.prototype.hasOwnProperty.call(n,a)){let c=a.toLowerCase();i[c]=n[a],o.push(c)}o.sort();for(let a of o)s+=`
${a}:${decodeURIComponent(i[a])}`}return s}};var qt=class extends Jd{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new c3(e,r,this)}computeHMACSHA256(e){return(0,hge.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var g1=wa("storage-common");var Di;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Di||(Di={}));var Ul={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Di.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},eM0=new Tn("The operation was aborted."),u3=class extends Ta{retryOptions;constructor(e,r,s=Ul){super(e,r),this.retryOptions={retryPolicyType:s.retryPolicyType?s.retryPolicyType:Ul.retryPolicyType,maxTries:s.maxTries&&s.maxTries>=1?Math.floor(s.maxTries):Ul.maxTries,tryTimeoutInMs:s.tryTimeoutInMs&&s.tryTimeoutInMs>=0?s.tryTimeoutInMs:Ul.tryTimeoutInMs,retryDelayInMs:s.retryDelayInMs&&s.retryDelayInMs>=0?Math.min(s.retryDelayInMs,s.maxRetryDelayInMs?s.maxRetryDelayInMs:Ul.maxRetryDelayInMs):Ul.retryDelayInMs,maxRetryDelayInMs:s.maxRetryDelayInMs&&s.maxRetryDelayInMs>=0?s.maxRetryDelayInMs:Ul.maxRetryDelayInMs,secondaryHost:s.secondaryHost?s.secondaryHost:Ul.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,s){let n=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||s%2===1;i||(n.url=r5(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=kl(n.url,vu.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let o;try{if(g1.info(`RetryPolicy:=====>Try=${s}${i?"Primary":"Secondary"}`),o=await this._nextPolicy.sendRequest(n),!this.shouldRetry(i,s,o))return o;r=r||!i&&o.status===404}catch(a){if(g1.error(`RetryPolicy:Caughterror,message:${a.message},code:${a.code}`),!this.shouldRetry(i,s,o,a))throw a}return await this.delay(i,s,e.abortSignal),this.attemptSendRequest(e,r,++s)}shouldRetry(e,r,s,n){if(r>=this.retryOptions.maxTries)return g1.info(`RetryPolicy:Attempt(s)${r}>=maxTries${this.retryOptions.maxTries},nofurthertry.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(n){for(let o of i)if(n.name.toUpperCase().includes(o)||n.message.toUpperCase().includes(o)||n.code&&n.code.toString().toUpperCase()===o)return g1.info(`RetryPolicy:Networkerror${o}found,willretry.`),!0}if(s||n){let o=s?s.status:n?n.statusCode:0;if(!e&&o===404)return g1.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(o===503||o===500)return g1.info(`RetryPolicy:Willretryforstatuscode${o}.`),!0}if(s&&s?.status>=400){let o=s.headers.get(We.X_MS_CopySourceErrorCode);if(o!==void 0)switch(o){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return n?.code==="PARSE_ERROR"&&n?.message.startsWith('Error "Error: Unclosed root tag')?(g1.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,s){let n=0;if(e)switch(this.retryOptions.retryPolicyType){case Di.EXPONENTIAL:n=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Di.FIXED:n=this.retryOptions.retryDelayInMs;break}else n=Math.random()*1e3;return g1.info(`RetryPolicy:Delayfor${n}ms`),i5(n,s,eM0)}};var p3=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new u3(e,r,this.retryOptions)}};var tM0="storageBrowserPolicy";function bge(){return{name:tM0,async sendRequest(t,e){return D0||((t.method==="GET"||t.method==="HEAD")&&(t.url=kl(t.url,vu.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(We.COOKIE),t.headers.delete(We.CONTENT_LENGTH)),e(t)}}}var rM0="StorageCorrectContentLengthPolicy";function Mge(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(We.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:rM0,async send
`}),a}function n(i){let o=s5(i.url)||"/",a="";a+=`/${t.accountName}${o}`;let c=n5(i.url),u={};if(c){let p=[];for(let l in c)if(Object.prototype.hasOwnProperty.call(c,l)){let A=l.toLowerCase();u[A]=c[l],p.push(A)}p.sort();for(let l of p)a+=`
`),i=e.computeHMACSHA256(n);return{sasQueryParameters:new To(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:n}}function lg0(t,e){if(t=o2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Fo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new To(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}function Ag0(t,e){if(t=o2(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Fo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new To(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}function dg0(t,e){if(t=o2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?q0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?q0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Fo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new To(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}function fg0(t,e){if(t=o2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?q0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?q0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Fo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new To(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}function hg0(t,e){if(t=o2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?q0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?q0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Fo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new To(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}function bg0(t,e){if(t=o2(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",s=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",s=t.versionId));let n;t.permissions&&(t.blobName?n=Ka.parse(t.permissions.toString()).toString():n=Za.parse(t.permissions.toString()).toString());let i=[n||"",t.startsOn?q0(t.startsOn,!1):"",t.expiresOn?q0(t.expiresOn,!1):"",i2(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?q0(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?q0(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Fo(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,s,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
`),o=e.computeHMACSHA256(i);return{sasQueryParameters:new To(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}function i2(t,e,r){let s=[`/blob/${t}/${e}`];return r&&s.push(`/${r}`),s.join("")}function o2(t){let e=t.version?t.version:u5;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}var y3=class{_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let s=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=s.container):(this._isContainer=!1,this._containerOrBlobOperation=s.blob),r||(r=Nb()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==wo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==wo||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 me.withSpan("BlobLeaseClient-acquireLease",r,async s=>ye(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:s.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==wo||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==wo||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 me.withSpan("BlobLeaseClient-changeLease",r,async s=>{let n=ye(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:s.tracingOptions}));return this._leaseId=e,n})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==wo||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==wo||e.conditions?.tagConditions))throw new RangeError("The IfMatch,
Ifyouareusingself-hostedrunners,pleasemakesureyourrunnerhasaccesstoallGitHubendpoints:https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(r),this.code=e,this.name="NetworkError"}};Kb.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var p2=class extends Error{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"}};p2.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var v3=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var Dz0=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},PG=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),s=Date.now()-this.startTime,n=(e/(1024*1024)/(s/1e3)).toFixed(1);W(`Sent ${e} of ${this.contentLength} (${r}%), ${n} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function NOe(t,e,r){return Dz0(this,void 0,void 0,function*(){var s;let n=new ku(t),i=n.getBlockBlobClient(),o=new PG((s=r?.archiveSizeBytes)!==null&&s!==void 0?s:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:o.onProgress()};try{o.startDisplayTimer(),F(`BlobClient: ${n.name}:${n.accountName}:${n.containerName}`);let c=yield i.uploadFile(e,a);if(c._response.status>=400)throw new fR(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw g0(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{o.stopDisplayTimer()}})}var FOe=T(require("buffer"),1),ec=T(require("fs"),1),TOe=T(require("stream"),1),xOe=T(require("util"),1);var hR=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};function bR(t){return t?t>=200&&t<300:!1}function qz0(t){return t?t>=500:!0}function Iz0(t){return t?[Dt.BadGateway,Dt.ServiceUnavailable,Dt.GatewayTimeout].includes(t):!1}function Rz0(t){return hR(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function vOe(t,e,r){return hR(this,arguments,void 0,function*(s,n,i,o=Pq,a=kq,c=void 0){let u="",p=1;for(;p<=o;){let l,A,h=!1;try{l=yield n()}catch(M){c&&(l=c(M)),h=!0,u=M.message}if(l&&(A=i(l),!qz0(A)))return l;if(A&&(h=Iz0(A),u=`Cache service responded with ${A}`),F(`${s} - Attempt ${p} of ${o} failed with error: ${u}`),!h){F(`${s} - Error is not retryable`);break}yield Rz0(a),p++}throw Error(`${s} failed: ${u}`)})}function F3(t,e){return hR(this,arguments,void 0,function*(r,s,n=Pq,i=kq){return yield vOe(r,s,o=>o.statusCode,n,i,o=>{if(o instanceof Da)return{statusCode:o.statusCode,result:null,headers:{},error:o}})})}function Zb(t,e){return hR(this,arguments,void 0,function*(r,s,n=Pq,i=kq){return yield vOe(r,s,o=>o.message.statusCode,n,i)})}var Si=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})};function wz0(t,e){return Si(this,void 0,void 0,function*(){yield xOe.promisify(TOe.pipeline)(t.message,e)})}var MR=class{constructor(e){this.contentLength=e,this.segmentIndex=0,this.s
Othercacheswithsimilarkey:`);for(let a of i?.artifactCaches||[])F(`CacheKey:${a?.cacheKey},CacheVersion:${a?.cacheVersion},CacheScope:${a?.scope},CacheCreated:${a?.creationTime}`)}}})}function HG(t,e,r){return Hs(this,void 0,void 0,function*(){let s=new XOe.URL(t),n=QOe(r);s.hostname.endsWith(".blob.core.windows.net")?n.useAzureSdk?yield _Oe(t,e,n):n.concurrentBlobDownloads?yield WOe(t,e,n):yield mR(t,e):yield mR(t,e)})}function jOe(t,e,r){return Hs(this,void 0,void 0,function*(){let s=GG(),n=yb(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:n,cacheSize:r?.cacheSize};return yield F3("reserveCache",()=>Hs(this,void 0,void 0,function*(){return s.postJson(x3("caches"),i)}))})}function HOe(t,e){return`bytes${t}-${e}/*`}function _z0(t,e,r,s,n){return Hs(this,void 0,void 0,function*(){F(`Uploadingchunkofsize${n-s+1}bytesatoffset${s}withcontentrange:${HOe(s,n)}`);let i={"Content-Type":"application/octet-stream","Content-Range":HOe(s,n)},o=yield Zb(`uploadChunk(start:${s},end:${n})`,()=>Hs(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!bR(o.message.statusCode))throw new Error(`Cacheservicerespondedwith${o.message.statusCode}duringuploadchunk.`)})}function Lz0(t,e,r,s){return Hs(this,void 0,void 0,function*(){let n=Ba(r),i=x3(`caches/${e.toString()}`),o=eM.openSync(r,"r"),a=kG(s),c=dP("uploadConcurrency",a.uploadConcurrency),u=dP("uploadChunkSize",a.uploadChunkSize),p=[...new Array(c).keys()];F("Awaiting all uploads");let l=0;try{yield Promise.all(p.map(()=>Hs(this,void 0,void 0,function*(){for(;l<n;){let A=Math.min(n-l,u),h=l,M=l+A-1;l+=u,yield _z0(t,i,()=>eM.createReadStream(r,{fd:o,start:h,end:M,autoClose:!1}).on("error",g=>{throw new Error(`Cacheuploadfailedbecausefilereadfailedwith${g.message}`)}),h,M)}})))}finally{eM.closeSync(o)}})}function Qz0(t,e,r){return Hs(this,void 0,void 0,function*(){let s={size:r};return yield F3("commitCache",()=>Hs(this,void 0,void 0,function*(){return t.postJson(x3(`caches/${e.toString()}`),s)}))})}function XG(t,e,r,s){return Hs(this,void 0,void 0,function*(){if(kG(s).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield NOe(r,e,s)}else{let i=GG();F("Upload cache"),yield Lz0(i,t,e,s),F("Commiting cache");let o=Ba(e);W(`CacheSize:~${Math.round(o/(1024*1024))}MB(${o}B)`);let a=yield Qz0(i,t,o);if(!bR(a.statusCode))throw new Error(`Cacheservicerespondedwith${a.statusCode}duringcommitcache.`);W("Cache saved successfully")}})}var k3e=T(T3e(),1),Kt=T(Jt(),1),Pn=T(Jt(),1),h2=T(Jt(),1),b2=T(Jt(),1),M2=T(Jt(),1);var QH=T(Jt(),1),PH=T(Jt(),1),L3e=T(Jt(),1),Q3e=T(Jt(),1),P3e=T(Jt(),1);var WH=T(Jt(),1),_H=T(Jt(),1),x3e=T(Jt(),1),W3e=T(Jt(),1),_3e=T(Jt(),1),LH=class extends _3e.MessageType{constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,W3e.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,x3e.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,s,n){let i=n??this.create(),o=e.pos+r;for(;e.pos<o;){let[a,c]=e.tag();switch(a){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let u=s.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknownfield${a}(wiretype${c})for${this.typeName}`);let p=e.skip(c);u!==!1&&(u===!0?_H.UnknownFieldHandler.onRead:u)(this.typeName,i,a,c,p)}}return i}internalBinaryWrite(e,r,s){e.scope!==""&&r.tag(1,WH.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,WH.WireType.Varint).int64(e.permission);let n=s.writeUnknownFields;return n!==!1&&(n==!0?_H.UnknownFieldHandler.onWrite:n)(this.typeName,e,r),r}},iw=new LH;var kH=class extends P3e.MessageType{constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:()=>iw}])}create(e){let r={repositoryId:"0",scope:[]};
`));let s=yield sX(r,"create");yield nX(s,t)})}var MM=function(t,e,r,s){function n(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(p){try{u(s.next(p))}catch(l){o(l)}}function c(p){try{u(s.throw(p))}catch(l){o(l)}}function u(p){p.done?i(p.value):n(p.value).then(a,c)}u((s=s.apply(t,e||[])).next())})},_o=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},bM=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},uw=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function X3e(t){if(!t||t.length===0)throw new _o("Path Validation Error: At least one directory or file path is required")}function aX(t){if(t.length>512)throw new _o(`KeyValidationError:${t}cannotbelargerthan512characters.`);if(!/^[^,]*$/.test(t))throw new _o(`KeyValidationError:${t}cannotcontaincommas.`)}function cX(){return T3()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function V3e(t,e,r,s){return MM(this,arguments,void 0,function*(n,i,o,a,c=!1){let u=T3();return F(`Cacheserviceversion:${u}`),X3e(n),u==="v2"?yield tE0(n,i,o,a,c):yield eE0(n,i,o,a,c)})}function eE0(t,e,r,s){return MM(this,arguments,void 0,function*(n,i,o,a,c=!1){o=o||[];let u=[i,...o];if(F("Resolved Keys:"),F(JSON.stringify(u)),u.length>10)throw new _o("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of u)aX(A);let p=yield vO(),l="";try{let A=yield VOe(u,n,{compressionMethod:p,enableCrossOsArchive:c});if(!A?.archiveLocation)return;if(a?.lookupOnly)return W("Lookup only - skipping download"),A.cacheKey;l=K3.join(yield SO(),Fl(p)),F(`ArchivePath:${l}`),yield HG(A.archiveLocation,l,a),Cu()&&(yield J3(l,p));let h=Ba(l);return W(`CacheSize:~${Math.round(h/(1024*1024))}MB(${h}B)`),yield iX(l,p),W("Cache restored successfully"),A.cacheKey}catch(A){let h=A;if(h.name===_o.name)throw A;h instanceof Da&&typeof h.statusCode=="number"&&h.statusCode>=500?lb(`Failedtorestore:${A.message}`):g0(`Failedtorestore:${A.message}`)}finally{try{yield NO(l)}catch(A){F(`Failedtodeletearchive:${A}`)}}})}function tE0(t,e,r,s){return MM(this,arguments,void 0,function*(n,i,o,a,c=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),o=o||[];let u=[i,...o];if(F("Resolved Keys:"),F(JSON.stringify(u)),u.length>10)throw new _o("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of u)aX(l);let p="";try{let l=rX(),A=yield vO(),h={key:i,restoreKeys:o,version:yb(n,A,c)},M=yield l.GetCacheEntryDownloadURL(h);if(!M.ok){F(`Cachenotfoundforversion${h.version}ofkeys:${u.join(", ")}`);return}if(h.key!==M.matchedKey?W(`Cachehitforrestore-key:${M.matchedKey}`):W(`Cachehitfor:${M.matchedKey}`),a?.lookupOnly)return W("Lookup only - skipping download"),M.matchedKey;p=K3.join(yield SO(),Fl(A)),F(`Archivepath:${p}`),F(`Startingdownloadofarchiveto:${p}`),yield HG(M.signedDownloadUrl,p,a);let y=Ba(p);return W(`CacheSize:~${Math.round(y/(1024*1024))}MB(${y}B)`),Cu()&&(yield J3(p,A)),yield iX(p,A),W("Cache restored successfully"),M.matchedKey}catch(l){let A=l;if(A.name===_o.name)throw l;A instanceof Da&&typeof A.statusCode=="number"&&A.statusCode>=500?lb(`Failedtorestore:${l.message}`):g0(`Failedtorestore:${l.message}`)}finally{try{p&&(yield NO(p))}catch(l){F(`Failedtodeletearchive:${l}`)}}})}function uX(t,e,r){return MM(this,arguments,void 0,function*(s,n,i,o=!1){let a=T3();return F(`Cacheserviceversion:${a}`),X3e(s),aX(n),a==="v2"?yield sE0(s,n,i,o):yield rE0(s,n,i,o)})}function rE0(t,e,r){return MM(this,arguments,void 0,function*(s,n,i,o=!1){var a,c,u,p,l;let A=yield vO(),h=-1,M=yield AP(s);if(F("Cache Paths:"),F(`${JSON.stringify(M)}`),M.length===0)throw new Error("Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.");let g=yield SO(),y=K3.join(g,Fl(A));F(`ArchivePath:${y}`);try{yie
Moreinfo:${c.url}`);let h=c.range&&c.range.length>0?c.range[0]?.start.line:void 0,M=!1;for(let g of o)if(g.remote||g.path.endsWith(u)&&g.content===p){a.push({title:l,message:A,file:g.path,startLine:h}),M=!0;break}M||F(`Buildx.convertWarningsToGitHubAnnotations:skippingwarningwithoutmatchingDockerfile${u}:${l}`)}return a}};var I2=T(require("fs"),1),QV=T(require("path"),1);var dS=class t{buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new Y0,this.iidFilename=`build-iidfile-${O0.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${O0.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),s=e?.attrs||{},n=Object.entries(s).filter(([h])=>!r.has(h)),i=O0.parseBoolOrDefault(s["fetch-by-commit"]),o=e?.ref||s.ref||as.ref;o.startsWith("refs/")?o.startsWith("refs/pull/")&&O0.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(o=o.replace(/\/merge$/g,"/head")):o=`refs/heads/${o}`;let a=`${z0.serverURL}/${as.repo.owner}/${as.repo.repo}.git`,c=e?.checksum||s.checksum,u=e?.subdir||s.subdir,p=e?.format;if(!p){if(p="fragment",n.length>0)p="query";else if(O0.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(p="query")}catch{}}let l=as.sha||o;o.startsWith("refs/pull/")&&o.endsWith("/head")&&(l=typeof as.payload.pull_request?.head?.sha=="string"?as.payload.pull_request.head.sha:o);let A=c||l;if(p==="query"){let h=[`ref=${i||c?o:A}`],M=i?A:c;M&&h.push(`checksum=${M}`),u&&u!=="."&&h.push(`subdir=${u}`);for(let[g,y]of n)h.push(`${g}=${y}`);return`${a}?${h.join("&")}`}return`${a}#${A}${u&&u!=="."?`:${u}`:""}`}getImageIDFilePath(){return QV.default.join(h0.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if(I2.default.existsSync(e))return I2.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return QV.default.join(h0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!I2.default.existsSync(e))return;let r=I2.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,s]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${s}`}static resolveSecretFile(e){let[r,s]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${s}`}static resolveSecretEnv(e){let[r,s]=t.parseSecretKvp(e);return`id=${r},env=${s}`}static resolveSecret(e,r){let[s,n]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!I2.default.existsSync(n))throw new Error(`secretfile${n}notfound`);return[s,n]}let i=h0.tmpName({tmpdir:h0.tmpDir()});return I2.default.writeFileSync(i,n),[s,i]}static getProvenanceInput(e){let r=qn(e);if(!r)return r;try{return WAe(e)?`builder-id=${z0.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${z0.workflowRunURL(!0)}`;let r=d1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of r)if(s.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return e;return`${e},builder-id=${z0.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let s="registry",n="",i="",o=d1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let a of o){let c=a.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());c[0]==="type"?s=c[1]:c[0]==="repository"?n=c[1]:c[0]==="ghtoken"&&(i=c[1])}return s==="gha"&&(n||(e=`${e},repository=${z0.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExporterType("tar",e)}stat
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let n of s){if(n.length==1&&!n[0].startsWith("type="))return e=="local";for(let[i,o]of n.map(a=>a.split("=").map(c=>c.trim())))if(i=="type"&&o==e)return!0}return!1}static hasAttestationType(e,r){let s=d1(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let n of s)for(let[i,o]of n.map(a=>a.split("=").map(c=>c.trim())))if(i=="type"&&o==e)return!0;return!1}static resolveAttestationAttrs(e){let r=d1(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),s=[];for(let n of r)for(let i of n)try{let o=O0.parseBool(i);s.push(`disabled=${!o}`)}catch{s.push(i)}return s.join(",")}static hasGitAuthTokenSecret(e,r){for(let s of e){if(r&&s.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(s.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let s=e.indexOf("="),n=e.substring(0,s),i=e.substring(s+1);if(n.length==0||i.length==0)throw new Error(`${e}isnotavalidsecret`);return r&&ga(i),[n,i]}};var PV=T(require("fs"),1),f4e=T(require("path"),1);var fS=class t{buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new Y0,this.metadataFilename=`bake-metadata-${O0.generateRandomString()}.json`}getMetadataFilePath(){return f4e.default.join(h0.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!PV.default.existsSync(e))return;let r=PV.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let s in e)"buildx.build.ref"in e[s]&&r.push(e[s]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});let s=["bake"],n,i=[],o=[...e.files||[],e.source];if(o){for(let c of o.map(u=>u?u.trim():""))if(c.length!=0){if(!O0.isValidRef(c)){i.push(c);continue}if(n)throw new Error("Only one remote bake definition can be defined");n=c}}n&&s.push(n);for(let c of i)s.push("--file",c);if(e.overrides)for(let c of e.overrides)s.push("--set",c);if(e.vars)for(let c of e.vars)s.push("--var",c);if(e.allow)for(let c of e.allow)s.push("--allow",c);e.call&&s.push("--call",e.call),e.load&&s.push("--load"),e.noCache&&s.push("--no-cache"),e.provenance&&s.push("--provenance",e.provenance),e.push&&s.push("--push"),e.sbom&&s.push("--sbom",e.sbom);let a=await this.buildx.getCommand([...s,"--print",...e.targets||[]]);return await ve.getExecOutput(a.command,a.args,r).then(c=>{if(c.stderr.length>0&&c.exitCode!=0)throw new Error(`cannotparsebakedefinitions:${c.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(c.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let s in r.target){let n=r.target[s];n.attest&&Array.isArray(n.attest)&&(n.attest=n.attest.map(i=>t.parseAttestEntry(i))),n["cache-from"]&&Array.isArray(n["cache-from"])&&(n["cache-from"]=n["cache-from"].map(i=>t.parseCacheEntry(i))),n["cache-to"]&&Array.isArray(n["cache-to"])&&(n["cache-to"]=n["cache-to"].map(i=>t.parseCacheEntry(i))),n.output&&Array.isArray(n.output)&&(n.output=n.output.map(i=>t.parseExportEntry(i))),n.secret&&Array.isArray(n.secret)&&(n.secret=n.secret.map(i=>t.parseSecretEntry(i))),n.ssh&&Array.isArray(n.ssh)&&(n.ssh=n.ssh.map(i=>t.parseSSHEntry(i)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},s=d1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let[i,o]=n.toString().split(/(?<=^[^=]+?)=/).map(a=>a.trim());switch(i){case"type":r.type=o;break;case"disabled":r.disabled=O0.parseBool(o);break;default:r[i]=o}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},s=d1(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(s.length===1&&!s[0].includes("="))return r.type="registry",r.ref=s[0],r;for(let n of s){let[i,o]=n.toString().split(/(?<=^[^=]+?)=/)
`).map(n=>n.trim()).filter(n=>n.length>0);return s}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var Bxe=require("crypto"),Hc=T(require("fs"),1),kA=T(require("path"),1);var xC=T(EE(),1),Xc=T(fve(),1),Dxe=T(S0e(),1),gg=T(mxe(),1);var Nte=T(EE(),1);var zxe=T(Rn(),1);var gxe="application/vnd.oci.empty.v1+json";var Up=class{binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await ve.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(F(`Cosign.isAvailablecmderr:${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(F(`Cosign.isAvailableerror:${r}`),!1));return F(`Cosign.isAvailable:${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await ve.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 ve.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let s=r??await this.version();if(!s)return F("Cosign.versionSatisfies false: undefined version"),!1;let n=zxe.satisfies(s,e)||/^[0-9a-f]{7}$/.exec(s)!==null;return F(`Cosign.versionSatisfies${s}statisfies${e}:${n}`),n}static parseCommandOutput(e){let r,s,n,i;for(let o of e.split(/\r?\n/)){let a=o.trim();if(!a.startsWith("{")||!a.endsWith("}"))continue;let c;try{c=JSON.parse(a)}catch{continue}if(c&&Array.isArray(c.errors)&&c.errors.length>0&&(i=c.errors),!r&&c&&Array.isArray(c.manifests)&&c.manifests.length>0){let u=c.manifests[0];u?.artifactType===Nte.BUNDLE_V03_MEDIA_TYPE&&typeof u.digest=="string"?r=u.digest:u?.artifactType===gxe&&typeof u.digest=="string"&&(s=u.digest)}if(!n&&c&&c.mediaType===Nte.BUNDLE_V03_MEDIA_TYPE&&(n=c),n&&(r||s)){i=void 0;break}}return{bundle:n,signatureManifestDigest:r||s,errors:i}}};var vte=T(require("fs"),1);var gT=class t{buildx;constructor(e){this.buildx=e?.buildx||new Y0}async getCommand(e){return await this.buildx.getCommand(["imagetools",...e])}async getInspectCommand(e){return await this.getCommand(["inspect",...e])}async getCreateCommand(e){return await this.getCommand(["create",...e])}async inspectImage(e){return await this.inspect(e,"{{json .Image}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"config"),r;throw new Error("Unexpected output format")})}async inspectManifest(e){return await this.inspect(e,"{{json .Manifest}}",r=>{if(typeof r=="object"&&!Array.isArray(r)&&r!==null)return Object.prototype.hasOwnProperty.call(r,"manifests"),r;throw new Error("Unexpected output format")})}async attestationDescriptors(e){let r=await this.inspectManifest(e);if(typeof r!="object"||r===null||!("manifests"in r)||!Array.isArray(r.manifests))throw new Error(`Nodescriptorfoundfor${e.name}`);let s=r.manifests.filter(o=>o.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return s;let n=e.platform,i=new Map;for(let o of r.manifests)o.digest&&i.set(o.digest,o);return s.filter(o=>{let a=o.annotations?.["vnd.docker.reference.digest"];if(!a)return!1;let c=i.get(a);return c?c.platform?.os===n.os&&c.platform?.architecture===n.architecture&&(c.platform?.variant??"")===(n.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],s=h0.tmpName({tmpdir:h0.tmpDir(),template:"imagetools-metadata-XXXXXX"}),n=[],i=[];for(let a of e.sources){if(a.startsWith("cwd://")){let c=a.substring(6);c.length>0&&n.push(c);continue}i.push(a)}if(e.tags)for(let a of e.tags)r.push("--tag",a);if(e.platforms)for(let a of e.platforms)r.push("--platform",a);if(e.annotations)for(let a of e.annotations)r.push("--annotation",a);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",s);for(let a of n)r.push("--file",a);for(let a of i)r.push(a);let o=await this.getCreat
${o.message}`),await new Promise(u=>setTimeout(u,Math.pow(2,a)*100))}throw o??new Error(`ImageToolsinspectcommandfailedfor${e.name}`)}async execInspect(e,r,s){return await ve.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(n=>{if(n.stderr.length>0&&n.exitCode!=0)throw new Error(n.stderr.trim());return s(JSON.parse(n.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown|not found: not found)/i.test(e)}};var Oxe="application/vnd.in-toto+json";var Exe="https://fulcio.sigstore.dev",yxe="https://rekor.sigstore.dev",Cxe="https://timestamp.sigstore.dev",vf="https://search.sigstore.dev";var PH0="slsaprovenance1",UA=class t{cosign;imageTools;constructor(e){this.cosign=e?.cosign||new Up,this.imageTools=e?.imageTools||new gT}async signAttestationManifests(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign attestation manifests");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let s=this.signingEndpoints(e.noTransparencyLog);W(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let n=t.noTransparencyLog(e.noTransparencyLog),i=[];await this.cosign.versionSatisfies(">=3.0.4")?await cr("Creating Sigstore protobuf signing config",async()=>{let o=h0.tmpName({template:"signing-config-XXXXXX.json",tmpdir:h0.tmpDir()}),a=["signing-config","create","--with-default-services=true",`--out=${o}`];n&&a.push("--no-default-rekor=true"),await ve.exec(this.cosign.binPath,a,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),W(JSON.stringify(JSON.parse(Hc.default.readFileSync(o,{encoding:"utf-8"})),null,2)),i.push(`--signing-config=${o}`)}):(i.push("--use-signing-config"),n&&i.push("--tlog-upload=false"));for(let o of e.imageNames){let a=await this.imageTools.attestationDigests({name:`${o}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let c of a){let u=`${o}@${c}`;await cr(`Signingattestationmanifest${u}`,async()=>{let p=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...i];W(`[command]${this.cosign.binPath}${[...p,u].join(" ")}`);let l=await ve.getExecOutput(this.cosign.binPath,["--verbose",...p,u],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),A=Up.parseCommandOutput(l.stderr.trim());if(l.exitCode!=0)if(A.errors&&A.errors.length>0){let M=A.errors.map(g=>`-[${g.code}]${g.message}:${g.detail}`).join(`
${u}`),await new Promise(p=>setTimeout(p,Math.pow(2,o)*100));else throw i}else throw new Error(`Cosignverifycommandfailedwith:${a.stderr.trim().split(/\r?\n/).filter(u=>u.length>0).pop()??"unknown error"}`)}throw i}async signProvenanceBlobs(e){let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let s=this.signingEndpoints(e.noTransparencyLog);W(`UsingSigstoresigningendpoint:${s.fulcioURL}`);let n=t.getProvenanceBlobs(e);for(let i of Object.keys(n))await cr(`Signing${i}`,async()=>{let o=n[i],a=kA.default.join(kA.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),c=t.getProvenanceSubjects(o);if(c.length===0){g0(`Nosubjectsfoundinprovenance${i},skipsigning.`);return}let u=await t.signPayload({data:o,type:Oxe},s),p=t.parseBundle(u);W("Provenance blob signed for:");for(let l of c){let[A,h]=Object.entries(l.digest)[0]||[];W(`-${l.name}(${A}:${h})`)}p.tlogID&&W(`AttestationsignatureuploadedtoRekortransparencylog:${vf}?logIndex=${p.tlogID}`),W(`WritingSigstorebundleto:${a}`),Hc.default.writeFileSync(a,JSON.stringify(p.payload,null,2),{encoding:"utf-8"}),r[i]={...p,bundlePath:a,subjects:c}})}catch(s){throw new Error(`SigningBuildKitprovenanceblobsfailed:${s.message}`)}return r}async verifySignedArtifacts(e,r){let s={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[n,i]of Object.entries(e)){let o=kA.default.dirname(n);await cr(`Verifyingsignaturebundle${i.bundlePath}`,async()=>{for(let a of i.subjects){let c=kA.default.join(o,a.name);W(`Verifyingsignedartifact${c}`);let u=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??PH0];(r.noTransparencyLog||!i.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let p=await ve.getExecOutput(this.cosign.binPath,[...u,"--bundle",i.bundlePath,c],{ignoreReturnCode:!0});if(p.stderr.length>0&&p.exitCode!=0)throw new Error(p.stderr);s[c]={bundlePath:i.bundlePath,cosignArgs:u}}})}return s}async verifyArtifact(e,r,s){W("Verifying keyless verification bundle signature");let n=JSON.parse(Hc.default.readFileSync(r,"utf-8")),i=(0,xC.bundleFromJSON)(n);W("Fetching Sigstore TUF trusted root metadata");let o=await Dxe.getTrustedRoot(),a=(0,gg.toTrustMaterial)(o);try{W("Verifying artifact signature");let c=(0,gg.toSignedEntity)(i,Hc.default.readFileSync(e)),u=t.parseCertificate(i),p=i.verificationMaterial.tlogEntries,l=p.length>0?p[0].logIndex:void 0;if(s?.subjectAlternativeName&&s?.subjectAlternativeName instanceof RegExp){let M=u.subjectAltName?.replace(/^uri:/i,"");if(M){if(!M.match(s.subjectAlternativeName))throw new Error(`SigningcertificatesubjectAlternativeName"${M}"doesnotmatchexpectedpattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let h=new gg.Verifier(a).verify(c,{subjectAlternativeName:s?.subjectAlternativeName&&typeof s.subjectAlternativeName=="string"?s.subjectAlternativeName:void 0,extensions:s?.issuer?{issuer:s.issuer}:void 0});return F(`Sigstore.verifyArtifactsigner:${JSON.stringify(h)}`),{payload:n,certificate:u.toString(),tlogID:l}}catch(c){throw new Error(`Failedtoverifyartifactsignature:${c}`)}}signingEndpoints(e){return e=t.noTransparencyLog(e),W(`Uploadtotransparencylog:${e?"disabled":"enabled"}`),{fulcioURL:Exe,rekorURL:e?void 0:yxe,tsaServerURL:Cxe}}static noTransparencyLog(e){return e??z0.context.payload.repository?.private}static getProvenanceBlobs(e){let r=kA.default.join(e.localExportDir,"provenance.json");if(Hc.default.existsSync(r))return{[r]:Hc.default.readFileSync(r)};let s=Hc.default.readdirSync(e.localExportDir,{withFileTypes:!0}),n=s.filter(i=>i.isDirectory());if(n.length>0&&n.length===s.length&&n.every(i=>Hc.default.existsSync(kA.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let o of n){let a=
`,bakeTarget:qn("bake-target")||"docker-metadata-action",githubToken:qn("github-token")}}async function Nxe(t,e){switch(t){case"workflow":return await kH0(e);case"git":return await UH0();default:throw new Error(`Invalidcontextsource:${t}`)}}async function kH0(t){let e=z0.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 GH0(e.sha,t),...e}}async function UH0(){let t=await Ju.context();return{commitDate:await Ju.commitDate(t.sha),...t}}async function GH0(t,e){let r=z0.context.payload;if(r.commits){let s=r.commits.find(n=>n.id===t)?.timestamp;if(s)return new Date(s)}if(r.head_commit&&r.head_commit.id===t)return new Date(r.head_commit.timestamp);try{let s=await e.github.octokit.rest.repos.getCommit({owner:z0.context.repo.owner,repo:z0.context.repo.repo,ref:t});if(s.data.commit.committer?.date)return new Date(s.data.commit.committer.date);throw new Error("Committer date not found")}catch(s){return F(`FailedtogetcommitdatefromGitHubAPI:${s.message}`),new Date}}var el=T(FV(),1),CHe=T(require("fs"),1),BHe=T(require("path"),1),v4=T(_xe(),1),ii=T(gHe(),1),kg=T(Rn(),1);function OHe(t){let e=[];if(t.length==1){let r=!1,s=d1(t[0],{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of s){let i=n.toString().split("=").map(o=>o.trim());if(i.length==1)e.push({name:i[0],enable:!0});else{r=!0;break}}if(!r)return zHe(e)}e=[];for(let r of t){let s={name:"",enable:!0},n=d1(r,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let i of n){let o=i.toString().split("=").map(a=>a.trim());if(o.length==1)s.name=o[0];else{let a=o[0].toLowerCase(),c=o[1];switch(a){case"name":{s.name=c;break}case"enable":{if(!["true","false"].includes(c))throw new Error(`Invalidenableattributevalue:${r}`);s.enable=/true/i.test(c);break}default:throw new Error(`Unknownimageattribute:${r}`)}}}if(s.name.length==0)throw new Error(`Imagenameattributeempty:${r}`);e.push(s)}return zHe(e)}function zHe(t){Nd("Processing images input");for(let e of t)W(`name=${e.name},enable=${e.enable}`);return vd(),t}var ose=(c=>(c.Schedule="schedule",c.Semver="semver",c.Pep440="pep440",c.Match="match",c.Edge="edge",c.Ref="ref",c.Raw="raw",c.Sha="sha",c))(ose||{}),qx=(s=>(s.Branch="branch",s.Tag="tag",s.PR="pr",s))(qx||{}),Ix=(r=>(r.Short="short",r.Long="long",r))(Ix||{}),ise=class{type;attrs;constructor(){this.attrs={}}toString(){let e=[`type=${this.type}`];for(let r in this.attrs)e.push(`${r}=${this.attrs[r]}`);return e.join(",")}},xst={schedule:"1000",semver:"900",pep440:"900",match:"800",edge:"700",ref:"600",raw:"200",sha:"100"};function EHe(t){let e=[];t.length==0&&(t=["type=schedule","type=ref,event=branch","type=ref,event=tag","type=ref,event=pr"]);for(let s of t)e.push(Wst(s));let r=e.sort((s,n)=>Number(s.attrs.priority)<Number(n.attrs.priority)?1:Number(s.attrs.priority)>Number(n.attrs.priority)?-1:0);Nd("Processing tags input");for(let s of r)W(s.toString());return vd(),r}function Wst(t){let e=d1(t,{relaxColumnCount:!0,skipEmptyLines:!0})[0],r=new ise;for(let s of e){let n=s.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim());if(n.length==1)r.attrs.value=n[0];else{let i=n[0].toLowerCase(),o=n[1];switch(i){case"type":{if(!Object.values(ose).includes(o))throw new Error(`Unknowntagtypeattribute:${o}`);r.type=o;break}default:{r.attrs[i]=o;break}}}}switch(r.type==null&&(r.type="raw"),r.type){case"schedule":{Object.prototype.hasOwnProperty.call(r.attrs,"pattern")||(r.attrs.pattern="nightly");break}case"semver":case"pep440":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missingpatternattributefor${t}`);Object.prototype.hasOwnProperty.call(r.attrs,"value")||(r.attrs.value=""),Object.prototype.hasOwnProperty.call(r.attrs,"match")||(r.attrs.match="");break}case"match":{if(!Object.prototype.hasOwnProperty.call(r.attrs,"pattern"))throw new Error(`Missing