mirror of
https://github.com/docker/setup-buildx-action.git
synced 2026-10-02 16:26:08 +03:00
[dependabot skip] chore: update generated content
This commit is contained in:
1 parent
63e71bc2eb
commit
92e837c4ed
3 files changed
+99
-99
No files matched your search
+95
-95
@@ -1,32 +1,32 @@
|
||||
var que=Object.create;var _E=Object.defineProperty;var Gue=Object.getOwnPropertyDescriptor;var Hue=Object.getOwnPropertyNames;var Vue=Object.getPrototypeOf,zue=Object.prototype.hasOwnProperty;var o=(t,e)=>_E(t,"name",{value:e,configurable:!0});var m=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Jue=(t,e)=>{for(var r in e)_E(t,r,{get:e[r],enumerable:!0})},$ue=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Hue(e))!zue.call(t,s)&&s!==r&&_E(t,s,{get:()=>e[s],enumerable:!(n=Gue(e,s))||n.enumerable});return t};var w=(t,e,r)=>(r=t!=null?que(Vue(t)):{},$ue(e||!t||!t.__esModule?_E(r,"default",{value:t,enumerable:!0}):r,t));var PG=m(md=>{"use strict";var y6e=require("net"),WAe=require("tls"),Qx=require("http"),RG=require("https"),jAe=require("events"),C6e=require("assert"),KAe=require("util");md.httpOverHttp=XAe;md.httpsOverHttp=ZAe;md.httpOverHttps=epe;md.httpsOverHttps=tpe;function XAe(t){var e=new ra(t);return e.request=Qx.request,e}o(XAe,"httpOverHttp");function ZAe(t){var e=new ra(t);return e.request=Qx.request,e.createSocket=TG,e.defaultPort=443,e}o(ZAe,"httpsOverHttp");function epe(t){var e=new ra(t);return e.request=RG.request,e}o(epe,"httpOverHttps");function tpe(t){var e=new ra(t);return e.request=RG.request,e.createSocket=TG,e.defaultPort=443,e}o(tpe,"httpsOverHttps");function ra(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||Qx.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",o(function(n,s,i,a){for(var c=vG(s,i,a),l=0,u=e.requests.length;l<u;++l){var d=e.requests[l];if(d.host===c.host&&d.port===c.port){e.requests.splice(l,1),d.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)},"onFree"))}o(ra,"TunnelingAgent");KAe.inherits(ra,jAe.EventEmitter);ra.prototype.addRequest=o(function(e,r,n,s){var i=this,a=Rx({request:e},i.options,vG(r,n,s));if(i.sockets.length>=this.maxSockets){i.requests.push(a);return}i.createSocket(a,function(c){c.on("free",l),c.on("close",u),c.on("agentRemove",u),e.onSocket(c);function l(){i.emit("free",c,a)}o(l,"onFree");function u(d){i.removeSocket(c),c.removeListener("free",l),c.removeListener("close",u),c.removeListener("agentRemove",u)}o(u,"onCloseOrRemove")})},"addRequest");ra.prototype.createSocket=o(function(e,r){var n=this,s={};n.sockets.push(s);var i=Rx({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),ic("making CONNECT request");var a=n.request(i);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",l),a.once("connect",u),a.once("error",d),a.end();function c(A){A.upgrade=!0}o(c,"onResponse");function l(A,p,f){process.nextTick(function(){u(A,p,f)})}o(l,"onUpgrade");function u(A,p,f){if(a.removeAllListeners(),p.removeAllListeners(),A.statusCode!==200){ic("tunneling socket could not be established, statusCode=%d",A.statusCode),p.destroy();var h=new Error("tunneling socket could not be established, statusCode="+A.statusCode);h.code="ECONNRESET",e.request.emit("error",h),n.removeSocket(s);return}if(f.length>0){ic("got illegal response body from proxy"),p.destroy();var h=new Error("got illegal response body from proxy");h.code="ECONNRESET",e.request.emit("error",h),n.removeSocket(s);return}return ic("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=p,r(p)}o(u,"onConnect");function d(A){a.removeAllListeners(),ic(`tunneling socket could not be established, cause=%s
|
||||
`,A.message,A.stack);var p=new Error("tunneling socket could not be established, cause="+A.message);p.code="ECONNRESET",e.request.emit("error",p),n.removeSocket(s)}o(d,"onError")},"createSocket");ra.prototype.removeSocket=o(function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(s){n.request.onSocket(s)})}},"removeSocket");function TG(t,e){var r=this;ra.prototype.createSocket.call(r,t,function(n){var s=t.request.getHeader("host"),i=Rx({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):t.host}),a=WAe.connect(0,i);r.sockets[r.sockets.indexOf(n)]=a,e(a)})}o(TG,"createSecureSocket");function vG(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}o(vG,"toOptions");function Rx(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var s=Object.keys(n),i=0,a=s.length;i<a;++i){var c=s[i];n[c]!==void 0&&(t[c]=n[c])}}return t}o(Rx,"mergeOptions");var ic;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?ic=o(function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)},"debug"):ic=o(function(){},"debug");md.debug=ic});var Qf=m((b6e,_G)=>{_G.exports=PG()});var dt=m((w6e,kG)=>{kG.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var Pe=m((S6e,iH)=>{"use strict";var DG=Symbol.for("undici.error.UND_ERR"),At=class extends Error{static{o(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[DG]===!0}[DG]=!0},OG=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),Tx=class extends At{static{o(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[OG]===!0}[OG]=!0},MG=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),vx=class extends At{static{o(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[MG]===!0}[MG]=!0},LG=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),Px=class extends At{static{o(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[LG]===!0}[LG]=!0},FG=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),_x=class extends At{static{o(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"
Line truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}o(EV,"isValidHeaderValue");function ghe(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),s="";if(n.length>0)for(let i=n.length;i!==0;i--){let a=n[i-1].trim();if(the.has(a)){s=a;break}}s!==""&&(t.referrerPolicy=s)}o(ghe,"setRequestReferrerPolicyOnRedirect");function Ehe(){return"allowed"}o(Ehe,"crossOriginResourcePolicyCheck");function yhe(){return"success"}o(yhe,"corsCheck");function Che(){return"success"}o(Che,"TAOCheck");function Ihe(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}o(Ihe,"appendFetchMetadata");function Bhe(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&NQ(t.origin)&&!NQ(Mf(t))&&(e=null);break;case"same-origin":Ay(t,Mf(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}o(Bhe,"appendRequestOriginHeader");function Nd(t,e){return t}o(Nd,"coarsenTime");function bhe(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:Nd(t.domainLookupStartTime,r),domainLookupEndTime:Nd(t.domainLookupEndTime,r),connectionStartTime:Nd(t.connectionStartTime,r),connectionEndTime:Nd(t.connectionEndTime,r),secureConnectionStartTime:Nd(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}o(bhe,"clampAndCoarsenConnectionTimingInfo");function whe(t){return Nd(ohe.now(),t)}o(whe,"coarsenedSharedCurrentTime");function She(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}o(She,"createOpaqueTimingInfo");function yV(){return{referrerPolicy:"strict-origin-when-cross-origin"}}o(yV,"makePolicyContainer");function Nhe(t){return{referrerPolicy:t.referrerPolicy}}o(Nhe,"clonePolicyContainer");function xhe(t){let e=t.referrerPolicy;Sl(e);let r=null;if(t.referrer==="client"){let c=pV();if(!c||c.origin==="null")return"no-referrer";r=new URL(c)}else t.referrer instanceof URL&&(r=t.referrer);let n=SQ(r),s=SQ(r,!0);n.toString().length>4096&&(n=s);let i=Ay(t,n),a=Of(n)&&!Of(t.url);switch(e){case"origin":return s??SQ(r,!0);case"unsafe-url":return n;case"same-origin":return i?s:"no-referrer";case"origin-when-cross-origin":return i?n:s;case"strict-origin-when-cross-origin":{let c=Mf(t);return Ay(n,c)?n:Of(n)&&!Of(c)?"no-referrer":s}default:return a?"no-referrer":s}}o(xhe,"determineRequestsReferrer");function SQ(t,e){return Sl(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}o(SQ,"stripURLForReferrer");function Of(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}o(Of,"isURLPotentiallyTrustworthy");function Qhe(t,e){if(dy===void 0)return!0;let r=CV(e);if(r==="no metadata"||r.length===0)return!0;let n=The(r),s=vhe(r,n);for(let i of s){let a=i.algo,c=i.hash,l=dy.createHash(a).update(t).digest("base64");if(l[l.length-1]==="="&&(l[l.length-2]==="="?l=l.slice(0,-2):l=l.slice(0,-1)),Phe(l,c))return!0}return!1}o(Qhe,"bytesMatch");var Rhe=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function CV(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let s=Rhe.exec(n);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let i=s.groups.algo.toLowerCase();hV.includes(i)&&e.push(s.groups)}return r===!0?"no metadata":e}o(CV,"parseMetadata");function The(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}o(The,"getStrongestMetadata");function vhe(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}o(vhe,"filterMetadataListByAlgorithm");function Phe(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}o(Phe,"compareBase64Mixed");function _he(t){}o(_he,"tryUpgradeReque
Line truncated
|
||||
`);function hme(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}o(hme,"isAsciiString");function mme(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let n=t.charCodeAt(r);if(!(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}o(mme,"validateBoundary");function gme(t,e){fy(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),s=[],i={position:0};for(;t[i.position]===13&&t[i.position+1]===10;)i.position+=2;let a=t.length;for(;t[a-1]===10&&t[a-2]===13;)a-=2;for(a!==t.length&&(t=t.subarray(0,a));;){if(t.subarray(i.position,i.position+n.length).equals(n))i.position+=n.length;else return"failure";if(i.position===t.length-2&&hy(t,pme,i)||i.position===t.length-4&&hy(t,fme,i))return s;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let c=Eme(t,i);if(c==="failure")return"failure";let{name:l,filename:u,contentType:d,encoding:A}=c;i.position+=2;let p;{let h=t.indexOf(n.subarray(2),i.position);if(h===-1)return"failure";p=t.subarray(i.position,h-4),i.position+=p.length,A==="base64"&&(p=Buffer.from(p.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let f;u!==null?(d??="text/plain",hme(d)||(d=""),f=new dme([p],u,{type:d})):f=ome(Buffer.from(p)),fy(_V(l)),fy(typeof f=="string"&&_V(f)||cme(f)),s.push(lme(l,f,u))}}o(gme,"multipartFormDataParser");function Eme(t,e){let r=null,n=null,s=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:s,encoding:i};let a=Qd(c=>c!==10&&c!==13&&c!==58,t,e);if(a=_Q(a,!0,!0,c=>c===9||c===32),!ame.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,Qd(c=>c===32||c===9,t,e),ime(a)){case"content-disposition":{if(r=n=null,!hy(t,Ame,e)||(e.position+=17,r=OV(t,e),r===null))return"failure";if(hy(t,DV,e)){let c=e.position+DV.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,n=OV(t,e),n===null))return"failure"}break}case"content-type":{let c=Qd(l=>l!==10&&l!==13,t,e);c=_Q(c,!1,!0,l=>l===9||l===32),s=kV(c);break}case"content-transfer-encoding":{let c=Qd(l=>l!==10&&l!==13,t,e);c=_Q(c,!1,!0,l=>l===9||l===32),i=kV(c);break}default:Qd(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}o(Eme,"parseMultipartFormDataHeaders");function OV(t,e){fy(t[e.position-1]===34);let r=Qd(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}o(OV,"parseMultipartFormDataName");function Qd(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}o(Qd,"collectASequenceOfBytes");function _Q(t,e,r,n){let s=0,i=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;i>0&&n(t[i]);)i--;return s===0&&i===t.length-1?t:t.subarray(s,i+1)}o(_Q,"removeChars");function hy(t,e,r){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}o(hy,"bufferStartsWith");MV.exports={multipartFormDataParser:gme,validateBoundary:mme}});var vd=m((dKe,YV)=>{"use strict";var Uf=Ie(),{ReadableStreamFrom:yme,isBlobLike:FV,isReadableStreamLike:Cme,readableStreamClose:Ime,createDeferredPromise:Bme,fullyReadBody:bme,extractMimeType:wme,utf8DecodeBytes:GV}=Ln(),{FormData:UV}=Ff(),{kState:Td}=oc(),{webidl:Sme}=Er(),{Blob:Nme}=require("node:buffer"),kQ=require("node:assert"),{isErrored:HV,isDisturbed:xme}=require("node:stream"),{isArrayBuffer:Qme}=require("node:util/types"),{serializeAMimeType:Rme}=dn(),{multipartFormDataParser:Tme}=LV(),DQ;try{let t=require("node:crypto");DQ=o(e=>t.randomInt(0,e),"random")}catch{DQ=o(t=>Math.floor(Math.random(t)),"random")}var my=new TextEncoder;function vme(){}o(vme,"noop");var VV=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,zV;VV&&(zV=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!xme(e)&&!HV(e)&&e.cancel("Response object has been garbage collected").catch(vme)}));function JV(t,e=!1){let r=null;t instanceof ReadableStream?r=t:FV(t)?r=t.stream():r=new ReadableStream({async pull(l){let u=typeof s=="string"?my.encode(s):s;u.byteLength&&l.enqueue(u),queueMicrotask(()=>Ime(l))},start(){},type:"bytes"}),kQ(Cme(r));let n=null,s=null,i=null,a=null;if(typeof t=="string")s=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)s=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(Qme(t))s=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))s=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(Uf.isFormDataLike(t)){let l=`----formdata-undici-0${`${DQ(1e11)}`.padStart(11,"0")}`,u=`--${l}\r
|
||||
var Hue=Object.create;var kE=Object.defineProperty;var Vue=Object.getOwnPropertyDescriptor;var zue=Object.getOwnPropertyNames;var Jue=Object.getPrototypeOf,$ue=Object.prototype.hasOwnProperty;var o=(t,e)=>kE(t,"name",{value:e,configurable:!0});var m=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Yue=(t,e)=>{for(var r in e)kE(t,r,{get:e[r],enumerable:!0})},Wue=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of zue(e))!$ue.call(t,s)&&s!==r&&kE(t,s,{get:()=>e[s],enumerable:!(n=Vue(e,s))||n.enumerable});return t};var w=(t,e,r)=>(r=t!=null?Hue(Jue(t)):{},Wue(e||!t||!t.__esModule?kE(r,"default",{value:t,enumerable:!0}):r,t));var kG=m(md=>{"use strict";var B6e=require("net"),KAe=require("tls"),Rx=require("http"),vG=require("https"),XAe=require("events"),b6e=require("assert"),ZAe=require("util");md.httpOverHttp=epe;md.httpsOverHttp=tpe;md.httpOverHttps=rpe;md.httpsOverHttps=npe;function epe(t){var e=new ra(t);return e.request=Rx.request,e}o(epe,"httpOverHttp");function tpe(t){var e=new ra(t);return e.request=Rx.request,e.createSocket=PG,e.defaultPort=443,e}o(tpe,"httpsOverHttp");function rpe(t){var e=new ra(t);return e.request=vG.request,e}o(rpe,"httpOverHttps");function npe(t){var e=new ra(t);return e.request=vG.request,e.createSocket=PG,e.defaultPort=443,e}o(npe,"httpsOverHttps");function ra(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||Rx.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",o(function(n,s,i,a){for(var c=_G(s,i,a),l=0,u=e.requests.length;l<u;++l){var d=e.requests[l];if(d.host===c.host&&d.port===c.port){e.requests.splice(l,1),d.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)},"onFree"))}o(ra,"TunnelingAgent");ZAe.inherits(ra,XAe.EventEmitter);ra.prototype.addRequest=o(function(e,r,n,s){var i=this,a=Tx({request:e},i.options,_G(r,n,s));if(i.sockets.length>=this.maxSockets){i.requests.push(a);return}i.createSocket(a,function(c){c.on("free",l),c.on("close",u),c.on("agentRemove",u),e.onSocket(c);function l(){i.emit("free",c,a)}o(l,"onFree");function u(d){i.removeSocket(c),c.removeListener("free",l),c.removeListener("close",u),c.removeListener("agentRemove",u)}o(u,"onCloseOrRemove")})},"addRequest");ra.prototype.createSocket=o(function(e,r){var n=this,s={};n.sockets.push(s);var i=Tx({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(i.localAddress=e.localAddress),i.proxyAuth&&(i.headers=i.headers||{},i.headers["Proxy-Authorization"]="Basic "+new Buffer(i.proxyAuth).toString("base64")),ic("making CONNECT request");var a=n.request(i);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",l),a.once("connect",u),a.once("error",d),a.end();function c(A){A.upgrade=!0}o(c,"onResponse");function l(A,p,f){process.nextTick(function(){u(A,p,f)})}o(l,"onUpgrade");function u(A,p,f){if(a.removeAllListeners(),p.removeAllListeners(),A.statusCode!==200){ic("tunneling socket could not be established, statusCode=%d",A.statusCode),p.destroy();var h=new Error("tunneling socket could not be established, statusCode="+A.statusCode);h.code="ECONNRESET",e.request.emit("error",h),n.removeSocket(s);return}if(f.length>0){ic("got illegal response body from proxy"),p.destroy();var h=new Error("got illegal response body from proxy");h.code="ECONNRESET",e.request.emit("error",h),n.removeSocket(s);return}return ic("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=p,r(p)}o(u,"onConnect");function d(A){a.removeAllListeners(),ic(`tunneling socket could not be established, cause=%s
|
||||
`,A.message,A.stack);var p=new Error("tunneling socket could not be established, cause="+A.message);p.code="ECONNRESET",e.request.emit("error",p),n.removeSocket(s)}o(d,"onError")},"createSocket");ra.prototype.removeSocket=o(function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var n=this.requests.shift();n&&this.createSocket(n,function(s){n.request.onSocket(s)})}},"removeSocket");function PG(t,e){var r=this;ra.prototype.createSocket.call(r,t,function(n){var s=t.request.getHeader("host"),i=Tx({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):t.host}),a=KAe.connect(0,i);r.sockets[r.sockets.indexOf(n)]=a,e(a)})}o(PG,"createSecureSocket");function _G(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}o(_G,"toOptions");function Tx(t){for(var e=1,r=arguments.length;e<r;++e){var n=arguments[e];if(typeof n=="object")for(var s=Object.keys(n),i=0,a=s.length;i<a;++i){var c=s[i];n[c]!==void 0&&(t[c]=n[c])}}return t}o(Tx,"mergeOptions");var ic;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?ic=o(function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)},"debug"):ic=o(function(){},"debug");md.debug=ic});var Rf=m((N6e,DG)=>{DG.exports=kG()});var dt=m((x6e,OG)=>{OG.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kInterceptors:Symbol("dispatch interceptors"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent")}});var Pe=m((Q6e,aH)=>{"use strict";var MG=Symbol.for("undici.error.UND_ERR"),At=class extends Error{static{o(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[MG]===!0}[MG]=!0},LG=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),vx=class extends At{static{o(this,"ConnectTimeoutError")}constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[LG]===!0}[LG]=!0},FG=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),Px=class extends At{static{o(this,"HeadersTimeoutError")}constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[FG]===!0}[FG]=!0},UG=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),_x=class extends At{static{o(this,"HeadersOverflowError")}constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&e[UG]===!0}[UG]=!0},qG=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),kx=class extends At{static{o(this,"BodyTimeoutError")}constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"
Line truncated
|
||||
`)||t.includes("\r")||t.includes("\0"))===!1}o(CV,"isValidHeaderValue");function yhe(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),s="";if(n.length>0)for(let i=n.length;i!==0;i--){let a=n[i-1].trim();if(nhe.has(a)){s=a;break}}s!==""&&(t.referrerPolicy=s)}o(yhe,"setRequestReferrerPolicyOnRedirect");function Che(){return"allowed"}o(Che,"crossOriginResourcePolicyCheck");function Ihe(){return"success"}o(Ihe,"corsCheck");function Bhe(){return"success"}o(Bhe,"TAOCheck");function bhe(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}o(bhe,"appendFetchMetadata");function whe(t){let e=t.origin;if(!(e==="client"||e===void 0)){if(t.responseTainting==="cors"||t.mode==="websocket")t.headersList.append("origin",e,!0);else if(t.method!=="GET"&&t.method!=="HEAD"){switch(t.referrerPolicy){case"no-referrer":e=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":t.origin&&NQ(t.origin)&&!NQ(Ff(t))&&(e=null);break;case"same-origin":py(t,Ff(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}o(whe,"appendRequestOriginHeader");function Nd(t,e){return t}o(Nd,"coarsenTime");function She(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:Nd(t.domainLookupStartTime,r),domainLookupEndTime:Nd(t.domainLookupEndTime,r),connectionStartTime:Nd(t.connectionStartTime,r),connectionEndTime:Nd(t.connectionEndTime,r),secureConnectionStartTime:Nd(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}o(She,"clampAndCoarsenConnectionTimingInfo");function Nhe(t){return Nd(che.now(),t)}o(Nhe,"coarsenedSharedCurrentTime");function xhe(t){return{startTime:t.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:t.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}o(xhe,"createOpaqueTimingInfo");function IV(){return{referrerPolicy:"strict-origin-when-cross-origin"}}o(IV,"makePolicyContainer");function Qhe(t){return{referrerPolicy:t.referrerPolicy}}o(Qhe,"clonePolicyContainer");function Rhe(t){let e=t.referrerPolicy;Sl(e);let r=null;if(t.referrer==="client"){let c=hV();if(!c||c.origin==="null")return"no-referrer";r=new URL(c)}else t.referrer instanceof URL&&(r=t.referrer);let n=SQ(r),s=SQ(r,!0);n.toString().length>4096&&(n=s);let i=py(t,n),a=Lf(n)&&!Lf(t.url);switch(e){case"origin":return s??SQ(r,!0);case"unsafe-url":return n;case"same-origin":return i?s:"no-referrer";case"origin-when-cross-origin":return i?n:s;case"strict-origin-when-cross-origin":{let c=Ff(t);return py(n,c)?n:Lf(n)&&!Lf(c)?"no-referrer":s}default:return a?"no-referrer":s}}o(Rhe,"determineRequestsReferrer");function SQ(t,e){return Sl(t instanceof URL),t=new URL(t),t.protocol==="file:"||t.protocol==="about:"||t.protocol==="blank:"?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}o(SQ,"stripURLForReferrer");function Lf(t){if(!(t instanceof URL))return!1;if(t.href==="about:blank"||t.href==="about:srcdoc"||t.protocol==="data:"||t.protocol==="file:")return!0;return e(t.origin);function e(r){if(r==null||r==="null")return!1;let n=new URL(r);return!!(n.protocol==="https:"||n.protocol==="wss:"||/^127(?:\.[0-9]+){0,2}\.[0-9]+$|^\[(?:0*:)*?:?0*1\]$/.test(n.hostname)||n.hostname==="localhost"||n.hostname.includes("localhost.")||n.hostname.endsWith(".localhost"))}}o(Lf,"isURLPotentiallyTrustworthy");function The(t,e){if(Ay===void 0)return!0;let r=BV(e);if(r==="no metadata"||r.length===0)return!0;let n=Phe(r),s=_he(r,n);for(let i of s){let a=i.algo,c=i.hash,l=Ay.createHash(a).update(t).digest("base64");if(l[l.length-1]==="="&&(l[l.length-2]==="="?l=l.slice(0,-2):l=l.slice(0,-1)),khe(l,c))return!0}return!1}o(The,"bytesMatch");var vhe=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function BV(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let s=vhe.exec(n);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let i=s.groups.algo.toLowerCase();gV.includes(i)&&e.push(s.groups)}return r===!0?"no metadata":e}o(BV,"parseMetadata");function Phe(t){let e=t[0].algo;if(e[3]==="5")return e;for(let r=1;r<t.length;++r){let n=t[r];if(n.algo[3]==="5"){e="sha512";break}else{if(e[3]==="3")continue;n.algo[3]==="3"&&(e="sha384")}}return e}o(Phe,"getStrongestMetadata");function _he(t,e){if(t.length===1)return t;let r=0;for(let n=0;n<t.length;++n)t[n].algo===e&&(t[r++]=t[n]);return t.length=r,t}o(_he,"filterMetadataListByAlgorithm");function khe(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(t[r]!==e[r]){if(t[r]==="+"&&e[r]==="-"||t[r]==="/"&&e[r]==="_")continue;return!1}return!0}o(khe,"compareBase64Mixed");function Dhe(t){}o(Dhe,"tryUpgradeReque
Line truncated
|
||||
`);function gme(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}o(gme,"isAsciiString");function Eme(t){let e=t.length;if(e<27||e>70)return!1;for(let r=0;r<e;++r){let n=t.charCodeAt(r);if(!(n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122||n===39||n===45||n===95))return!1}return!0}o(Eme,"validateBoundary");function yme(t,e){hy(e!=="failure"&&e.essence==="multipart/form-data");let r=e.parameters.get("boundary");if(r===void 0)return"failure";let n=Buffer.from(`--${r}`,"utf8"),s=[],i={position:0};for(;t[i.position]===13&&t[i.position+1]===10;)i.position+=2;let a=t.length;for(;t[a-1]===10&&t[a-2]===13;)a-=2;for(a!==t.length&&(t=t.subarray(0,a));;){if(t.subarray(i.position,i.position+n.length).equals(n))i.position+=n.length;else return"failure";if(i.position===t.length-2&&my(t,hme,i)||i.position===t.length-4&&my(t,mme,i))return s;if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let c=Cme(t,i);if(c==="failure")return"failure";let{name:l,filename:u,contentType:d,encoding:A}=c;i.position+=2;let p;{let h=t.indexOf(n.subarray(2),i.position);if(h===-1)return"failure";p=t.subarray(i.position,h-4),i.position+=p.length,A==="base64"&&(p=Buffer.from(p.toString(),"base64"))}if(t[i.position]!==13||t[i.position+1]!==10)return"failure";i.position+=2;let f;u!==null?(d??="text/plain",gme(d)||(d=""),f=new pme([p],u,{type:d})):f=cme(Buffer.from(p)),hy(DV(l)),hy(typeof f=="string"&&DV(f)||ume(f)),s.push(dme(l,f,u))}}o(yme,"multipartFormDataParser");function Cme(t,e){let r=null,n=null,s=null,i=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:s,encoding:i};let a=Qd(c=>c!==10&&c!==13&&c!==58,t,e);if(a=_Q(a,!0,!0,c=>c===9||c===32),!lme.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,Qd(c=>c===32||c===9,t,e),ame(a)){case"content-disposition":{if(r=n=null,!my(t,fme,e)||(e.position+=17,r=LV(t,e),r===null))return"failure";if(my(t,MV,e)){let c=e.position+MV.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,n=LV(t,e),n===null))return"failure"}break}case"content-type":{let c=Qd(l=>l!==10&&l!==13,t,e);c=_Q(c,!1,!0,l=>l===9||l===32),s=OV(c);break}case"content-transfer-encoding":{let c=Qd(l=>l!==10&&l!==13,t,e);c=_Q(c,!1,!0,l=>l===9||l===32),i=OV(c);break}default:Qd(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}o(Cme,"parseMultipartFormDataHeaders");function LV(t,e){hy(t[e.position-1]===34);let r=Qd(n=>n!==10&&n!==13&&n!==34,t,e);return t[e.position]!==34?null:(e.position++,r=new TextDecoder().decode(r).replace(/%0A/ig,`
|
||||
`).replace(/%0D/ig,"\r").replace(/%22/g,'"'),r)}o(LV,"parseMultipartFormDataName");function Qd(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}o(Qd,"collectASequenceOfBytes");function _Q(t,e,r,n){let s=0,i=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;i>0&&n(t[i]);)i--;return s===0&&i===t.length-1?t:t.subarray(s,i+1)}o(_Q,"removeChars");function my(t,e,r){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[r.position+n])return!1;return!0}o(my,"bufferStartsWith");FV.exports={multipartFormDataParser:yme,validateBoundary:Eme}});var vd=m((fKe,jV)=>{"use strict";var Gf=Ie(),{ReadableStreamFrom:Ime,isBlobLike:qV,isReadableStreamLike:Bme,readableStreamClose:bme,createDeferredPromise:wme,fullyReadBody:Sme,extractMimeType:Nme,utf8DecodeBytes:VV}=Ln(),{FormData:GV}=qf(),{kState:Td}=oc(),{webidl:xme}=Er(),{Blob:Qme}=require("node:buffer"),kQ=require("node:assert"),{isErrored:zV,isDisturbed:Rme}=require("node:stream"),{isArrayBuffer:Tme}=require("node:util/types"),{serializeAMimeType:vme}=dn(),{multipartFormDataParser:Pme}=UV(),DQ;try{let t=require("node:crypto");DQ=o(e=>t.randomInt(0,e),"random")}catch{DQ=o(t=>Math.floor(Math.random(t)),"random")}var gy=new TextEncoder;function _me(){}o(_me,"noop");var JV=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,$V;JV&&($V=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!Rme(e)&&!zV(e)&&e.cancel("Response object has been garbage collected").catch(_me)}));function YV(t,e=!1){let r=null;t instanceof ReadableStream?r=t:qV(t)?r=t.stream():r=new ReadableStream({async pull(l){let u=typeof s=="string"?gy.encode(s):s;u.byteLength&&l.enqueue(u),queueMicrotask(()=>bme(l))},start(){},type:"bytes"}),kQ(Bme(r));let n=null,s=null,i=null,a=null;if(typeof t=="string")s=t,a="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)s=t.toString(),a="application/x-www-form-urlencoded;charset=UTF-8";else if(Tme(t))s=new Uint8Array(t.slice());else if(ArrayBuffer.isView(t))s=new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));else if(Gf.isFormDataLike(t)){let l=`----formdata-undici-0${`${DQ(1e11)}`.padStart(11,"0")}`,u=`--${l}\r
|
||||
Content-Disposition: form-data`;let d=o(y=>y.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),A=o(y=>y.replace(/\r?\n|\r/g,`\r
|
||||
`),"normalizeLinefeeds"),p=[],f=new Uint8Array([13,10]);i=0;let h=!1;for(let[y,E]of t)if(typeof E=="string"){let C=my.encode(u+`; name="${d(A(y))}"\r
|
||||
`),"normalizeLinefeeds"),p=[],f=new Uint8Array([13,10]);i=0;let h=!1;for(let[y,E]of t)if(typeof E=="string"){let C=gy.encode(u+`; name="${d(A(y))}"\r
|
||||
\r
|
||||
${A(E)}\r
|
||||
`);p.push(C),i+=C.byteLength}else{let C=my.encode(`${u}; name="${d(A(y))}"`+(E.name?`; filename="${d(E.name)}"`:"")+`\r
|
||||
`);p.push(C),i+=C.byteLength}else{let C=gy.encode(`${u}; name="${d(A(y))}"`+(E.name?`; filename="${d(E.name)}"`:"")+`\r
|
||||
Content-Type: ${E.type||"application/octet-stream"}\r
|
||||
\r
|
||||
`);p.push(C,E,f),typeof E.size=="number"?i+=C.byteLength+E.size+f.byteLength:h=!0}let g=my.encode(`--${l}--\r
|
||||
`);p.push(g),i+=g.byteLength,h&&(i=null),s=t,n=o(async function*(){for(let y of p)y.stream?yield*y.stream():yield y},"action"),a=`multipart/form-data; boundary=${l}`}else if(FV(t))s=t,i=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Uf.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:yme(t)}if((typeof s=="string"||Uf.isBuffer(s))&&(i=Buffer.byteLength(s)),n!=null){let l;r=new ReadableStream({async start(){l=n(t)[Symbol.asyncIterator]()},async pull(u){let{value:d,done:A}=await l.next();if(A)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!HV(r)){let p=new Uint8Array(d);p.byteLength&&u.enqueue(p)}return u.desiredSize>0},async cancel(u){await l.return()},type:"bytes"})}return[{stream:r,source:s,length:i},a]}o(JV,"extractBody");function Pme(t,e=!1){return t instanceof ReadableStream&&(kQ(!Uf.isDisturbed(t),"The body has already been consumed."),kQ(!t.locked,"The stream is locked.")),JV(t,e)}o(Pme,"safelyExtractBody");function _me(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}o(_me,"cloneBody");function kme(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(kme,"throwIfAborted");function Dme(t){return{blob(){return Rd(this,r=>{let n=qV(this);return n===null?n="":n&&(n=Rme(n)),new Nme([r],{type:n})},t)},arrayBuffer(){return Rd(this,r=>new Uint8Array(r).buffer,t)},text(){return Rd(this,GV,t)},json(){return Rd(this,Mme,t)},formData(){return Rd(this,r=>{let n=qV(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=Tme(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new UV;return i[Td]=s,i}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),i=new UV;for(let[a,c]of s)i.append(a,c);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return Rd(this,r=>new Uint8Array(r),t)}}}o(Dme,"bodyMixinMethods");function Ome(t){Object.assign(t.prototype,Dme(t))}o(Ome,"mixinBody");async function Rd(t,e,r){if(Sme.brandCheck(t,r),$V(t))throw new TypeError("Body is unusable: Body has already been read");kme(t[Td]);let n=Bme(),s=o(a=>n.reject(a),"errorSteps"),i=o(a=>{try{n.resolve(e(a))}catch(c){s(c)}},"successSteps");return t[Td].body==null?(i(Buffer.allocUnsafe(0)),n.promise):(await bme(t[Td].body,i,s),n.promise)}o(Rd,"consumeBody");function $V(t){let e=t[Td].body;return e!=null&&(e.stream.locked||Uf.isDisturbed(e.stream))}o($V,"bodyUnusable");function Mme(t){return JSON.parse(GV(t))}o(Mme,"parseJSONFromBytes");function qV(t){let e=t[Td].headersList,r=wme(e);return r==="failure"?null:r}o(qV,"bodyMimeType");YV.exports={extractBody:JV,safelyExtractBody:Pme,cloneBody:_me,mixinBody:Ome,streamRegistry:zV,hasFinalizationRegistry:VV,bodyUnusable:$V}});var uz=m((pKe,lz)=>{"use strict";var X=require("node:assert"),te=Ie(),{channels:WV}=Ed(),OQ=gQ(),{RequestContentLengthMismatchError:Nl,ResponseContentLengthMismatchError:jV,RequestAbortedError:sz,HeadersTimeoutError:Lme,HeadersOverflowError:Fme,SocketError:Pd,InformationalError:_d,BodyTimeoutError:Ume,HTTPParserError:qme,ResponseExceededMaxSizeError:Gme}=Pe(),{kUrl:iz,kReset:An,kClient:Cy,kParser:nt,kBlocking:Hf,kRunning:Vt,kPending:oz,kSize:KV,kWriting:ac,kQueue:ni,kNoRef:qf,kKeepAliveDefaultTimeout:Hme,kHostHeader:Vme,kPendingIdx:zme,kRunningIdx:ms,kError:Gr,kPipelining:Iy,kSocket:Ql,kKeepAliveTimeoutValue:by,kMaxHeadersSize:MQ,kKeepAliveMaxTimeout:Jme,kKeepAliveTimeoutThreshold:$me,kHeadersTimeout:Yme,kBodyTimeout:Wme,kStrictContentLength:UQ,kMaxRequests:XV,kCounter:jme,kMaxResponseSize:Kme,kOnError:ZV,kResume:ca,kHTTPContext:az}=dt(),Fn=zH(),ez=Buffer.alloc(0),gy=Buffer[Symbol.species],Ey=te.addListener,Xme=te.removeAllListeners,Rl=Symbol("kIdleSocketValidation"),xl=Symbol("kIdleSocketValidationTimeout"),VQ=Symbol("kSocketUsed"),LQ;async function Zme(){let t=process.env.JEST_WORKER_ID?CQ():void 0,e;try{e=await WebAssembly.compile(YH())}catch{e=await WebAssembly.compile(t||CQ())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:o((r,n,s)=>0,"wasm_on_url"),wasm_on_status:o((r,n,s)=>{X(bt.ptr===r);let i=n-Li+Mi.byteOffset;return bt.onStatus(new gy(Mi.buffer,i,s))||0},"wasm_on_status"),wasm_on_message_begin:o(r=>(X(bt.ptr===r),bt.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:o((r,n,s)=>{X(bt.ptr===r);let i=n-Li+Mi.byteOffset;return bt.onHeaderField(new gy(Mi.buffer,i,s))||0},"wasm_on_header_field"),wasm_on_header_value:o((r,n,s)=>{X(bt.ptr===r);let i=n-Li+Mi.byteOffset;return bt.onHeaderValue(new gy(Mi.buffer,i,s))||0},"wasm_on_header_value"),wasm_on_headers_complete:o((r,n,s,i)=>(X(bt.ptr===r),bt.onHeadersComplete(n,!!s,!!i)||0),"wasm_on_headers_complete"),wasm_on_body:o((r,n,s)=>{X(bt.ptr===r);let i=n-Li+Mi.byteOffset;return bt.onBody(new gy(Mi.buffer,i,
Line truncated
|
||||
`);p.push(C,E,f),typeof E.size=="number"?i+=C.byteLength+E.size+f.byteLength:h=!0}let g=gy.encode(`--${l}--\r
|
||||
`);p.push(g),i+=g.byteLength,h&&(i=null),s=t,n=o(async function*(){for(let y of p)y.stream?yield*y.stream():yield y},"action"),a=`multipart/form-data; boundary=${l}`}else if(qV(t))s=t,i=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Gf.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:Ime(t)}if((typeof s=="string"||Gf.isBuffer(s))&&(i=Buffer.byteLength(s)),n!=null){let l;r=new ReadableStream({async start(){l=n(t)[Symbol.asyncIterator]()},async pull(u){let{value:d,done:A}=await l.next();if(A)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!zV(r)){let p=new Uint8Array(d);p.byteLength&&u.enqueue(p)}return u.desiredSize>0},async cancel(u){await l.return()},type:"bytes"})}return[{stream:r,source:s,length:i},a]}o(YV,"extractBody");function kme(t,e=!1){return t instanceof ReadableStream&&(kQ(!Gf.isDisturbed(t),"The body has already been consumed."),kQ(!t.locked,"The stream is locked.")),YV(t,e)}o(kme,"safelyExtractBody");function Dme(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}o(Dme,"cloneBody");function Ome(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}o(Ome,"throwIfAborted");function Mme(t){return{blob(){return Rd(this,r=>{let n=HV(this);return n===null?n="":n&&(n=vme(n)),new Qme([r],{type:n})},t)},arrayBuffer(){return Rd(this,r=>new Uint8Array(r).buffer,t)},text(){return Rd(this,VV,t)},json(){return Rd(this,Fme,t)},formData(){return Rd(this,r=>{let n=HV(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=Pme(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let i=new GV;return i[Td]=s,i}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),i=new GV;for(let[a,c]of s)i.append(a,c);return i}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return Rd(this,r=>new Uint8Array(r),t)}}}o(Mme,"bodyMixinMethods");function Lme(t){Object.assign(t.prototype,Mme(t))}o(Lme,"mixinBody");async function Rd(t,e,r){if(xme.brandCheck(t,r),WV(t))throw new TypeError("Body is unusable: Body has already been read");Ome(t[Td]);let n=wme(),s=o(a=>n.reject(a),"errorSteps"),i=o(a=>{try{n.resolve(e(a))}catch(c){s(c)}},"successSteps");return t[Td].body==null?(i(Buffer.allocUnsafe(0)),n.promise):(await Sme(t[Td].body,i,s),n.promise)}o(Rd,"consumeBody");function WV(t){let e=t[Td].body;return e!=null&&(e.stream.locked||Gf.isDisturbed(e.stream))}o(WV,"bodyUnusable");function Fme(t){return JSON.parse(VV(t))}o(Fme,"parseJSONFromBytes");function HV(t){let e=t[Td].headersList,r=Nme(e);return r==="failure"?null:r}o(HV,"bodyMimeType");jV.exports={extractBody:YV,safelyExtractBody:kme,cloneBody:Dme,mixinBody:Lme,streamRegistry:$V,hasFinalizationRegistry:JV,bodyUnusable:WV}});var Az=m((mKe,dz)=>{"use strict";var X=require("node:assert"),te=Ie(),{channels:KV}=Ed(),OQ=gQ(),{RequestContentLengthMismatchError:Nl,ResponseContentLengthMismatchError:XV,RequestAbortedError:oz,InvalidArgumentError:Ume,HeadersTimeoutError:qme,HeadersOverflowError:Gme,SocketError:Pd,InformationalError:_d,BodyTimeoutError:Hme,HTTPParserError:Vme,ResponseExceededMaxSizeError:zme}=Pe(),{kUrl:az,kReset:An,kClient:Iy,kParser:nt,kBlocking:zf,kRunning:Vt,kPending:cz,kSize:ZV,kWriting:ac,kQueue:ni,kNoRef:Hf,kKeepAliveDefaultTimeout:Jme,kHostHeader:$me,kPendingIdx:Yme,kRunningIdx:ms,kError:Gr,kPipelining:By,kSocket:Ql,kKeepAliveTimeoutValue:wy,kMaxHeadersSize:MQ,kKeepAliveMaxTimeout:Wme,kKeepAliveTimeoutThreshold:jme,kHeadersTimeout:Kme,kBodyTimeout:Xme,kStrictContentLength:UQ,kMaxRequests:ez,kCounter:Zme,kMaxResponseSize:ege,kOnError:tz,kResume:ca,kHTTPContext:lz}=dt(),Fn=$H(),rz=Buffer.alloc(0),Ey=Buffer[Symbol.species],yy=te.addListener,tge=te.removeAllListeners,Rl=Symbol("kIdleSocketValidation"),xl=Symbol("kIdleSocketValidationTimeout"),VQ=Symbol("kSocketUsed"),LQ;async function rge(){let t=process.env.JEST_WORKER_ID?CQ():void 0,e;try{e=await WebAssembly.compile(jH())}catch{e=await WebAssembly.compile(t||CQ())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:o((r,n,s)=>0,"wasm_on_url"),wasm_on_status:o((r,n,s)=>{X(bt.ptr===r);let i=n-Li+Mi.byteOffset;return bt.onStatus(new Ey(Mi.buffer,i,s))||0},"wasm_on_status"),wasm_on_message_begin:o(r=>(X(bt.ptr===r),bt.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:o((r,n,s)=>{X(bt.ptr===r);let i=n-Li+Mi.byteOffset;return bt.onHeaderField(new Ey(Mi.buffer,i,s))||0},"wasm_on_header_field"),wasm_on_header_value:o((r,n,s)=>{X(bt.ptr===r);let i=n-Li+Mi.byteOffset;return bt.onHeaderValue(new Ey(Mi.buffer,i,s))||0},"wasm_on_header_value"),wasm_on_headers_complete:o((r,n,s,i)=>(X(bt.ptr===r),bt.onHeadersComplete(n,!!s,!!i)||0),"wasm_on_headers_complete"),wasm_on_body:o((r,n,s)=>{X(bt.ptr===r);let i=n-Li+Mi.byteOffset;return bt.o
Line truncated
|
||||
`;if(typeof s=="string"?g+=`host: ${s}\r
|
||||
`:g+=t[Vme],i?g+=`connection: upgrade\r
|
||||
`:g+=t[$me],i?g+=`connection: upgrade\r
|
||||
upgrade: ${i}\r
|
||||
`:t[Iy]&&!f[An]?g+=`connection: keep-alive\r
|
||||
`:t[By]&&!f[An]?g+=`connection: keep-alive\r
|
||||
`:g+=`connection: close\r
|
||||
`,Array.isArray(u))for(let y=0;y<u.length;y+=2){let E=u[y+0],C=u[y+1];if(Array.isArray(C))for(let I=0;I<C.length;I++)g+=`${E}: ${C[I]}\r
|
||||
`;else g+=`${E}: ${C}\r
|
||||
`}return WV.sendHeaders.hasSubscribers&&WV.sendHeaders.publish({request:e,headers:g,socket:f}),!l||p===0?rz(h,null,t,e,f,d,g,A):te.isBuffer(l)?rz(h,l,t,e,f,d,g,A):te.isBlobLike(l)?typeof l.stream=="function"?nz(h,l.stream(),t,e,f,d,g,A):age(h,l,t,e,f,d,g,A):te.isStream(l)?oge(h,l,t,e,f,d,g,A):te.isIterable(l)?nz(h,l,t,e,f,d,g,A):X(!1),!0}o(ige,"writeH1");function oge(t,e,r,n,s,i,a,c){X(i!==0||r[Vt]===0,"stream body cannot be pipelined");let l=!1,u=new wy({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:c,header:a}),d=o(function(h){if(!l)try{!u.write(h)&&this.pause&&this.pause()}catch(g){te.destroy(this,g)}},"onData"),A=o(function(){l||e.resume&&e.resume()},"onDrain"),p=o(function(){if(queueMicrotask(()=>{e.removeListener("error",f)}),!l){let h=new sz;queueMicrotask(()=>f(h))}},"onClose"),f=o(function(h){if(!l){if(l=!0,X(s.destroyed||s[ac]&&r[Vt]<=1),s.off("drain",A).off("error",f),e.removeListener("data",d).removeListener("end",f).removeListener("close",p),!h)try{u.end()}catch(g){h=g}u.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?te.destroy(e,h):te.destroy(e)}},"onFinished");e.on("data",d).on("end",f).on("error",f).on("close",p),e.resume&&e.resume(),s.on("drain",A).on("error",f),e.errorEmitted??e.errored?setImmediate(()=>f(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>f(null)),(e.closeEmitted??e.closed)&&setImmediate(p)}o(oge,"writeStream");function rz(t,e,r,n,s,i,a,c){try{e?te.isBuffer(e)&&(X(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${a}content-length: ${i}\r
|
||||
`}return KV.sendHeaders.hasSubscribers&&KV.sendHeaders.publish({request:e,headers:g,socket:f}),!l||p===0?sz(h,null,t,e,f,d,g,A):te.isBuffer(l)?sz(h,l,t,e,f,d,g,A):te.isBlobLike(l)?typeof l.stream=="function"?iz(h,l.stream(),t,e,f,d,g,A):uge(h,l,t,e,f,d,g,A):te.isStream(l)?lge(h,l,t,e,f,d,g,A):te.isIterable(l)?iz(h,l,t,e,f,d,g,A):X(!1),!0}o(cge,"writeH1");function lge(t,e,r,n,s,i,a,c){X(i!==0||r[Vt]===0,"stream body cannot be pipelined");let l=!1,u=new Sy({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:c,header:a}),d=o(function(h){if(!l)try{!u.write(h)&&this.pause&&this.pause()}catch(g){te.destroy(this,g)}},"onData"),A=o(function(){l||e.resume&&e.resume()},"onDrain"),p=o(function(){if(queueMicrotask(()=>{e.removeListener("error",f)}),!l){let h=new oz;queueMicrotask(()=>f(h))}},"onClose"),f=o(function(h){if(!l){if(l=!0,X(s.destroyed||s[ac]&&r[Vt]<=1),s.off("drain",A).off("error",f),e.removeListener("data",d).removeListener("end",f).removeListener("close",p),!h)try{u.end()}catch(g){h=g}u.destroy(h),h&&(h.code!=="UND_ERR_INFO"||h.message!=="reset")?te.destroy(e,h):te.destroy(e)}},"onFinished");e.on("data",d).on("end",f).on("error",f).on("close",p),e.resume&&e.resume(),s.on("drain",A).on("error",f),e.errorEmitted??e.errored?setImmediate(()=>f(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>f(null)),(e.closeEmitted??e.closed)&&setImmediate(p)}o(lge,"writeStream");function sz(t,e,r,n,s,i,a,c){try{e?te.isBuffer(e)&&(X(i===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${a}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(e),s.uncork(),n.onBodySent(e),!c&&n.reset!==!1&&(s[An]=!0)):i===0?s.write(`${a}content-length: 0\r
|
||||
\r
|
||||
`,"latin1"):(X(i===null,"no body must not have content length"),s.write(`${a}\r
|
||||
`,"latin1")),n.onRequestSent(),r[ca]()}catch(l){t(l)}}o(rz,"writeBuffer");async function age(t,e,r,n,s,i,a,c){X(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new Nl;let l=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${a}content-length: ${i}\r
|
||||
`,"latin1")),n.onRequestSent(),r[ca]()}catch(l){t(l)}}o(sz,"writeBuffer");async function uge(t,e,r,n,s,i,a,c){X(i===e.size,"blob body must have content length");try{if(i!=null&&i!==e.size)throw new Nl;let l=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${a}content-length: ${i}\r
|
||||
\r
|
||||
`,"latin1"),s.write(l),s.uncork(),n.onBodySent(l),n.onRequestSent(),!c&&n.reset!==!1&&(s[An]=!0),r[ca]()}catch(l){t(l)}}o(age,"writeBlob");async function nz(t,e,r,n,s,i,a,c){X(i!==0||r[Vt]===0,"iterator body cannot be pipelined");let l=null;function u(){if(l){let p=l;l=null,p()}}o(u,"onDrain");let d=o(()=>new Promise((p,f)=>{X(l===null),s[Gr]?f(s[Gr]):l=p}),"waitForDrain");s.on("close",u).on("drain",u);let A=new wy({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:c,header:a});try{for await(let p of e){if(s[Gr])throw s[Gr];A.write(p)||await d()}A.end()}catch(p){A.destroy(p)}finally{s.off("close",u).off("drain",u)}}o(nz,"writeIterable");var wy=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[ac]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:a,expectsPayload:c,header:l}=this;if(r[Gr])throw r[Gr];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(s!==null&&a+u>s){if(i[UQ])throw new Nl;process.emitWarning(new Nl)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[An]=!0),s===null?r.write(`${l}transfer-encoding: chunked\r
|
||||
`,"latin1"),s.write(l),s.uncork(),n.onBodySent(l),n.onRequestSent(),!c&&n.reset!==!1&&(s[An]=!0),r[ca]()}catch(l){t(l)}}o(uge,"writeBlob");async function iz(t,e,r,n,s,i,a,c){X(i!==0||r[Vt]===0,"iterator body cannot be pipelined");let l=null;function u(){if(l){let p=l;l=null,p()}}o(u,"onDrain");let d=o(()=>new Promise((p,f)=>{X(l===null),s[Gr]?f(s[Gr]):l=p}),"waitForDrain");s.on("close",u).on("drain",u);let A=new Sy({abort:t,socket:s,request:n,contentLength:i,client:r,expectsPayload:c,header:a});try{for await(let p of e){if(s[Gr])throw s[Gr];A.write(p)||await d()}A.end()}catch(p){A.destroy(p)}finally{s.off("close",u).off("drain",u)}}o(iz,"writeIterable");var Sy=class{static{o(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:s,client:i,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=s,this.client=i,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[ac]=!0}write(e){let{socket:r,request:n,contentLength:s,client:i,bytesWritten:a,expectsPayload:c,header:l}=this;if(r[Gr])throw r[Gr];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(s!==null&&a+u>s){if(i[UQ])throw new Nl;process.emitWarning(new Nl)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[An]=!0),s===null?r.write(`${l}transfer-encoding: chunked\r
|
||||
`,"latin1"):r.write(`${l}content-length: ${s}\r
|
||||
\r
|
||||
`,"latin1")),s===null&&r.write(`\r
|
||||
@@ -37,45 +37,45 @@ ${u.toString(16)}\r
|
||||
`,"latin1"):r===null&&e.write(`\r
|
||||
0\r
|
||||
\r
|
||||
`,"latin1"),r!==null&&s!==r){if(n[UQ])throw new Nl;process.emitWarning(new Nl)}e[nt].timeout&&e[nt].timeoutType===kd&&e[nt].timeout.refresh&&e[nt].timeout.refresh(),n[ca]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[ac]=!1,e&&(X(n[Vt]<=1,"pipeline should only contain this request"),s(e))}};lz.exports=tge});var Ez=m((hKe,gz)=>{"use strict";var gs=require("node:assert"),{pipeline:cge}=require("node:stream"),Se=Ie(),{RequestContentLengthMismatchError:zQ,RequestAbortedError:dz,SocketError:Vf,InformationalError:JQ}=Pe(),{kUrl:Sy,kReset:xy,kClient:Dd,kRunning:Qy,kPending:lge,kQueue:cc,kPendingIdx:$Q,kRunningIdx:si,kError:oi,kSocket:lr,kStrictContentLength:uge,kOnError:YQ,kMaxConcurrentStreams:mz,kHTTP2Session:ii,kResume:lc,kSize:dge,kHTTPContext:Age}=dt(),la=Symbol("open streams"),Az,pz=!1,Ny;try{Ny=require("node:http2")}catch{Ny={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:pge,HTTP2_HEADER_METHOD:fge,HTTP2_HEADER_PATH:hge,HTTP2_HEADER_SCHEME:mge,HTTP2_HEADER_CONTENT_LENGTH:gge,HTTP2_HEADER_EXPECT:Ege,HTTP2_HEADER_STATUS:yge}}=Ny;function Cge(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}o(Cge,"parseH2Headers");async function Ige(t,e){t[lr]=e,pz||(pz=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=Ny.connect(t[Sy],{createConnection:o(()=>e,"createConnection"),peerMaxConcurrentStreams:t[mz]});r[la]=0,r[Dd]=t,r[lr]=e,Se.addListener(r,"error",bge),Se.addListener(r,"frameError",wge),Se.addListener(r,"end",Sge),Se.addListener(r,"goaway",Nge),Se.addListener(r,"close",function(){let{[Dd]:s}=this,{[lr]:i}=s,a=this[lr][oi]||this[oi]||new Vf("closed",Se.getSocketInfo(i));if(s[ii]=null,s.destroyed){gs(s[lge]===0);let c=s[cc].splice(s[si]);for(let l=0;l<c.length;l++){let u=c[l];Se.errorRequest(s,u,a)}}}),r.unref(),t[ii]=r,e[ii]=r,Se.addListener(e,"error",function(s){gs(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[oi]=s,this[Dd][YQ](s)}),Se.addListener(e,"end",function(){Se.destroy(this,new Vf("other side closed",Se.getSocketInfo(this)))}),Se.addListener(e,"close",function(){let s=this[oi]||new Vf("closed",Se.getSocketInfo(this));t[lr]=null,this[ii]!=null&&this[ii].destroy(s),t[$Q]=t[si],gs(t[Qy]===0),t.emit("disconnect",t[Sy],[t],s),t[lc]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return Qge(t,...s)},resume(){Bge(t)},destroy(s,i){n?queueMicrotask(i):e.destroy(s).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}o(Ige,"connectH2");function Bge(t){let e=t[lr];e?.destroyed===!1&&(t[dge]===0&&t[mz]===0?(e.unref(),t[ii].unref()):(e.ref(),t[ii].ref()))}o(Bge,"resumeH2");function bge(t){gs(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[lr][oi]=t,this[Dd][YQ](t)}o(bge,"onHttp2SessionError");function wge(t,e,r){if(r===0){let n=new JQ(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[lr][oi]=n,this[Dd][YQ](n)}}o(wge,"onHttp2FrameError");function Sge(){let t=new Vf("other side closed",Se.getSocketInfo(this[lr]));this.destroy(t),Se.destroy(this[lr],t)}o(Sge,"onHttp2SessionEnd");function Nge(t){let e=this[oi]||new Vf(`HTTP/2: "GOAWAY" frame received with code ${t}`,Se.getSocketInfo(this)),r=this[Dd];if(r[lr]=null,r[Age]=null,this[ii]!=null&&(this[ii].destroy(e),this[ii]=null),Se.destroy(this[lr],e),r[si]<r[cc].length){let n=r[cc][r[si]];r[cc][r[si]++]=null,Se.errorRequest(r,n,e),r[$Q]=r[si]}gs(r[Qy]===0),r.emit("disconnect",r[Sy],[r],e),r[lc]()}o(Nge,"onHTTP2GoAway");function xge(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(xge,"shouldSendContentLength");function Qge(t,e){let r=t[ii],{method:n,path:s,host:i,upgrade:a,expectContinue:c,signal:l,headers:u}=e,{body:d}=e;if(a)return Se.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let A={};for(let B=0;B<u.length;B+=2){let N=u[B+0],Q=u[B+1];if(Array.isArray(Q))for(let D=0;D<Q.length;D++)A[N]?A[N]+=`,${Q[D]}`:A[N]=Q[D];else A[N]=Q}let p,{hostname:f,port:h}=t[Sy];A[pge]=i||`${f}${h?`:${h}`:""}`,A[fge]=n;let g=o(B=>{e.aborted||e.completed||(B=B||new dz,Se.errorRequest(t,e,B),p!=null&&Se.destroy(p,B),Se.destroy(d,B),t[cc][t[si]++]=null,t[lc]())},"abort");try{e.onConnect(g)}catch(B){Se.errorRequest(t,e,B)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),p=r.request(A,{endStream:!1,signal:l}),p.id&&!p.pending?(e.onUpgrade(null,null,p),++r[la],t[cc][t[si]++]=null):p.once("ready",()=>{e.onUpgrade(null,null,p),++r[la],t[cc][t[si]++]=null}),p.once("close",()=>{r[la]-=1,r[la]===0&&r.unref()}),!0;A[hge]=s,A[mge]="https";let y=n==="PUT"||n==="POST"||n==="PATCH";d&&typeof d.read=="function"&&d.read(0);let E=Se.bodyLength(d);if(Se.isFormDataLike(d)){Az??=vd().extractBody;let[B,N]=Az(d);A["content-type"]=N,d=B.stream,E=B.length}if(E==null&&(E=e.contentLength),(E===0||!y)&&(E=null),xge(n)&&E>0&&e.contentLength!=null&&e.contentLength!==E){if(t[uge])return Se.errorRequest(t,e,n
Line truncated
|
||||
`,this[eEe]=l??3e5,this[Zge]=s??3e5,this[tEe]=C??!0,this[rEe]=B,this[XQ]=Q,this[dc]=null,this[aEe]=ue>-1?ue:-1,this[lEe]=qe??100,this[kt]=null,this[ai]=[],this[da]=0,this[ci]=0,this[Yf]=de=>eR(this,de),this[cEe]=de=>Tz(this,de)}get pipelining(){return this[Py]}set pipelining(e){this[Py]=e,this[Yf](!0)}get[Kf](){return this[ai].length-this[ci]}get[jf](){return this[ci]-this[da]}get[Wf](){return this[ai].length-this[da]}get[Jge](){return!!this[kt]&&!this[Md]&&!this[kt].destroyed}get[KQ](){return!!(this[kt]?.busy(null)||this[Wf]>=(Rz(this)||1)||this[Kf]>0)}[zge](e){vz(this),this.once("connect",e)}[oEe](e,r){let n=e.origin||this[Ui].origin,s=new Fge(n,e,r);return this[ai].push(s),this[vl]||(Tl.bodyLength(s.body)==null&&Tl.isIterable(s.body)?(this[vl]=1,queueMicrotask(()=>eR(this))):this[Yf](!0)),this[vl]&&this[Ac]!==2&&this[KQ]&&(this[Ac]=2),this[Ac]<2}async[sEe](){return new Promise(e=>{this[Wf]?this[dc]=e:e(null)})}async[iEe](e){return new Promise(r=>{let n=this[ai].splice(this[ci]);for(let i=0;i<n.length;i++){let a=n[i];Tl.errorRequest(this,a,e)}let s=o(()=>{this[dc]&&(this[dc](),this[dc]=null),r(null)},"callback");this[kt]?(this[kt].destroy(e,s),this[kt]=null):queueMicrotask(s),this[Yf]()})}},AEe=vy();function Tz(t,e){if(t[jf]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){ua(t[ci]===t[da]);let r=t[ai].splice(t[da]);for(let n=0;n<r.length;n++){let s=r[n];Tl.errorRequest(t,s,e)}ua(t[Wf]===0)}}o(Tz,"onError");async function vz(t){ua(!t[Md]),ua(!t[kt]);let{host:e,hostname:r,protocol:n,port:s}=t[Ui];if(r[0]==="["){let i=r.indexOf("]");ua(i!==-1);let a=r.substring(1,i);ua(Qz.isIP(a)),r=a}t[Md]=!0,Od.beforeConnect.hasSubscribers&&Od.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[kt]?.version,servername:t[uc],localAddress:t[$f]},connector:t[Jf]});try{let i=await new Promise((a,c)=>{t[Jf]({host:e,hostname:r,protocol:n,port:s,servername:t[uc],localAddress:t[$f]},(l,u)=>{l?c(l):a(u)})});if(t.destroyed){Tl.destroy(i.on("error",Nz),new Gge);return}ua(i);try{t[kt]=i.alpnProtocol==="h2"?await dEe(t,i):await uEe(t,i)}catch(a){throw i.destroy().on("error",Nz),a}t[Md]=!1,i[nEe]=0,i[XQ]=t[XQ],i[Vge]=t,i[Yge]=null,Od.connected.hasSubscribers&&Od.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[kt]?.version,servername:t[uc],localAddress:t[$f]},connector:t[Jf],socket:i}),t.emit("connect",t[Ui],[t])}catch(i){if(t.destroyed)return;if(t[Md]=!1,Od.connectError.hasSubscribers&&Od.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[kt]?.version,servername:t[uc],localAddress:t[$f]},connector:t[Jf],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(ua(t[jf]===0);t[Kf]>0&&t[ai][t[ci]].servername===t[uc];){let a=t[ai][t[ci]++];Tl.errorRequest(t,a,i)}else Tz(t,i);t.emit("connectionError",t[Ui],[t],i)}t[Yf]()}o(vz,"connect");function xz(t){t[Ac]=0,t.emit("drain",t[Ui],[t])}o(xz,"emitDrain");function eR(t,e){t[vl]!==2&&(t[vl]=2,pEe(t,e),t[vl]=0,t[da]>256&&(t[ai].splice(0,t[da]),t[ci]-=t[da],t[da]=0))}o(eR,"resume");function pEe(t,e){for(;;){if(t.destroyed){ua(t[Kf]===0);return}if(t[dc]&&!t[Wf]){t[dc](),t[dc]=null;return}if(t[kt]&&t[kt].resume(),t[KQ])t[Ac]=2;else if(t[Ac]===2){e?(t[Ac]=1,queueMicrotask(()=>xz(t))):xz(t);continue}if(t[Kf]===0||t[jf]>=(Rz(t)||1))return;let r=t[ai][t[ci]];if(t[Ui].protocol==="https:"&&t[uc]!==r.servername){if(t[jf]>0)return;t[uc]=r.servername,t[kt]?.destroy(new qge("servername changed"),()=>{t[kt]=null,eR(t)})}if(t[Md])return;if(!t[kt]){vz(t);return}if(t[kt].destroyed||t[kt].busy(r))return;!r.aborted&&t[kt].write(r)?t[ci]++:t[ai].splice(t[ci],1)}}o(pEe,"_resume");Pz.exports=ZQ});var tR=m((wKe,_z)=>{"use strict";var _y=class{static{o(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};_z.exports=class{static{o(this,"FixedQueue")}constructor(){this.head=this.tail=new _y}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new _y),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var Dz=m((NKe,kz)=>{var{kFree:fEe,kConnected:hEe,kPending:mEe,kQueued:gEe,kRunning:EEe,kSize:yEe}=dt(),Pl=Symbol("pool"),rR=class{static{o(this,"PoolStats")}constructor(e){this[Pl]=e}get connected(){return this[Pl][hEe]}get free(){return this[Pl][fEe]}get pending(){return this[Pl][mEe]}get queued(){return this[Pl][gEe]}get running(){return this[Pl][EEe]}get size(){return this[Pl][yEe]}};kz.exports=rR});var cR=m((QKe,zz)=>{"use strict";var CEe=Bd(),IEe=tR(),{kConnected:nR,kSize:Oz,kRunning:Mz,kPending:Lz,kQueued:Xf,kBusy:BEe,kFree:bEe,kUrl:wEe,kClose:SEe,kDestroy:NEe,kDispatch:xEe}=dt(),QEe=Dz(),pn=Symbol("cl
Line truncated
|
||||
`,"latin1"),r!==null&&s!==r){if(n[UQ])throw new Nl;process.emitWarning(new Nl)}e[nt].timeout&&e[nt].timeoutType===kd&&e[nt].timeout.refresh&&e[nt].timeout.refresh(),n[ca]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[ac]=!1,e&&(X(n[Vt]<=1,"pipeline should only contain this request"),s(e))}};dz.exports=sge});var Cz=m((EKe,yz)=>{"use strict";var gs=require("node:assert"),{pipeline:dge}=require("node:stream"),Se=Ie(),{RequestContentLengthMismatchError:zQ,RequestAbortedError:pz,SocketError:Jf,InformationalError:JQ}=Pe(),{kUrl:Ny,kReset:Qy,kClient:Dd,kRunning:Ry,kPending:Age,kQueue:cc,kPendingIdx:$Q,kRunningIdx:si,kError:oi,kSocket:lr,kStrictContentLength:pge,kOnError:YQ,kMaxConcurrentStreams:Ez,kHTTP2Session:ii,kResume:lc,kSize:fge,kHTTPContext:hge}=dt(),la=Symbol("open streams"),fz,hz=!1,xy;try{xy=require("node:http2")}catch{xy={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:mge,HTTP2_HEADER_METHOD:gge,HTTP2_HEADER_PATH:Ege,HTTP2_HEADER_SCHEME:yge,HTTP2_HEADER_CONTENT_LENGTH:Cge,HTTP2_HEADER_EXPECT:Ige,HTTP2_HEADER_STATUS:Bge}}=xy;function bge(t){let e=[];for(let[r,n]of Object.entries(t))if(Array.isArray(n))for(let s of n)e.push(Buffer.from(r),Buffer.from(s));else e.push(Buffer.from(r),Buffer.from(n));return e}o(bge,"parseH2Headers");async function wge(t,e){t[lr]=e,hz||(hz=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=xy.connect(t[Ny],{createConnection:o(()=>e,"createConnection"),peerMaxConcurrentStreams:t[Ez]});r[la]=0,r[Dd]=t,r[lr]=e,Se.addListener(r,"error",Nge),Se.addListener(r,"frameError",xge),Se.addListener(r,"end",Qge),Se.addListener(r,"goaway",Rge),Se.addListener(r,"close",function(){let{[Dd]:s}=this,{[lr]:i}=s,a=this[lr][oi]||this[oi]||new Jf("closed",Se.getSocketInfo(i));if(s[ii]=null,s.destroyed){gs(s[Age]===0);let c=s[cc].splice(s[si]);for(let l=0;l<c.length;l++){let u=c[l];Se.errorRequest(s,u,a)}}}),r.unref(),t[ii]=r,e[ii]=r,Se.addListener(e,"error",function(s){gs(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[oi]=s,this[Dd][YQ](s)}),Se.addListener(e,"end",function(){Se.destroy(this,new Jf("other side closed",Se.getSocketInfo(this)))}),Se.addListener(e,"close",function(){let s=this[oi]||new Jf("closed",Se.getSocketInfo(this));t[lr]=null,this[ii]!=null&&this[ii].destroy(s),t[$Q]=t[si],gs(t[Ry]===0),t.emit("disconnect",t[Ny],[t],s),t[lc]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return vge(t,...s)},resume(){Sge(t)},destroy(s,i){n?queueMicrotask(i):e.destroy(s).on("close",i)},get destroyed(){return e.destroyed},busy(){return!1}}}o(wge,"connectH2");function Sge(t){let e=t[lr];e?.destroyed===!1&&(t[fge]===0&&t[Ez]===0?(e.unref(),t[ii].unref()):(e.ref(),t[ii].ref()))}o(Sge,"resumeH2");function Nge(t){gs(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[lr][oi]=t,this[Dd][YQ](t)}o(Nge,"onHttp2SessionError");function xge(t,e,r){if(r===0){let n=new JQ(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[lr][oi]=n,this[Dd][YQ](n)}}o(xge,"onHttp2FrameError");function Qge(){let t=new Jf("other side closed",Se.getSocketInfo(this[lr]));this.destroy(t),Se.destroy(this[lr],t)}o(Qge,"onHttp2SessionEnd");function Rge(t){let e=this[oi]||new Jf(`HTTP/2: "GOAWAY" frame received with code ${t}`,Se.getSocketInfo(this)),r=this[Dd];if(r[lr]=null,r[hge]=null,this[ii]!=null&&(this[ii].destroy(e),this[ii]=null),Se.destroy(this[lr],e),r[si]<r[cc].length){let n=r[cc][r[si]];r[cc][r[si]++]=null,Se.errorRequest(r,n,e),r[$Q]=r[si]}gs(r[Ry]===0),r.emit("disconnect",r[Ny],[r],e),r[lc]()}o(Rge,"onHTTP2GoAway");function Tge(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}o(Tge,"shouldSendContentLength");function vge(t,e){let r=t[ii],{method:n,path:s,host:i,upgrade:a,expectContinue:c,signal:l,headers:u}=e,{body:d}=e;if(a)return Se.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let A={};for(let B=0;B<u.length;B+=2){let N=u[B+0],Q=u[B+1];if(Array.isArray(Q))for(let D=0;D<Q.length;D++)A[N]?A[N]+=`,${Q[D]}`:A[N]=Q[D];else A[N]=Q}let p,{hostname:f,port:h}=t[Ny];A[mge]=i||`${f}${h?`:${h}`:""}`,A[gge]=n;let g=o(B=>{e.aborted||e.completed||(B=B||new pz,Se.errorRequest(t,e,B),p!=null&&Se.destroy(p,B),Se.destroy(d,B),t[cc][t[si]++]=null,t[lc]())},"abort");try{e.onConnect(g)}catch(B){Se.errorRequest(t,e,B)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),p=r.request(A,{endStream:!1,signal:l}),p.id&&!p.pending?(e.onUpgrade(null,null,p),++r[la],t[cc][t[si]++]=null):p.once("ready",()=>{e.onUpgrade(null,null,p),++r[la],t[cc][t[si]++]=null}),p.once("close",()=>{r[la]-=1,r[la]===0&&r.unref()}),!0;A[Ege]=s,A[yge]="https";let y=n==="PUT"||n==="POST"||n==="PATCH";d&&typeof d.read=="function"&&d.read(0);let E=Se.bodyLength(d);if(Se.isFormDataLike(d)){fz??=vd().extractBody;let[B,N]=fz(d);A["content-type"]=N,d=B.stream,E=B.length}if(E==null&&(E=e.contentLength),(E===0||!y)&&(E=null),Tge(n)&&E>0&&e.contentLength!=null&&e.contentLength!==E){if(t[pge])return Se.errorRequest(t,e,n
Line truncated
|
||||
`,this[nEe]=l??3e5,this[rEe]=s??3e5,this[sEe]=C??!0,this[iEe]=B,this[XQ]=Q,this[dc]=null,this[uEe]=ue>-1?ue:-1,this[AEe]=qe??100,this[kt]=null,this[ai]=[],this[da]=0,this[ci]=0,this[jf]=de=>eR(this,de),this[dEe]=de=>Pz(this,de)}get pipelining(){return this[_y]}set pipelining(e){this[_y]=e,this[jf](!0)}get[Zf](){return this[ai].length-this[ci]}get[Xf](){return this[ci]-this[da]}get[Kf](){return this[ai].length-this[da]}get[Wge](){return!!this[kt]&&!this[Md]&&!this[kt].destroyed}get[KQ](){return!!(this[kt]?.busy(null)||this[Kf]>=(vz(this)||1)||this[Zf]>0)}[Yge](e){_z(this),this.once("connect",e)}[lEe](e,r){let n=e.origin||this[Ui].origin,s=new Gge(n,e,r);return this[ai].push(s),this[vl]||(Tl.bodyLength(s.body)==null&&Tl.isIterable(s.body)?(this[vl]=1,queueMicrotask(()=>eR(this))):this[jf](!0)),this[vl]&&this[Ac]!==2&&this[KQ]&&(this[Ac]=2),this[Ac]<2}async[aEe](){return new Promise(e=>{this[Kf]?this[dc]=e:e(null)})}async[cEe](e){return new Promise(r=>{let n=this[ai].splice(this[ci]);for(let i=0;i<n.length;i++){let a=n[i];Tl.errorRequest(this,a,e)}let s=o(()=>{this[dc]&&(this[dc](),this[dc]=null),r(null)},"callback");this[kt]?(this[kt].destroy(e,s),this[kt]=null):queueMicrotask(s),this[jf]()})}},hEe=Py();function Pz(t,e){if(t[Xf]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){ua(t[ci]===t[da]);let r=t[ai].splice(t[da]);for(let n=0;n<r.length;n++){let s=r[n];Tl.errorRequest(t,s,e)}ua(t[Kf]===0)}}o(Pz,"onError");async function _z(t){ua(!t[Md]),ua(!t[kt]);let{host:e,hostname:r,protocol:n,port:s}=t[Ui];if(r[0]==="["){let i=r.indexOf("]");ua(i!==-1);let a=r.substring(1,i);ua(Tz.isIP(a)),r=a}t[Md]=!0,Od.beforeConnect.hasSubscribers&&Od.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[kt]?.version,servername:t[uc],localAddress:t[Wf]},connector:t[Yf]});try{let i=await new Promise((a,c)=>{t[Yf]({host:e,hostname:r,protocol:n,port:s,servername:t[uc],localAddress:t[Wf]},(l,u)=>{l?c(l):a(u)})});if(t.destroyed){Tl.destroy(i.on("error",Qz),new zge);return}ua(i);try{t[kt]=i.alpnProtocol==="h2"?await fEe(t,i):await pEe(t,i)}catch(a){throw i.destroy().on("error",Qz),a}t[Md]=!1,i[oEe]=0,i[XQ]=t[XQ],i[$ge]=t,i[Kge]=null,Od.connected.hasSubscribers&&Od.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[kt]?.version,servername:t[uc],localAddress:t[Wf]},connector:t[Yf],socket:i}),t.emit("connect",t[Ui],[t])}catch(i){if(t.destroyed)return;if(t[Md]=!1,Od.connectError.hasSubscribers&&Od.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[kt]?.version,servername:t[uc],localAddress:t[Wf]},connector:t[Yf],error:i}),i.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(ua(t[Xf]===0);t[Zf]>0&&t[ai][t[ci]].servername===t[uc];){let a=t[ai][t[ci]++];Tl.errorRequest(t,a,i)}else Pz(t,i);t.emit("connectionError",t[Ui],[t],i)}t[jf]()}o(_z,"connect");function Rz(t){t[Ac]=0,t.emit("drain",t[Ui],[t])}o(Rz,"emitDrain");function eR(t,e){t[vl]!==2&&(t[vl]=2,mEe(t,e),t[vl]=0,t[da]>256&&(t[ai].splice(0,t[da]),t[ci]-=t[da],t[da]=0))}o(eR,"resume");function mEe(t,e){for(;;){if(t.destroyed){ua(t[Zf]===0);return}if(t[dc]&&!t[Kf]){t[dc](),t[dc]=null;return}if(t[kt]&&t[kt].resume(),t[KQ])t[Ac]=2;else if(t[Ac]===2){e?(t[Ac]=1,queueMicrotask(()=>Rz(t))):Rz(t);continue}if(t[Zf]===0||t[Xf]>=(vz(t)||1))return;let r=t[ai][t[ci]];if(t[Ui].protocol==="https:"&&t[uc]!==r.servername){if(t[Xf]>0)return;t[uc]=r.servername,t[kt]?.destroy(new Vge("servername changed"),()=>{t[kt]=null,eR(t)})}if(t[Md])return;if(!t[kt]){_z(t);return}if(t[kt].destroyed||t[kt].busy(r))return;!r.aborted&&t[kt].write(r)?t[ci]++:t[ai].splice(t[ci],1)}}o(mEe,"_resume");kz.exports=ZQ});var tR=m((xKe,Dz)=>{"use strict";var ky=class{static{o(this,"FixedCircularBuffer")}constructor(){this.bottom=0,this.top=0,this.list=new Array(2048),this.next=null}isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&2047)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&2047}shift(){let e=this.list[this.bottom];return e===void 0?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&2047,e)}};Dz.exports=class{static{o(this,"FixedQueue")}constructor(){this.head=this.tail=new ky}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new ky),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var Mz=m((RKe,Oz)=>{var{kFree:gEe,kConnected:EEe,kPending:yEe,kQueued:CEe,kRunning:IEe,kSize:BEe}=dt(),Pl=Symbol("pool"),rR=class{static{o(this,"PoolStats")}constructor(e){this[Pl]=e}get connected(){return this[Pl][EEe]}get free(){return this[Pl][gEe]}get pending(){return this[Pl][yEe]}get queued(){return this[Pl][CEe]}get running(){return this[Pl][IEe]}get size(){return this[Pl][BEe]}};Oz.exports=rR});var cR=m((vKe,$z)=>{"use strict";var bEe=Bd(),wEe=tR(),{kConnected:nR,kSize:Lz,kRunning:Fz,kPending:Uz,kQueued:eh,kBusy:SEe,kFree:NEe,kUrl:xEe,kClose:QEe,kDestroy:REe,kDispatch:TEe}=dt(),vEe=Mz(),pn=Symbol("cl
Line truncated
|
||||
${n.count} ${n.noun} ${n.is} pending:
|
||||
|
||||
${e.format(r)}
|
||||
`.trim())}};K$.exports=cT});var Ky=m((NXe,rY)=>{"use strict";var Z$=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:eIe}=Pe(),tIe=Ud();tY()===void 0&&eY(new tIe);function eY(t){if(!t||typeof t.dispatch!="function")throw new eIe("Argument agent must implement Agent");Object.defineProperty(globalThis,Z$,{value:t,writable:!0,enumerable:!1,configurable:!1})}o(eY,"setGlobalDispatcher");function tY(){return globalThis[Z$]}o(tY,"getGlobalDispatcher");rY.exports={setGlobalDispatcher:eY,getGlobalDispatcher:tY}});var Xy=m((RXe,nY)=>{"use strict";nY.exports=class{static{o(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var iY=m((vXe,sY)=>{"use strict";var rIe=Ty();sY.exports=t=>{let e=t?.maxRedirections;return r=>o(function(s,i){let{maxRedirections:a=e,...c}=s;if(!a)return r(s,i);let l=new rIe(r,a,s,i);return r(c,l)},"redirectInterceptor")}});var aY=m((_Xe,oY)=>{"use strict";var nIe=qy();oY.exports=t=>e=>o(function(n,s){return e(n,new nIe({...n,retryOptions:{...t,...n.retryOptions}},{handler:s,dispatch:e}))},"retryInterceptor")});var lY=m((DXe,cY)=>{"use strict";var sIe=Ie(),{InvalidArgumentError:iIe,RequestAbortedError:oIe}=Pe(),aIe=Xy(),lT=class extends aIe{static{o(this,"DumpHandler")}#e=1024*1024;#t=null;#n=!1;#r=!1;#s=0;#i=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new iIe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#o.bind(this))}#o(e){this.#r=!0,this.#i=e}onHeaders(e,r,n,s){let a=sIe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new oIe(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#a.onHeaders(e,r,n,s)}onError(e){this.#n||(e=this.#i??e,this.#a.onError(e))}onData(e){return this.#s=this.#s+e.length,this.#s>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#i):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function cIe({maxSize:t}={maxSize:1024*1024}){return e=>o(function(n,s){let{dumpMaxSize:i=t}=n,a=new lT({maxSize:i},s);return e(n,a)},"Intercept")}o(cIe,"createDumpInterceptor");cY.exports=cIe});var AY=m((MXe,dY)=>{"use strict";var{isIP:lIe}=require("node:net"),{lookup:uIe}=require("node:dns"),dIe=Xy(),{InvalidArgumentError:jd,InformationalError:AIe}=Pe(),uY=Math.pow(2,31)-1,uT=class{static{o(this,"DNSInstance")}#e=0;#t=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#s}get full(){return this.#n.size===this.#t}runLookup(e,r,n){let s=this.#n.get(e.hostname);if(s==null&&this.full){n(null,e.origin);return}let i={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(s==null)this.lookup(e,i,(a,c)=>{if(a||c==null||c.length===0){n(a??new AIe("No DNS entries found"));return}this.setRecords(e,c);let l=this.#n.get(e.hostname),u=this.pick(e,l,i.affinity),d;typeof u.port=="number"?d=`:${u.port}`:e.port!==""?d=`:${e.port}`:d="",n(null,`${e.protocol}//${u.family===6?`[${u.address}]`:u.address}${d}`)});else{let a=this.pick(e,s,i.affinity);if(a==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}let c;typeof a.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#r(e,r,n){uIe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,i)=>{if(s)return n(s);let a=new Map;for(let c of i)a.set(`${c.address}:${c.family}`,c);n(null,a.values())})}#s(e,r,n){let s=null,{records:i,offset:a}=r,c;if(this.dualStack?(n==null&&(a==null||a===uY?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),i[n]!=null&&i[n].ips.length>0?c=i[n]:c=i[n===4?6:4]):c=i[n],c==null||c.ips.length===0)return s;c.offset==null||c.offset===uY?c.offset=0:c.offset++;let l=c.offset%c.ips.length;return s=c.ips[l]??null,s==null?s:Date.now()-s.timestamp>s.ttl?(c.ips.splice(l,1),this.pick(e,r,n)):s}setRecords(e,r){let n=Date.now(),s={records:{4:null,6:null}};for(let i of r){i.timestamp=n,typeof i.ttl=="number"?i.ttl=Math.min(i.ttl,this.#e):i.ttl=this.#e;let a=s.records[i.family]??{ips:[]};a.ips.push(i),s.records[i.family]=a}this.#n.set(e.hostname,s)}getHandler(e,r){return new dT(this,e,r)}},dT=class extends dIe{static{o(this,"DNSDispatchHandler")}#e=null;#t=null;#n=null
Line truncated
|
||||
${i}`;break;case"retry":zW(i)&&(r[s]=i);break;case"id":JW(i)&&(r[s]=i);break;case"event":i.length>0&&(r[s]=i);break}}processEvent(e){e.retry&&zW(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&JW(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};$W.exports={EventSourceStream:XT}});var rj=m((UZe,tj)=>{"use strict";var{pipeline:C0e}=require("node:stream"),{fetching:I0e}=Ah(),{makeRequest:B0e}=Zd(),{webidl:ma}=Er(),{EventSourceStream:b0e}=YW(),{parseMIMEType:w0e}=dn(),{createFastMessageEvent:S0e}=iA(),{isNetworkError:WW}=uh(),{delay:N0e}=jT(),{kEnumerableProperty:$l}=Ie(),{environmentSettingsObject:jW}=Ln(),KW=!1,XW=3e3,Nh=0,ZW=1,xh=2,x0e="anonymous",Q0e="use-credentials",uA=class t extends EventTarget{static{o(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#n=!1;#r=Nh;#s=null;#i=null;#a;#o;constructor(e,r={}){super(),ma.util.markAsUncloneable(this);let n="EventSource constructor";ma.argumentLengthCheck(arguments,1,n),KW||(KW=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=ma.converters.USVString(e,n,"url"),r=ma.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#o={lastEventId:"",reconnectionTime:XW};let s=jW,i;try{i=new URL(e,s.settingsObject.baseUrl),this.#o.origin=i.origin}catch(l){throw new DOMException(l,"SyntaxError")}this.#t=i.href;let a=x0e;r.withCredentials&&(a=Q0e,this.#n=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=jW.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#s=B0e(c),this.#l()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#l(){if(this.#r===xh)return;this.#r=Nh;let e={request:this.#s,dispatcher:this.#a},r=o(n=>{WW(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(WW(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let s=n.headersList.get("content-type",!0),i=s!==null?w0e(s):"failure",a=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=ZW,this.dispatchEvent(new Event("open")),this.#o.origin=n.urlList[n.urlList.length-1].origin;let c=new b0e({eventSourceSettings:this.#o,push:o(l=>{this.dispatchEvent(S0e(l.type,l.options))},"push")});C0e(n.body.stream,c,l=>{l?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=I0e(e)}async#c(){this.#r!==xh&&(this.#r=Nh,this.dispatchEvent(new Event("error")),await N0e(this.#o.reconnectionTime),this.#r===Nh&&(this.#o.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#l()))}close(){ma.brandCheck(this,t),this.#r!==xh&&(this.#r=xh,this.#i.abort(),this.#s=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},ej={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Nh,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:ZW,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:xh,writable:!1}};Object.defineProperties(uA,ej);Object.defineProperties(uA.prototype,ej);Object.defineProperties(uA.prototype,{close:$l,onerror:$l,onmessage:$l,onopen:$l,readyState:$l,url:$l,withCredentials:$l});ma.converters.EventSourceInitDict=ma.dictionaryConverter([{key:"withCredentials",converter:ma.converters.boolean,defaultValue:o(()=>!1,"defaultValue")},{key:"dispatcher",converter:ma.converters.any}]);tj.exports={EventSource:uA,defaultReconnectionTime:XW}});var AA=m((GZe,ne)=>{"use strict";var R0e=Ld(),nj=Tf(),T0e=Fd(),v0e=eJ(),P0e=Ud(),_0e=IR(),k0e=wJ(),D0e=TJ(),sj=Pe(),FC=Ie(),{InvalidArgumentError:LC}=sj,dA=m$(),O0e=Pf(),M0e=rT(),L0e=X$(),F0e=iT(),U0e=HR(),q0e=qy(),{getGlobalDispatcher:ij,setGlobalDispatcher:G0e}=Ky(),H0e=Xy(),V0e=Ty(),z0e=vy();Object.assign(nj.prototype,dA);ne.exports.Dispatcher=nj;ne.exports.Client=R0e;ne.exports.Pool=T0e;ne.exports.BalancedPool=v0e;ne.exports.Agent=P0e;ne.exports.
Line truncated
|
||||
%s`,N,N,C,n);var Q=C.type==="*"?rP:C.type==="?"?tP:"\\"+C.type;s=!0,n=n.slice(0,C.reStart)+Q+"\\("+N}h(),i&&(n+="\\\\");var D=!1;switch(n.charAt(0)){case"[":case".":case"(":D=!0}for(var ue=c.length-1;ue>-1;ue--){var xe=c[ue],ke=n.slice(0,xe.reStart),qe=n.slice(xe.reStart,xe.reEnd-8),Ce=n.slice(xe.reEnd-8,xe.reEnd),Xe=n.slice(xe.reEnd);Ce+=Xe;var de=ke.split("(").length-1,Lr=Xe;for(g=0;g<de;g++)Lr=Lr.replace(/\)[+*?]?/,"");Xe=Lr;var J="";Xe===""&&e!==cI&&(J="$");var Ge=ke+qe+Xe+J+Ce;n=Ge}if(n!==""&&s&&(n="(?=.)"+n),D&&(n=p+n),e===cI)return[n,s];if(!s)return lRe(t);var Pi=r.nocase?"i":"";try{var tc=new RegExp("^"+n+"$",Pi)}catch{return new RegExp("$.")}return tc._glob=t,tc._src=n,tc}o(aRe,"parse");jn.makeRe=function(t,e){return new $t(t,e||{}).makeRe()};$t.prototype.makeRe=cRe;function cRe(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?rP:e.dot?eRe:tRe,n=e.nocase?"i":"",s=t.map(function(i){return i.map(function(a){return a===Zl?r:typeof a=="string"?uRe(a):a._src}).join("\\/")}).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}o(cRe,"makeRe");jn.match=function(t,e,r){r=r||{};var n=new $t(e,r);return t=t.filter(function(s){return n.match(s)}),n.options.nonull&&!t.length&&t.push(e),t};$t.prototype.match=o(function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;jh.sep!=="/"&&(e=e.split(jh.sep).join("/")),e=e.split(c8),this.debug(this.pattern,"split",e);var s=this.set;this.debug(this.pattern,"set",s);var i,a;for(a=e.length-1;a>=0&&(i=e[a],!i);a--);for(a=0;a<s.length;a++){var c=s[a],l=e;n.matchBase&&c.length===1&&(l=[i]);var u=this.matchOne(l,c,r);if(u)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate},"match");$t.prototype.matchOne=function(t,e,r){return e.indexOf(Zl)!==-1?this._matchGlobstar(t,e,r,0,0):this._matchOne(t,e,r,0,0)};$t.prototype._matchGlobstar=function(t,e,r,n,s){var i,a=-1;for(i=s;i<e.length;i++)if(e[i]===Zl){a=i;break}var c=-1;for(i=e.length-1;i>=0;i--)if(e[i]===Zl){c=i;break}var l=e.slice(s,a),u=r?e.slice(a+1):e.slice(a+1,c),d=r?[]:e.slice(c+1);if(l.length){var A=t.slice(n,n+l.length);if(!this._matchOne(A,l,r,0,0))return!1;n+=l.length}var p=0;if(d.length){if(d.length+n>t.length)return!1;var f=t.length-d.length;if(this._matchOne(t,d,r,f,0))p=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(f--,!this._matchOne(t,d,r,f,0)))return!1;p=d.length+1}}if(!u.length){var h=!!p;for(i=n;i<t.length-p;i++){var g=String(t[i]);if(h=!0,g==="."||g===".."||!this.options.dot&&g.charAt(0)===".")return!1}return r||h}for(var y=[[[],0]],E=y[0],C=0,I=[0],B=0;B<u.length;B++){var N=u[B];N===Zl?(I.push(C),E=[[],0],y.push(E)):(E[0].push(N),C++)}for(var Q=y.length-1,D=t.length-p,ue=0;ue<y.length;ue++)y[ue][1]=D-(I[Q--]+y[ue][0].length);return!!this._matchGlobStarBodySections(t,y,n,0,r,0,!!p)};$t.prototype._matchGlobStarBodySections=function(t,e,r,n,s,i,a){var c=e[n];if(!c){for(var l=r;l<t.length;l++){a=!0;var u=t[l];if(u==="."||u===".."||!this.options.dot&&u.charAt(0)===".")return!1}return a}for(var d=c[0],A=c[1];r<=A;){var p=this._matchOne(t.slice(0,r+d.length),d,s,r,0);if(p&&i<this.maxGlobstarRecursion){var f=this._matchGlobStarBodySections(t,e,r+d.length,n+1,s,i+1,a);if(f!==!1)return f}var u=t[r];if(u==="."||u===".."||!this.options.dot&&u.charAt(0)===".")return!1;r++}return s||null};$t.prototype._matchOne=function(t,e,r,n,s){var i,a,c,l;for(i=n,a=s,c=t.length,l=e.length;i<c&&a<l;i++,a++){this.debug("matchOne loop");var u=e[a],d=t[i];if(this.debug(e,u,d),u===!1||u===Zl)return!1;var A;if(typeof u=="string"?(A=d===u,this.debug("string match",u,d,A)):(A=d.match(u),this.debug("pattern match",u,d,A)),!A)return!1}if(i===c&&a===l)return!0;if(i===c)return r;if(a===l)return i===c-1&&t[i]==="";throw new Error("wtf?")};function lRe(t){return t.replace(/\\(.)/g,"$1")}o(lRe,"globUnescape");function uRe(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}o(uRe,"regExpEscape")});var bA=m((Cnt,h8)=>{"use strict";var ERe="2.0.0",yRe=Number.MAX_SAFE_INTEGER||9007199254740991,CRe=16,IRe=250,BRe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];h8.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:CRe,MAX_SAFE_BUILD_LENGTH:IRe,MAX_SAFE_INTEGER:yRe,RELEASE_TYPES:BRe,SEMVER_SPEC_VERSION:ERe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Zh=m((Int,m8)=>{"use strict";var bRe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};m8.exports=bRe});var wA=m((Wi,g8)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:sP,MAX_SAFE_BUILD_LENGTH:wRe,MAX_LENGTH:SRe}=bA(),NRe=Zh();Wi=g8.exports={};var xRe=Wi.re=[],QRe=Wi.safeRe=[],L=Wi.src=[],RRe=Wi.safeSrc=[],F=Wi.t={},TRe=0,iP="[a-zA-Z0-9-]",vRe=[["\\s",1],["\\d",
Line truncated
|
||||
`.trim())}};eY.exports=cT});var Xy=m((RXe,iY)=>{"use strict";var rY=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:nIe}=Pe(),sIe=Ud();sY()===void 0&&nY(new sIe);function nY(t){if(!t||typeof t.dispatch!="function")throw new nIe("Argument agent must implement Agent");Object.defineProperty(globalThis,rY,{value:t,writable:!0,enumerable:!1,configurable:!1})}o(nY,"setGlobalDispatcher");function sY(){return globalThis[rY]}o(sY,"getGlobalDispatcher");iY.exports={setGlobalDispatcher:nY,getGlobalDispatcher:sY}});var Zy=m((PXe,oY)=>{"use strict";oY.exports=class{static{o(this,"DecoratorHandler")}#e;constructor(e){if(typeof e!="object"||e===null)throw new TypeError("handler must be an object");this.#e=e}onConnect(...e){return this.#e.onConnect?.(...e)}onError(...e){return this.#e.onError?.(...e)}onUpgrade(...e){return this.#e.onUpgrade?.(...e)}onResponseStarted(...e){return this.#e.onResponseStarted?.(...e)}onHeaders(...e){return this.#e.onHeaders?.(...e)}onData(...e){return this.#e.onData?.(...e)}onComplete(...e){return this.#e.onComplete?.(...e)}onBodySent(...e){return this.#e.onBodySent?.(...e)}}});var cY=m((kXe,aY)=>{"use strict";var iIe=vy();aY.exports=t=>{let e=t?.maxRedirections;return r=>o(function(s,i){let{maxRedirections:a=e,...c}=s;if(!a)return r(s,i);let l=new iIe(r,a,s,i);return r(c,l)},"redirectInterceptor")}});var uY=m((OXe,lY)=>{"use strict";var oIe=Gy();lY.exports=t=>e=>o(function(n,s){return e(n,new oIe({...n,retryOptions:{...t,...n.retryOptions}},{handler:s,dispatch:e}))},"retryInterceptor")});var AY=m((LXe,dY)=>{"use strict";var aIe=Ie(),{InvalidArgumentError:cIe,RequestAbortedError:lIe}=Pe(),uIe=Zy(),lT=class extends uIe{static{o(this,"DumpHandler")}#e=1024*1024;#t=null;#n=!1;#r=!1;#s=0;#i=null;#a=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new cIe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#a=r}onConnect(e){this.#t=e,this.#a.onConnect(this.#o.bind(this))}#o(e){this.#r=!0,this.#i=e}onHeaders(e,r,n,s){let a=aIe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new lIe(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#r?!0:this.#a.onHeaders(e,r,n,s)}onError(e){this.#n||(e=this.#i??e,this.#a.onError(e))}onData(e){return this.#s=this.#s+e.length,this.#s>=this.#e&&(this.#n=!0,this.#r?this.#a.onError(this.#i):this.#a.onComplete([])),!0}onComplete(e){if(!this.#n){if(this.#r){this.#a.onError(this.reason);return}this.#a.onComplete(e)}}};function dIe({maxSize:t}={maxSize:1024*1024}){return e=>o(function(n,s){let{dumpMaxSize:i=t}=n,a=new lT({maxSize:i},s);return e(n,a)},"Intercept")}o(dIe,"createDumpInterceptor");dY.exports=dIe});var hY=m((UXe,fY)=>{"use strict";var{isIP:AIe}=require("node:net"),{lookup:pIe}=require("node:dns"),fIe=Zy(),{InvalidArgumentError:Kd,InformationalError:hIe}=Pe(),pY=Math.pow(2,31)-1,uT=class{static{o(this,"DNSInstance")}#e=0;#t=0;#n=new Map;dualStack=!0;affinity=null;lookup=null;pick=null;constructor(e){this.#e=e.maxTTL,this.#t=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#r,this.pick=e.pick??this.#s}get full(){return this.#n.size===this.#t}runLookup(e,r,n){let s=this.#n.get(e.hostname);if(s==null&&this.full){n(null,e.origin);return}let i={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...r.dns,maxTTL:this.#e,maxItems:this.#t};if(s==null)this.lookup(e,i,(a,c)=>{if(a||c==null||c.length===0){n(a??new hIe("No DNS entries found"));return}this.setRecords(e,c);let l=this.#n.get(e.hostname),u=this.pick(e,l,i.affinity),d;typeof u.port=="number"?d=`:${u.port}`:e.port!==""?d=`:${e.port}`:d="",n(null,`${e.protocol}//${u.family===6?`[${u.address}]`:u.address}${d}`)});else{let a=this.pick(e,s,i.affinity);if(a==null){this.#n.delete(e.hostname),this.runLookup(e,r,n);return}let c;typeof a.port=="number"?c=`:${a.port}`:e.port!==""?c=`:${e.port}`:c="",n(null,`${e.protocol}//${a.family===6?`[${a.address}]`:a.address}${c}`)}}#r(e,r,n){pIe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,i)=>{if(s)return n(s);let a=new Map;for(let c of i)a.set(`${c.address}:${c.family}`,c);n(null,a.values())})}#s(e,r,n){let s=null,{records:i,offset:a}=r,c;if(this.dualStack?(n==null&&(a==null||a===pY?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),i[n]!=null&&i[n].ips.length>0?c=i[n]:c=i[n===4?6:4]):c=i[n],c==null||c.ips.length===0)return s;c.offset==null||c.offset===pY?c.offset=0:c.offset++;let l=c.offset%c.ips.length;return s=c.ips[l]??null,s==null?s:Date.now()-s.timestamp>s.ttl?(c.ips.splice(l,1),this.pick(e,r,n)):s}setRecords(e,r){let n=Date.now(),s={records:{4:null,6:null}};for(let i of r){i.timestamp=n,typeof i.ttl=="number"?i.ttl=Math.min(i.ttl,this.#e):i.ttl=this.#e;let a=s.records[i.family]??{ips:[]};a.ips.push(i),s.records[i.family]=a}this.#n.set(e.hostname,s)}getHandler(e,r){return new dT(this,e,r)}},dT=class extends fIe{static{o(this,"DNSDispatchHandler")}#e=null;#t=null;#n=null
Line truncated
|
||||
${i}`;break;case"retry":$W(i)&&(r[s]=i);break;case"id":YW(i)&&(r[s]=i);break;case"event":i.length>0&&(r[s]=i);break}}processEvent(e){e.retry&&$W(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&YW(e.id)&&(this.state.lastEventId=e.id),e.data!==void 0&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}};WW.exports={EventSourceStream:ev}});var sj=m((HZe,nj)=>{"use strict";var{pipeline:b0e}=require("node:stream"),{fetching:w0e}=ph(),{makeRequest:S0e}=eA(),{webidl:ma}=Er(),{EventSourceStream:N0e}=jW(),{parseMIMEType:x0e}=dn(),{createFastMessageEvent:Q0e}=oA(),{isNetworkError:KW}=dh(),{delay:R0e}=XT(),{kEnumerableProperty:$l}=Ie(),{environmentSettingsObject:XW}=Ln(),ZW=!1,ej=3e3,xh=0,tj=1,Qh=2,T0e="anonymous",v0e="use-credentials",dA=class t extends EventTarget{static{o(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#n=!1;#r=xh;#s=null;#i=null;#a;#o;constructor(e,r={}){super(),ma.util.markAsUncloneable(this);let n="EventSource constructor";ma.argumentLengthCheck(arguments,1,n),ZW||(ZW=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=ma.converters.USVString(e,n,"url"),r=ma.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#a=r.dispatcher,this.#o={lastEventId:"",reconnectionTime:ej};let s=XW,i;try{i=new URL(e,s.settingsObject.baseUrl),this.#o.origin=i.origin}catch(l){throw new DOMException(l,"SyntaxError")}this.#t=i.href;let a=T0e;r.withCredentials&&(a=v0e,this.#n=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=XW.settingsObject,c.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],c.cache="no-store",c.initiator="other",c.urlList=[new URL(this.#t)],this.#s=S0e(c),this.#l()}get readyState(){return this.#r}get url(){return this.#t}get withCredentials(){return this.#n}#l(){if(this.#r===Qh)return;this.#r=xh;let e={request:this.#s,dispatcher:this.#a},r=o(n=>{KW(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(KW(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let s=n.headersList.get("content-type",!0),i=s!==null?x0e(s):"failure",a=i!=="failure"&&i.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#r=tj,this.dispatchEvent(new Event("open")),this.#o.origin=n.urlList[n.urlList.length-1].origin;let c=new N0e({eventSourceSettings:this.#o,push:o(l=>{this.dispatchEvent(Q0e(l.type,l.options))},"push")});b0e(n.body.stream,c,l=>{l?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#i=w0e(e)}async#c(){this.#r!==Qh&&(this.#r=xh,this.dispatchEvent(new Event("error")),await R0e(this.#o.reconnectionTime),this.#r===xh&&(this.#o.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#o.lastEventId,!0),this.#l()))}close(){ma.brandCheck(this,t),this.#r!==Qh&&(this.#r=Qh,this.#i.abort(),this.#s=null)}get onopen(){return this.#e.open}set onopen(e){this.#e.open&&this.removeEventListener("open",this.#e.open),typeof e=="function"?(this.#e.open=e,this.addEventListener("open",e)):this.#e.open=null}get onmessage(){return this.#e.message}set onmessage(e){this.#e.message&&this.removeEventListener("message",this.#e.message),typeof e=="function"?(this.#e.message=e,this.addEventListener("message",e)):this.#e.message=null}get onerror(){return this.#e.error}set onerror(e){this.#e.error&&this.removeEventListener("error",this.#e.error),typeof e=="function"?(this.#e.error=e,this.addEventListener("error",e)):this.#e.error=null}},rj={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:xh,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:tj,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Qh,writable:!1}};Object.defineProperties(dA,rj);Object.defineProperties(dA.prototype,rj);Object.defineProperties(dA.prototype,{close:$l,onerror:$l,onmessage:$l,onopen:$l,readyState:$l,url:$l,withCredentials:$l});ma.converters.EventSourceInitDict=ma.dictionaryConverter([{key:"withCredentials",converter:ma.converters.boolean,defaultValue:o(()=>!1,"defaultValue")},{key:"dispatcher",converter:ma.converters.any}]);nj.exports={EventSource:dA,defaultReconnectionTime:ej}});var pA=m((zZe,ne)=>{"use strict";var P0e=Ld(),ij=Pf(),_0e=Fd(),k0e=rJ(),D0e=Ud(),O0e=IR(),M0e=NJ(),L0e=_J(),oj=Pe(),UC=Ie(),{InvalidArgumentError:FC}=oj,AA=y$(),F0e=kf(),U0e=rT(),q0e=tY(),G0e=iT(),H0e=HR(),V0e=Gy(),{getGlobalDispatcher:aj,setGlobalDispatcher:z0e}=Xy(),J0e=Zy(),$0e=vy(),Y0e=Py();Object.assign(ij.prototype,AA);ne.exports.Dispatcher=ij;ne.exports.Client=P0e;ne.exports.Pool=_0e;ne.exports.BalancedPool=k0e;ne.exports.Agent=D0e;ne.exports.
Line truncated
|
||||
%s`,N,N,C,n);var Q=C.type==="*"?sP:C.type==="?"?nP:"\\"+C.type;s=!0,n=n.slice(0,C.reStart)+Q+"\\("+N}h(),i&&(n+="\\\\");var D=!1;switch(n.charAt(0)){case"[":case".":case"(":D=!0}for(var ue=c.length-1;ue>-1;ue--){var xe=c[ue],ke=n.slice(0,xe.reStart),qe=n.slice(xe.reStart,xe.reEnd-8),Ce=n.slice(xe.reEnd-8,xe.reEnd),Ze=n.slice(xe.reEnd);Ce+=Ze;var de=ke.split("(").length-1,Lr=Ze;for(g=0;g<de;g++)Lr=Lr.replace(/\)[+*?]?/,"");Ze=Lr;var J="";Ze===""&&e!==lI&&(J="$");var Ge=ke+qe+Ze+J+Ce;n=Ge}if(n!==""&&s&&(n="(?=.)"+n),D&&(n=p+n),e===lI)return[n,s];if(!s)return ARe(t);var Pi=r.nocase?"i":"";try{var tc=new RegExp("^"+n+"$",Pi)}catch{return new RegExp("$.")}return tc._glob=t,tc._src=n,tc}o(uRe,"parse");jn.makeRe=function(t,e){return new $t(t,e||{}).makeRe()};$t.prototype.makeRe=dRe;function dRe(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?sP:e.dot?nRe:sRe,n=e.nocase?"i":"",s=t.map(function(i){return i.map(function(a){return a===Zl?r:typeof a=="string"?pRe(a):a._src}).join("\\/")}).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}o(dRe,"makeRe");jn.match=function(t,e,r){r=r||{};var n=new $t(e,r);return t=t.filter(function(s){return n.match(s)}),n.options.nonull&&!t.length&&t.push(e),t};$t.prototype.match=o(function(e,r){if(typeof r>"u"&&(r=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;var n=this.options;Kh.sep!=="/"&&(e=e.split(Kh.sep).join("/")),e=e.split(u8),this.debug(this.pattern,"split",e);var s=this.set;this.debug(this.pattern,"set",s);var i,a;for(a=e.length-1;a>=0&&(i=e[a],!i);a--);for(a=0;a<s.length;a++){var c=s[a],l=e;n.matchBase&&c.length===1&&(l=[i]);var u=this.matchOne(l,c,r);if(u)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate},"match");$t.prototype.matchOne=function(t,e,r){return e.indexOf(Zl)!==-1?this._matchGlobstar(t,e,r,0,0):this._matchOne(t,e,r,0,0)};$t.prototype._matchGlobstar=function(t,e,r,n,s){var i,a=-1;for(i=s;i<e.length;i++)if(e[i]===Zl){a=i;break}var c=-1;for(i=e.length-1;i>=0;i--)if(e[i]===Zl){c=i;break}var l=e.slice(s,a),u=r?e.slice(a+1):e.slice(a+1,c),d=r?[]:e.slice(c+1);if(l.length){var A=t.slice(n,n+l.length);if(!this._matchOne(A,l,r,0,0))return!1;n+=l.length}var p=0;if(d.length){if(d.length+n>t.length)return!1;var f=t.length-d.length;if(this._matchOne(t,d,r,f,0))p=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(f--,!this._matchOne(t,d,r,f,0)))return!1;p=d.length+1}}if(!u.length){var h=!!p;for(i=n;i<t.length-p;i++){var g=String(t[i]);if(h=!0,g==="."||g===".."||!this.options.dot&&g.charAt(0)===".")return!1}return r||h}for(var y=[[[],0]],E=y[0],C=0,I=[0],B=0;B<u.length;B++){var N=u[B];N===Zl?(I.push(C),E=[[],0],y.push(E)):(E[0].push(N),C++)}for(var Q=y.length-1,D=t.length-p,ue=0;ue<y.length;ue++)y[ue][1]=D-(I[Q--]+y[ue][0].length);return!!this._matchGlobStarBodySections(t,y,n,0,r,0,!!p)};$t.prototype._matchGlobStarBodySections=function(t,e,r,n,s,i,a){var c=e[n];if(!c){for(var l=r;l<t.length;l++){a=!0;var u=t[l];if(u==="."||u===".."||!this.options.dot&&u.charAt(0)===".")return!1}return a}for(var d=c[0],A=c[1];r<=A;){var p=this._matchOne(t.slice(0,r+d.length),d,s,r,0);if(p&&i<this.maxGlobstarRecursion){var f=this._matchGlobStarBodySections(t,e,r+d.length,n+1,s,i+1,a);if(f!==!1)return f}var u=t[r];if(u==="."||u===".."||!this.options.dot&&u.charAt(0)===".")return!1;r++}return s||null};$t.prototype._matchOne=function(t,e,r,n,s){var i,a,c,l;for(i=n,a=s,c=t.length,l=e.length;i<c&&a<l;i++,a++){this.debug("matchOne loop");var u=e[a],d=t[i];if(this.debug(e,u,d),u===!1||u===Zl)return!1;var A;if(typeof u=="string"?(A=d===u,this.debug("string match",u,d,A)):(A=d.match(u),this.debug("pattern match",u,d,A)),!A)return!1}if(i===c&&a===l)return!0;if(i===c)return r;if(a===l)return i===c-1&&t[i]==="";throw new Error("wtf?")};function ARe(t){return t.replace(/\\(.)/g,"$1")}o(ARe,"globUnescape");function pRe(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}o(pRe,"regExpEscape")});var wA=m((bnt,g8)=>{"use strict";var IRe="2.0.0",BRe=Number.MAX_SAFE_INTEGER||9007199254740991,bRe=16,wRe=250,SRe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];g8.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:bRe,MAX_SAFE_BUILD_LENGTH:wRe,MAX_SAFE_INTEGER:BRe,RELEASE_TYPES:SRe,SEMVER_SPEC_VERSION:IRe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var em=m((wnt,E8)=>{"use strict";var NRe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};E8.exports=NRe});var SA=m((Wi,y8)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:oP,MAX_SAFE_BUILD_LENGTH:xRe,MAX_LENGTH:QRe}=wA(),RRe=em();Wi=y8.exports={};var TRe=Wi.re=[],vRe=Wi.safeRe=[],L=Wi.src=[],PRe=Wi.safeSrc=[],F=Wi.t={},_Re=0,aP="[a-zA-Z0-9-]",kRe=[["\\s",1],["\\d",
Line truncated
|
||||
`).join(`
|
||||
`+i),t.push(s+"m+"+KI.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=I_e()+e+" "+t[0]}o(C_e,"formatArgs");function I_e(){return Br.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(I_e,"getDate");function B_e(...t){return process.stderr.write(jI.format(...t)+`
|
||||
`)}o(B_e,"log");function b_e(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(b_e,"save");function w_e(){return process.env.DEBUG}o(w_e,"load");function S_e(t){t.inspectOpts={};let e=Object.keys(Br.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Br.inspectOpts[e[r]]}o(S_e,"init");KI.exports=YP()(Br);var{formatters:eK}=KI.exports;eK.o=function(t){return this.inspectOpts.colors=this.useColors,jI.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};eK.O=function(t){return this.inspectOpts.colors=this.useColors,jI.inspect(t,this.inspectOpts)}});var XI=m((Aat,XP)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?XP.exports=W6():XP.exports=tK()});var sK=m(yn=>{"use strict";var N_e=yn&&yn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),x_e=yn&&yn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),rK=yn&&yn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&N_e(e,t,r);return x_e(e,t),e};Object.defineProperty(yn,"__esModule",{value:!0});yn.req=yn.json=yn.toBuffer=void 0;var Q_e=rK(require("http")),R_e=rK(require("https"));async function nK(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}o(nK,"toBuffer");yn.toBuffer=nK;async function T_e(t){let r=(await nK(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}o(T_e,"json");yn.json=T_e;function v_e(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?R_e:Q_e).request(t,e),s=new Promise((i,a)=>{n.once("response",i).once("error",a).end()});return n.then=s.then.bind(s),n}o(v_e,"req");yn.req=v_e});var cK=m(es=>{"use strict";var oK=es&&es.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),P_e=es&&es.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),aK=es&&es.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&oK(e,t,r);return P_e(e,t),e},__e=es&&es.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&oK(e,t,r)};Object.defineProperty(es,"__esModule",{value:!0});es.Agent=void 0;var k_e=aK(require("net")),iK=aK(require("http")),D_e=require("https");__e(sK(),es);var Zi=Symbol("AgentBaseInternalState"),ZP=class extends iK.Agent{static{o(this,"Agent")}constructor(e){super(e),this[Zi]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
||||
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new k_e.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?D_e.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(s),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(i,a),c instanceof iK.Agent)try{return c.addRequest(e,s)}catch(l){return n(l)}this[Zi].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(i,a),n(c)})}createConnection(){let e=this[Zi].currentSocket;if(this[Zi].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Zi].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Zi]&&(this[Zi].defaultPort=e)}get protocol(){return this[Zi].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Zi]&&(this[Zi].protocol=e)}};es.Agent=ZP});var lK=m(kA=>{"use strict";var O_e=kA&&kA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kA,"__esModule",{value:!0});kA.parseProxyResponse=void 0;var M_e=O_e(XI()),ZI=(0,M_e.default)("https-proxy-agent:parse-proxy-response");function L_e(t){return new Promise((e,r)=>{let n=0,s=[];function i(){let d=t.read();d?u(d):t.once("readable",i)}o(i,"read");function a(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("readable",i)}o(a,"cleanup");function c(){a(),ZI("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}o(c,"onend");function l(d){a(),ZI("onerror %o",d),r(d)}o(l,"onerror");function u(d){s.push(d),n+=d.length;let A=Buffer.concat(s,n),p=A.indexOf(`\r
|
||||
`+i),t.push(s+"m+"+XI.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=w_e()+e+" "+t[0]}o(b_e,"formatArgs");function w_e(){return Br.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(w_e,"getDate");function S_e(...t){return process.stderr.write(KI.format(...t)+`
|
||||
`)}o(S_e,"log");function N_e(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(N_e,"save");function x_e(){return process.env.DEBUG}o(x_e,"load");function Q_e(t){t.inspectOpts={};let e=Object.keys(Br.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Br.inspectOpts[e[r]]}o(Q_e,"init");XI.exports=jP()(Br);var{formatters:rK}=XI.exports;rK.o=function(t){return this.inspectOpts.colors=this.useColors,KI.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};rK.O=function(t){return this.inspectOpts.colors=this.useColors,KI.inspect(t,this.inspectOpts)}});var ZI=m((hat,e_)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?e_.exports=K6():e_.exports=nK()});var oK=m(yn=>{"use strict";var R_e=yn&&yn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),T_e=yn&&yn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),sK=yn&&yn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&R_e(e,t,r);return T_e(e,t),e};Object.defineProperty(yn,"__esModule",{value:!0});yn.req=yn.json=yn.toBuffer=void 0;var v_e=sK(require("http")),P_e=sK(require("https"));async function iK(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}o(iK,"toBuffer");yn.toBuffer=iK;async function __e(t){let r=(await iK(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}o(__e,"json");yn.json=__e;function k_e(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?P_e:v_e).request(t,e),s=new Promise((i,a)=>{n.once("response",i).once("error",a).end()});return n.then=s.then.bind(s),n}o(k_e,"req");yn.req=k_e});var uK=m(es=>{"use strict";var cK=es&&es.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),D_e=es&&es.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),lK=es&&es.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&cK(e,t,r);return D_e(e,t),e},O_e=es&&es.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&cK(e,t,r)};Object.defineProperty(es,"__esModule",{value:!0});es.Agent=void 0;var M_e=lK(require("net")),aK=lK(require("http")),L_e=require("https");O_e(oK(),es);var Zi=Symbol("AgentBaseInternalState"),t_=class extends aK.Agent{static{o(this,"Agent")}constructor(e){super(e),this[Zi]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
||||
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new M_e.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?L_e.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(s),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(i,a),c instanceof aK.Agent)try{return c.addRequest(e,s)}catch(l){return n(l)}this[Zi].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(i,a),n(c)})}createConnection(){let e=this[Zi].currentSocket;if(this[Zi].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Zi].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Zi]&&(this[Zi].defaultPort=e)}get protocol(){return this[Zi].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Zi]&&(this[Zi].protocol=e)}};es.Agent=t_});var dK=m(DA=>{"use strict";var F_e=DA&&DA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(DA,"__esModule",{value:!0});DA.parseProxyResponse=void 0;var U_e=F_e(ZI()),eB=(0,U_e.default)("https-proxy-agent:parse-proxy-response");function q_e(t){return new Promise((e,r)=>{let n=0,s=[];function i(){let d=t.read();d?u(d):t.once("readable",i)}o(i,"read");function a(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("readable",i)}o(a,"cleanup");function c(){a(),eB("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}o(c,"onend");function l(d){a(),eB("onerror %o",d),r(d)}o(l,"onerror");function u(d){s.push(d),n+=d.length;let A=Buffer.concat(s,n),p=A.indexOf(`\r
|
||||
\r
|
||||
`);if(p===-1){ZI("have not received end of HTTP headers yet..."),i();return}let f=A.slice(0,p).toString("ascii").split(`\r
|
||||
`),h=f.shift();if(!h)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=h.split(" "),y=+g[1],E=g.slice(2).join(" "),C={};for(let I of f){if(!I)continue;let B=I.indexOf(":");if(B===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${I}"`));let N=I.slice(0,B).toLowerCase(),Q=I.slice(B+1).trimStart(),D=C[N];typeof D=="string"?C[N]=[D,Q]:Array.isArray(D)?D.push(Q):C[N]=Q}ZI("got proxy server response: %o %o",h,C),a(),e({connect:{statusCode:y,statusText:E,headers:C},buffered:A})}o(u,"ondata"),t.on("error",l),t.on("end",c),i()})}o(L_e,"parseProxyResponse");kA.parseProxyResponse=L_e});var hK=m(vs=>{"use strict";var F_e=vs&&vs.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),U_e=vs&&vs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),pK=vs&&vs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&F_e(e,t,r);return U_e(e,t),e},fK=vs&&vs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vs,"__esModule",{value:!0});vs.HttpsProxyAgent=void 0;var eB=pK(require("net")),uK=pK(require("tls")),q_e=fK(require("assert")),G_e=fK(XI()),H_e=cK(),V_e=require("url"),z_e=lK(),fm=(0,G_e.default)("https-proxy-agent"),dK=o(t=>t.servername===void 0&&t.host&&!eB.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),tB=class extends H_e.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new V_e.URL(e):e,this.proxyHeaders=r?.headers??{},fm("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?AK(r,"headers"):null,host:n,port:s}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let s;n.protocol==="https:"?(fm("Creating `tls.Socket`: %o",this.connectOpts),s=uK.connect(dK(this.connectOpts))):(fm("Creating `net.Socket`: %o",this.connectOpts),s=eB.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=eB.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
||||
`);if(p===-1){eB("have not received end of HTTP headers yet..."),i();return}let f=A.slice(0,p).toString("ascii").split(`\r
|
||||
`),h=f.shift();if(!h)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let g=h.split(" "),y=+g[1],E=g.slice(2).join(" "),C={};for(let I of f){if(!I)continue;let B=I.indexOf(":");if(B===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${I}"`));let N=I.slice(0,B).toLowerCase(),Q=I.slice(B+1).trimStart(),D=C[N];typeof D=="string"?C[N]=[D,Q]:Array.isArray(D)?D.push(Q):C[N]=Q}eB("got proxy server response: %o %o",h,C),a(),e({connect:{statusCode:y,statusText:E,headers:C},buffered:A})}o(u,"ondata"),t.on("error",l),t.on("end",c),i()})}o(q_e,"parseProxyResponse");DA.parseProxyResponse=q_e});var gK=m(vs=>{"use strict";var G_e=vs&&vs.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),H_e=vs&&vs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),hK=vs&&vs.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&G_e(e,t,r);return H_e(e,t),e},mK=vs&&vs.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vs,"__esModule",{value:!0});vs.HttpsProxyAgent=void 0;var tB=hK(require("net")),AK=hK(require("tls")),V_e=mK(require("assert")),z_e=mK(ZI()),J_e=uK(),$_e=require("url"),Y_e=dK(),hm=(0,z_e.default)("https-proxy-agent"),pK=o(t=>t.servername===void 0&&t.host&&!tB.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),rB=class extends J_e.Agent{static{o(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new $_e.URL(e):e,this.proxyHeaders=r?.headers??{},hm("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?fK(r,"headers"):null,host:n,port:s}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let s;n.protocol==="https:"?(hm("Creating `tls.Socket`: %o",this.connectOpts),s=AK.connect(pK(this.connectOpts))):(hm("Creating `net.Socket`: %o",this.connectOpts),s=tB.connect(this.connectOpts));let i=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=tB.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
||||
`;if(n.username||n.password){let p=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}i.Host=`${a}:${r.port}`,i["Proxy-Connection"]||(i["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(i))c+=`${p}: ${i[p]}\r
|
||||
`;let l=(0,z_e.parseProxyResponse)(s);s.write(`${c}\r
|
||||
`);let{connect:u,buffered:d}=await l;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)return e.once("socket",J_e),r.secureEndpoint?(fm("Upgrading socket connection to TLS"),uK.connect({...AK(dK(r),"host","path","port"),socket:s})):s;s.destroy();let A=new eB.Socket({writable:!1});return A.readable=!0,e.once("socket",p=>{fm("Replaying proxy buffer for failed request"),(0,q_e.default)(p.listenerCount("data")>0),p.push(d),p.push(null)}),A}};tB.protocols=["http","https"];vs.HttpsProxyAgent=tB;function J_e(t){t.resume()}o(J_e,"resume");function AK(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(AK,"omit")});var EK=m(Cn=>{"use strict";var $_e=Cn&&Cn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Y_e=Cn&&Cn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mK=Cn&&Cn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&$_e(e,t,r);return Y_e(e,t),e};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.req=Cn.json=Cn.toBuffer=void 0;var W_e=mK(require("http")),j_e=mK(require("https"));async function gK(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}o(gK,"toBuffer");Cn.toBuffer=gK;async function K_e(t){let r=(await gK(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}o(K_e,"json");Cn.json=K_e;function X_e(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?j_e:W_e).request(t,e),s=new Promise((i,a)=>{n.once("response",i).once("error",a).end()});return n.then=s.then.bind(s),n}o(X_e,"req");Cn.req=X_e});var BK=m(ts=>{"use strict";var CK=ts&&ts.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Z_e=ts&&ts.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),IK=ts&&ts.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&CK(e,t,r);return Z_e(e,t),e},eke=ts&&ts.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&CK(e,t,r)};Object.defineProperty(ts,"__esModule",{value:!0});ts.Agent=void 0;var tke=IK(require("net")),yK=IK(require("http")),rke=require("https");eke(EK(),ts);var eo=Symbol("AgentBaseInternalState"),e_=class extends yK.Agent{static{o(this,"Agent")}constructor(e){super(e),this[eo]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
||||
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new tke.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?rke.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(s),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(i,a),c instanceof yK.Agent)return c.addRequest(e,s);this[eo].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(i,a),n(c)})}createConnection(){let e=this[eo].currentSocket;if(this[eo].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[eo].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[eo]&&(this[eo].defaultPort=e)}get protocol(){return this[eo].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[eo]&&(this[eo].protocol=e)}};ts.Agent=e_});var SK=m(Ps=>{"use strict";var nke=Ps&&Ps.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ske=Ps&&Ps.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),wK=Ps&&Ps.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&nke(e,t,r);return ske(e,t),e},ike=Ps&&Ps.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.HttpProxyAgent=void 0;var oke=wK(require("net")),ake=wK(require("tls")),cke=ike(XI()),lke=require("events"),uke=BK(),bK=require("url"),DA=(0,cke.default)("http-proxy-agent"),rB=class extends uke.Agent{static{o(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new bK.URL(e):e,this.proxyHeaders=r?.headers??{},DA("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?dke(r,"headers"):null,host:n,port:s}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,s=r.secureEndpoint?"https:":"http:",i=e.getHeader("host")||"localhost",a=`${s}//${i}`,c=new bK.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);let l=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let u=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;l["Proxy-Authorization"]=`Basic ${Buffer.from(u).toString("base64")}`}l["Proxy-Connection"]||(l["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let u of Object.keys(l)){let d=l[u];d&&e.setHeader(u,d)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,s;DA("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(DA("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,s=n.indexOf(`\r
|
||||
`;let l=(0,Y_e.parseProxyResponse)(s);s.write(`${c}\r
|
||||
`);let{connect:u,buffered:d}=await l;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200)return e.once("socket",W_e),r.secureEndpoint?(hm("Upgrading socket connection to TLS"),AK.connect({...fK(pK(r),"host","path","port"),socket:s})):s;s.destroy();let A=new tB.Socket({writable:!1});return A.readable=!0,e.once("socket",p=>{hm("Replaying proxy buffer for failed request"),(0,V_e.default)(p.listenerCount("data")>0),p.push(d),p.push(null)}),A}};rB.protocols=["http","https"];vs.HttpsProxyAgent=rB;function W_e(t){t.resume()}o(W_e,"resume");function fK(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(fK,"omit")});var CK=m(Cn=>{"use strict";var j_e=Cn&&Cn.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),K_e=Cn&&Cn.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),EK=Cn&&Cn.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&j_e(e,t,r);return K_e(e,t),e};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.req=Cn.json=Cn.toBuffer=void 0;var X_e=EK(require("http")),Z_e=EK(require("https"));async function yK(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}o(yK,"toBuffer");Cn.toBuffer=yK;async function eke(t){let r=(await yK(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}o(eke,"json");Cn.json=eke;function tke(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?Z_e:X_e).request(t,e),s=new Promise((i,a)=>{n.once("response",i).once("error",a).end()});return n.then=s.then.bind(s),n}o(tke,"req");Cn.req=tke});var wK=m(ts=>{"use strict";var BK=ts&&ts.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),rke=ts&&ts.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),bK=ts&&ts.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&BK(e,t,r);return rke(e,t),e},nke=ts&&ts.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&BK(e,t,r)};Object.defineProperty(ts,"__esModule",{value:!0});ts.Agent=void 0;var ske=bK(require("net")),IK=bK(require("http")),ike=require("https");nke(CK(),ts);var eo=Symbol("AgentBaseInternalState"),r_=class extends IK.Agent{static{o(this,"Agent")}constructor(e){super(e),this[eo]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
||||
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let r=new ske.Socket({writable:!1});return this.sockets[e].push(r),this.totalSocketCount++,r}decrementSockets(e,r){if(!this.sockets[e]||r===null)return;let n=this.sockets[e],s=n.indexOf(r);s!==-1&&(n.splice(s,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return(typeof e.secureEndpoint=="boolean"?e.secureEndpoint:this.isSecureEndpoint(e))?ike.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},i=this.getName(s),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(i,a),c instanceof IK.Agent)return c.addRequest(e,s);this[eo].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(i,a),n(c)})}createConnection(){let e=this[eo].currentSocket;if(this[eo].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[eo].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[eo]&&(this[eo].defaultPort=e)}get protocol(){return this[eo].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[eo]&&(this[eo].protocol=e)}};ts.Agent=r_});var xK=m(Ps=>{"use strict";var oke=Ps&&Ps.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ake=Ps&&Ps.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),NK=Ps&&Ps.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&oke(e,t,r);return ake(e,t),e},cke=Ps&&Ps.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ps,"__esModule",{value:!0});Ps.HttpProxyAgent=void 0;var lke=NK(require("net")),uke=NK(require("tls")),dke=cke(ZI()),Ake=require("events"),pke=wK(),SK=require("url"),OA=(0,dke.default)("http-proxy-agent"),nB=class extends pke.Agent{static{o(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new SK.URL(e):e,this.proxyHeaders=r?.headers??{},OA("Creating new HttpProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),s=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={...r?fke(r,"headers"):null,host:n,port:s}}addRequest(e,r){e._header=null,this.setRequestProps(e,r),super.addRequest(e,r)}setRequestProps(e,r){let{proxy:n}=this,s=r.secureEndpoint?"https:":"http:",i=e.getHeader("host")||"localhost",a=`${s}//${i}`,c=new SK.URL(e.path,a);r.port!==80&&(c.port=String(r.port)),e.path=String(c);let l=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let u=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;l["Proxy-Authorization"]=`Basic ${Buffer.from(u).toString("base64")}`}l["Proxy-Connection"]||(l["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let u of Object.keys(l)){let d=l[u];d&&e.setHeader(u,d)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,s;OA("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(OA("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,s=n.indexOf(`\r
|
||||
\r
|
||||
`)+4,e.outputData[0].data=e._header+n.substring(s),DA("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(DA("Creating `tls.Socket`: %o",this.connectOpts),i=ake.connect(this.connectOpts)):(DA("Creating `net.Socket`: %o",this.connectOpts),i=oke.connect(this.connectOpts)),await(0,lke.once)(i,"connect"),i}};rB.protocols=["http","https"];Ps.HttpProxyAgent=rB;function dke(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(dke,"omit")});var $K=m(mB=>{"use strict";Object.defineProperty(mB,"__esModule",{value:!0});mB.state=void 0;mB.state={instrumenterImplementation:void 0}});var uX=m(IB=>{"use strict";Object.defineProperty(IB,"__esModule",{value:!0});IB.state=void 0;IB.state={operationRequestMap:new WeakMap}});var G7=m(ZA=>{"use strict";Object.defineProperty(ZA,"__esModule",{value:!0});var v1e=require("os"),P1e=require("util");function _1e(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}o(_1e,"_interopDefaultLegacy");var k1e=_1e(P1e);function D1e(t,...e){process.stderr.write(`${k1e.default.format(t,...e)}${v1e.EOL}`)}o(D1e,"log");var P7=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,k7,PM=[],_M=[],Ub=[];P7&&kM(P7);var D7=Object.assign(t=>O7(t),{enable:kM,enabled:DM,disable:O1e,log:D1e});function kM(t){k7=t,PM=[],_M=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?_M.push(new RegExp(`^${n.substr(1)}$`)):PM.push(new RegExp(`^${n}$`));for(let n of Ub)n.enabled=DM(n.namespace)}o(kM,"enable");function DM(t){if(t.endsWith("*"))return!0;for(let e of _M)if(e.test(t))return!1;for(let e of PM)if(e.test(t))return!0;return!1}o(DM,"enabled");function O1e(){let t=k7||"";return kM(""),t}o(O1e,"disable");function O7(t){let e=Object.assign(r,{enabled:DM(t),destroy:M1e,log:D7.log,namespace:t,extend:L1e});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return o(r,"debug"),Ub.push(e),e}o(O7,"createDebugger");function M1e(){let t=Ub.indexOf(this);return t>=0?(Ub.splice(t,1),!0):!1}o(M1e,"destroy");function L1e(t){let e=O7(`${this.namespace}:${t}`);return e.log=this.log,e}o(L1e,"extend");var tg=D7,M7=new Set,Lb=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,qb,Gb=tg("azure");Gb.log=(...t)=>{tg.log(...t)};var OM=["verbose","info","warning","error"];Lb&&(q7(Lb)?L7(Lb):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Lb}'; logging is not enabled. Acceptable values: ${OM.join(", ")}.`));function L7(t){if(t&&!q7(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${OM.join(",")}`);qb=t;let e=[];for(let r of M7)U7(r)&&e.push(r.namespace);tg.enable(e.join(","))}o(L7,"setLogLevel");function F1e(){return qb}o(F1e,"getLogLevel");var _7={verbose:400,info:300,warning:200,error:100};function U1e(t){let e=Gb.extend(t);return F7(Gb,e),{error:Fb(e,"error"),warning:Fb(e,"warning"),info:Fb(e,"info"),verbose:Fb(e,"verbose")}}o(U1e,"createClientLogger");function F7(t,e){e.log=(...r)=>{t.log(...r)}}o(F7,"patchLogMethod");function Fb(t,e){let r=Object.assign(t.extend(e),{level:e});if(F7(t,r),U7(r)){let n=tg.disable();tg.enable(n+","+r.namespace)}return M7.add(r),r}o(Fb,"createLogger");function U7(t){return!!(qb&&_7[t.level]<=_7[qb])}o(U7,"shouldEnable");function q7(t){return OM.includes(t)}o(q7,"isAzureLogLevel");ZA.AzureLogger=Gb;ZA.createClientLogger=U1e;ZA.getLogLevel=F1e;ZA.setLogLevel=L7});var FM=m(ng=>{"use strict";Object.defineProperty(ng,"__esModule",{value:!0});var ep=new WeakMap,Hb=new WeakMap,rg=class t{static{o(this,"AbortSignal")}constructor(){this.onabort=null,ep.set(this,[]),Hb.set(this,!1)}get aborted(){if(!Hb.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return Hb.get(this)}static get none(){return new t}addEventListener(e,r){if(!ep.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");ep.get(this).push(r)}removeEventListener(e,r){if(!ep.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=ep.get(this),s=n.indexOf(r);s>-1&&n.splice(s,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 H7(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=ep.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),Hb.set(t,!0)}o(H7,"abortSignal");var MM=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}},LM=class{static{o(this,"AbortController")}constructor(e){if(this._signal=new rg,!!e){Array.isArray(e)||(e=arguments);for(let r of e)r.aborted?this.abort():r.addEventListener("abort",()=>{this.abort()})}}get signal(){return this._signal}abort(){H7(this._signal)}static timeout(e){let r=new rg,n=setTimeout(H7,e,r);return typeof n.unref=="function"&&n.unref(),r}};ng.AbortController=LM;ng.AbortError=MM;ng.AbortSignal=rg});var Y7=m(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});var q1e
Line truncated
|
||||
`)+4,e.outputData[0].data=e._header+n.substring(s),OA("Output buffer: %o",e.outputData[0].data));let i;return this.proxy.protocol==="https:"?(OA("Creating `tls.Socket`: %o",this.connectOpts),i=uke.connect(this.connectOpts)):(OA("Creating `net.Socket`: %o",this.connectOpts),i=lke.connect(this.connectOpts)),await(0,Ake.once)(i,"connect"),i}};nB.protocols=["http","https"];Ps.HttpProxyAgent=nB;function fke(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}o(fke,"omit")});var WK=m(gB=>{"use strict";Object.defineProperty(gB,"__esModule",{value:!0});gB.state=void 0;gB.state={instrumenterImplementation:void 0}});var AX=m(BB=>{"use strict";Object.defineProperty(BB,"__esModule",{value:!0});BB.state=void 0;BB.state={operationRequestMap:new WeakMap}});var V7=m(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var k1e=require("os"),D1e=require("util");function O1e(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}o(O1e,"_interopDefaultLegacy");var M1e=O1e(D1e);function L1e(t,...e){process.stderr.write(`${M1e.default.format(t,...e)}${k1e.EOL}`)}o(L1e,"log");var k7=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,O7,kM=[],DM=[],qb=[];k7&&OM(k7);var M7=Object.assign(t=>L7(t),{enable:OM,enabled:MM,disable:F1e,log:L1e});function OM(t){O7=t,kM=[],DM=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?DM.push(new RegExp(`^${n.substr(1)}$`)):kM.push(new RegExp(`^${n}$`));for(let n of qb)n.enabled=MM(n.namespace)}o(OM,"enable");function MM(t){if(t.endsWith("*"))return!0;for(let e of DM)if(e.test(t))return!1;for(let e of kM)if(e.test(t))return!0;return!1}o(MM,"enabled");function F1e(){let t=O7||"";return OM(""),t}o(F1e,"disable");function L7(t){let e=Object.assign(r,{enabled:MM(t),destroy:U1e,log:M7.log,namespace:t,extend:q1e});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return o(r,"debug"),qb.push(e),e}o(L7,"createDebugger");function U1e(){let t=qb.indexOf(this);return t>=0?(qb.splice(t,1),!0):!1}o(U1e,"destroy");function q1e(t){let e=L7(`${this.namespace}:${t}`);return e.log=this.log,e}o(q1e,"extend");var rg=M7,F7=new Set,Fb=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,Gb,Hb=rg("azure");Hb.log=(...t)=>{rg.log(...t)};var LM=["verbose","info","warning","error"];Fb&&(H7(Fb)?U7(Fb):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Fb}'; logging is not enabled. Acceptable values: ${LM.join(", ")}.`));function U7(t){if(t&&!H7(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${LM.join(",")}`);Gb=t;let e=[];for(let r of F7)G7(r)&&e.push(r.namespace);rg.enable(e.join(","))}o(U7,"setLogLevel");function G1e(){return Gb}o(G1e,"getLogLevel");var D7={verbose:400,info:300,warning:200,error:100};function H1e(t){let e=Hb.extend(t);return q7(Hb,e),{error:Ub(e,"error"),warning:Ub(e,"warning"),info:Ub(e,"info"),verbose:Ub(e,"verbose")}}o(H1e,"createClientLogger");function q7(t,e){e.log=(...r)=>{t.log(...r)}}o(q7,"patchLogMethod");function Ub(t,e){let r=Object.assign(t.extend(e),{level:e});if(q7(t,r),G7(r)){let n=rg.disable();rg.enable(n+","+r.namespace)}return F7.add(r),r}o(Ub,"createLogger");function G7(t){return!!(Gb&&D7[t.level]<=D7[Gb])}o(G7,"shouldEnable");function H7(t){return LM.includes(t)}o(H7,"isAzureLogLevel");ep.AzureLogger=Hb;ep.createClientLogger=H1e;ep.getLogLevel=G1e;ep.setLogLevel=U7});var qM=m(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:!0});var tp=new WeakMap,Vb=new WeakMap,ng=class t{static{o(this,"AbortSignal")}constructor(){this.onabort=null,tp.set(this,[]),Vb.set(this,!1)}get aborted(){if(!Vb.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return Vb.get(this)}static get none(){return new t}addEventListener(e,r){if(!tp.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");tp.get(this).push(r)}removeEventListener(e,r){if(!tp.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=tp.get(this),s=n.indexOf(r);s>-1&&n.splice(s,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 z7(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=tp.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),Vb.set(t,!0)}o(z7,"abortSignal");var FM=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}},UM=class{static{o(this,"AbortController")}constructor(e){if(this._signal=new ng,!!e){Array.isArray(e)||(e=arguments);for(let r of e)r.aborted?this.abort():r.addEventListener("abort",()=>{this.abort()})}}get signal(){return this._signal}abort(){z7(this._signal)}static timeout(e){let r=new ng,n=setTimeout(z7,e,r);return typeof n.unref=="function"&&n.unref(),r}};sg.AbortController=UM;sg.AbortError=FM;sg.AbortSignal=ng});var j7=m(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});var V1e
Line truncated
|
||||
Polling from: ${r.config.operationLocation}
|
||||
Operation status: ${d}
|
||||
Polling status: ${X7.includes(d)?"Stopped":"Running"}`),d==="succeeded"){let A=a(u,r);if(A!==void 0)return{response:await e(A).catch(j7({state:r,stateProxy:n,isOperationError:c})),status:d}}return{response:u,status:d}}o(nFe,"pollOperationHelper");async function ree(t){let{poll:e,state:r,stateProxy:n,options:s,getOperationStatus:i,getResourceLocation:a,getOperationLocation:c,isOperationError:l,withOperationLocation:u,getPollingInterval:d,processResult:A,getError:p,updateState:f,setDelay:h,isDone:g,setErrorAsResult:y}=t,{operationLocation:E}=r.config;if(E!==void 0){let{response:C,status:I}=await nFe({poll:e,getOperationStatus:i,state:r,stateProxy:n,operationLocation:E,getResourceLocation:a,isOperationError:l,options:s});if(eee({status:I,response:C,state:r,stateProxy:n,isDone:g,processResult:A,getError:p,setErrorAsResult:y}),!X7.includes(I)){let B=d?.(C);B&&h(B);let N=c?.(C,r);if(N!==void 0){let Q=E!==N;r.config.operationLocation=N,u?.(N,Q)}else u?.(E,!1)}f?.(r,C)}}o(ree,"pollOperation");function nee(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}o(nee,"getOperationLocationPollingUrl");function see(t){return t.headers.location}o(see,"getLocationHeader");function iee(t){return t.headers["operation-location"]}o(iee,"getOperationLocationHeader");function oee(t){return t.headers["azure-asyncoperation"]}o(oee,"getAzureAsyncOperationHeader");function sFe(t){let{location:e,requestMethod:r,requestPath:n,resourceLocationConfig:s}=t;switch(r){case"PUT":return n;case"DELETE":return;default:switch(s){case"azure-async-operation":return;case"original-uri":return n;default:return e}}}o(sFe,"findResourceLocation");function aee(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:s}=t,i=iee(e),a=oee(e),c=nee({operationLocation:i,azureAsyncOperation:a}),l=see(e),u=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:sFe({requestMethod:u,location:l,requestPath:n,resourceLocationConfig:s})}:l!==void 0?{mode:"ResourceLocation",operationLocation:l}:u==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}o(aee,"inferLroMode");function cee(t){let{status:e,statusCode:r}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return $M(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return Nu.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(cee,"transformStatus");function iFe(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return cee({status:r,statusCode:t.statusCode})}o(iFe,"getStatus");function oFe(t){var e,r;let{properties:n,provisioningState:s}=(e=t.body)!==null&&e!==void 0?e:{},i=(r=n?.provisioningState)!==null&&r!==void 0?r:s;return cee({status:i,statusCode:t.statusCode})}o(oFe,"getProvisioningState");function $M(t){return t===202?"running":t<300?"succeeded":"failed"}o($M,"toOperationStatus");function lee({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?aFe(new Date(e)):r*1e3}}o(lee,"parseRetryAfter");function uee(t){let e=t.flatResponse.error;if(!e){Nu.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Nu.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}o(uee,"getErrorFromResponse");function aFe(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}o(aFe,"calculatePollingIntervalFromDate");function dee(t){let{response:e,state:r,operationLocation:n}=t;function s(){var a;switch((a=r.config.metadata)===null||a===void 0?void 0:a.mode){case void 0:return $M(e.rawResponse.statusCode);case"Body":return YM(e,r);default:return"running"}}o(s,"helper");let i=s();return i==="running"&&n===void 0?"succeeded":i}o(dee,"getStatusFromInitialResponse");async function cFe(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:s,setErrorAsResult:i}=t;return tee({init:o(async()=>{let a=await s.sendInitialRequest(),c=aee({rawResponse:a.rawResponse,requestPath:s.requestPath,requestMethod:s.requestMethod,resourceLocationConfig:r});return Object.assign({response:a,operationLocation:c?.operationLocation,resourceLocation:c?.resourceLocation},c?.mode?{metadata:{mode:c.mode}}:{})},"init"),stateProxy:e,processResult:n?({flatResponse:a},c)=>n(a,c):({flatResponse:a})=>a,getOperationStatus:dee,setErrorAsResult:i})}o(cFe,"initHttpOperation");function Aee({rawResponse:t},e){var r;switch((r=e.config.metadata)===null||r===void 0?void 0:r.mode){case"OperationLocation":return nee({operatLine truncated
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(s){case 0:a=i,s=1;break;case 1:r[n++]=a<<2|(i&48)>>4,a=i,s=2;break;case 2:r[n++]=(a&15)<<4|(i&60)>>2,a=i,s=3;break;case 3:r[n++]=(a&3)<<6|i,s=0;break}}if(s==1)throw Error("invalid base64 string.");return r.subarray(0,n)}o(zFe,"base64decode");op.base64decode=zFe;function JFe(t){let e="",r=0,n,s=0;for(let i=0;i<t.length;i++)switch(n=t[i],r){case 0:e+=La[n>>2],s=(n&3)<<4,r=1;break;case 1:e+=La[s|n>>4],s=(n&15)<<2,r=2;break;case 2:e+=La[s|n>>6],e+=La[n&63],r=0;break}return r&&(e+=La[s],e+="=",r==1&&(e+="=")),e}o(JFe,"base64encode");op.base64encode=JFe});var Gee=m(cw=>{"use strict";Object.defineProperty(cw,"__esModule",{value:!0});cw.utf8read=void 0;var sL=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function $Fe(t){if(t.length<1)return"";let e=0,r=[],n=[],s=0,i,a=t.length;for(;e<a;)i=t[e++],i<128?n[s++]=i:i>191&&i<224?n[s++]=(i&31)<<6|t[e++]&63:i>239&&i<365?(i=((i&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[s++]=55296+(i>>10),n[s++]=56320+(i&1023)):n[s++]=(i&15)<<12|(t[e++]&63)<<6|t[e++]&63,s>8191&&(r.push(sL(n)),s=0);return r.length?(s&&r.push(sL(n.slice(0,s))),r.join("")):sL(n.slice(0,s))}o($Fe,"utf8read");cw.utf8read=$Fe});var dg=m(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.WireType=xo.mergeBinaryOptions=xo.UnknownFieldHandler=void 0;var YFe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,s,i,a)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:s,wireType:i,data:a})},t.onWrite=(r,n,s)=>{for(let{no:i,wireType:a,data:c}of t.list(n))s.tag(i,a).raw(c)},t.list=(r,n)=>{if(e(r)){let s=r[t.symbol];return n?s.filter(i=>i.no==n):s}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=o(r=>r&&Array.isArray(r[t.symbol]),"is")})(YFe=xo.UnknownFieldHandler||(xo.UnknownFieldHandler={}));function WFe(t,e){return Object.assign(Object.assign({},t),e)}o(WFe,"mergeBinaryOptions");xo.mergeBinaryOptions=WFe;var jFe;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(jFe=xo.WireType||(xo.WireType={}))});var uw=m(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.varint32read=xn.varint32write=xn.int64toString=xn.int64fromString=xn.varint64write=xn.varint64read=void 0;function KFe(){let t=0,e=0;for(let n=0;n<28;n+=7){let s=this.buf[this.pos++];if(t|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let s=this.buf[this.pos++];if(e|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}o(KFe,"varint64read");xn.varint64read=KFe;function XFe(t,e,r){for(let i=0;i<28;i=i+7){let a=t>>>i,c=!(!(a>>>7)&&e==0),l=(c?a|128:a)&255;if(r.push(l),!c)return}let n=t>>>28&15|(e&7)<<4,s=e>>3!=0;if(r.push((s?n|128:n)&255),!!s){for(let i=3;i<31;i=i+7){let a=e>>>i,c=!!(a>>>7),l=(c?a|128:a)&255;if(r.push(l),!c)return}r.push(e>>>31&1)}}o(XFe,"varint64write");xn.varint64write=XFe;var lw=65536*65536;function ZFe(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,s=0;function i(a,c){let l=Number(t.slice(a,c));s*=r,n=n*r+l,n>=lw&&(s=s+(n/lw|0),n=n%lw)}return o(i,"add1e6digit"),i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[e,n,s]}o(ZFe,"int64fromString");xn.int64fromString=ZFe;function eUe(t,e){if(e>>>0<=2097151)return""+(lw*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,s=e>>16&65535,i=r+n*6777216+s*6710656,a=n+s*8147497,c=s*2,l=1e7;i>=l&&(a+=Math.floor(i/l),i%=l),a>=l&&(c+=Math.floor(a/l),a%=l);function u(d,A){let p=d?String(d):"";return A?"0000000".slice(p.length)+p:p}return o(u,"decimalFrom1e7"),u(c,0)+u(a,c)+u(i,1)}o(eUe,"int64toString");xn.int64toString=eUe;function tUe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}o(tUe,"varint32write");xn.varint32write=tUe;function rUe(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}o(rUe,"varint32read");xn.varint32read=rUe});var Jc=m(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.PbLong=zc.PbULong=zc.detectBi=void 0;var Ag=uw(),je;function Hee(){let t=new DataView(new ArrayBuffer(8));je=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("922337203685477580
Line truncated
|
||||
`)}};Mw.RpcError=vL});var _L=m(Fw=>{"use strict";Object.defineProperty(Fw,"__esModule",{value:!0});Fw.mergeRpcOptions=void 0;var Ite=Ut();function w2e(t,e){if(!e)return t;let r={};Lw(t,r),Lw(e,r);for(let n of Object.keys(e)){let s=e[n];switch(n){case"jsonOptions":r.jsonOptions=Ite.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=Ite.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},Lw(t.meta,r.meta),Lw(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(s):s.concat();break}}return r}o(w2e,"mergeRpcOptions");Fw.mergeRpcOptions=w2e;function Lw(t,e){if(!t)return;let r=e;for(let[n,s]of Object.entries(t))s instanceof Date?r[n]=new Date(s.getTime()):Array.isArray(s)?r[n]=s.concat():r[n]=s}o(Lw,"copy")});var DL=m(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.Deferred=vu.DeferredState=void 0;var To;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(To=vu.DeferredState||(vu.DeferredState={}));var kL=class{static{o(this,"Deferred")}constructor(e=!0){this._state=To.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==To.PENDING)throw new Error(`cannot resolve ${To[this.state].toLowerCase()}`);this._resolve(e),this._state=To.RESOLVED}reject(e){if(this.state!==To.PENDING)throw new Error(`cannot reject ${To[this.state].toLowerCase()}`);this._reject(e),this._state=To.REJECTED}resolvePending(e){this._state===To.PENDING&&this.resolve(e)}rejectPending(e){this._state===To.PENDING&&this.reject(e)}};vu.Deferred=kL});var ML=m(Uw=>{"use strict";Object.defineProperty(Uw,"__esModule",{value:!0});Uw.RpcOutputStreamController=void 0;var Bte=DL(),Pu=Ut(),OL=class{static{o(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){Pu.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){Pu.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){Pu.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){Pu.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:o(()=>{let e=this._itState;Pu.assert(e,"bad state"),Pu.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new Bte.Deferred,e.p.promise)},"next")}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;Pu.assert(n.state==Bte.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};Uw.RpcOutputStreamController=OL});var FL=m(pp=>{"use strict";var S2e=pp&&pp.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(pp,"__esModule",{value:!0});pp.UnaryCall=void 0;var LL=class{static{o(this,"UnaryCall")}constructor(e,r,n,s,i,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.response=i,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return S2e(this,void 0,void 0,function*(){let[e,r,n,s]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:s}})}};pp.UnaryCall=LL});var qL=m(fp=>{"use strict";var N2e=fp&&fp.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function
Line truncated
|
||||
Polling status: ${eee.includes(d)?"Stopped":"Running"}`),d==="succeeded"){let A=a(u,r);if(A!==void 0)return{response:await e(A).catch(X7({state:r,stateProxy:n,isOperationError:c})),status:d}}return{response:u,status:d}}o(oFe,"pollOperationHelper");async function see(t){let{poll:e,state:r,stateProxy:n,options:s,getOperationStatus:i,getResourceLocation:a,getOperationLocation:c,isOperationError:l,withOperationLocation:u,getPollingInterval:d,processResult:A,getError:p,updateState:f,setDelay:h,isDone:g,setErrorAsResult:y}=t,{operationLocation:E}=r.config;if(E!==void 0){let{response:C,status:I}=await oFe({poll:e,getOperationStatus:i,state:r,stateProxy:n,operationLocation:E,getResourceLocation:a,isOperationError:l,options:s});if(ree({status:I,response:C,state:r,stateProxy:n,isDone:g,processResult:A,getError:p,setErrorAsResult:y}),!eee.includes(I)){let B=d?.(C);B&&h(B);let N=c?.(C,r);if(N!==void 0){let Q=E!==N;r.config.operationLocation=N,u?.(N,Q)}else u?.(E,!1)}f?.(r,C)}}o(see,"pollOperation");function iee(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}o(iee,"getOperationLocationPollingUrl");function oee(t){return t.headers.location}o(oee,"getLocationHeader");function aee(t){return t.headers["operation-location"]}o(aee,"getOperationLocationHeader");function cee(t){return t.headers["azure-asyncoperation"]}o(cee,"getAzureAsyncOperationHeader");function aFe(t){let{location:e,requestMethod:r,requestPath:n,resourceLocationConfig:s}=t;switch(r){case"PUT":return n;case"DELETE":return;default:switch(s){case"azure-async-operation":return;case"original-uri":return n;default:return e}}}o(aFe,"findResourceLocation");function lee(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:s}=t,i=aee(e),a=cee(e),c=iee({operationLocation:i,azureAsyncOperation:a}),l=oee(e),u=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:aFe({requestMethod:u,location:l,requestPath:n,resourceLocationConfig:s})}:l!==void 0?{mode:"ResourceLocation",operationLocation:l}:u==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}o(lee,"inferLroMode");function uee(t){let{status:e,statusCode:r}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return WM(r);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return Nu.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(uee,"transformStatus");function cFe(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return uee({status:r,statusCode:t.statusCode})}o(cFe,"getStatus");function lFe(t){var e,r;let{properties:n,provisioningState:s}=(e=t.body)!==null&&e!==void 0?e:{},i=(r=n?.provisioningState)!==null&&r!==void 0?r:s;return uee({status:i,statusCode:t.statusCode})}o(lFe,"getProvisioningState");function WM(t){return t===202?"running":t<300?"succeeded":"failed"}o(WM,"toOperationStatus");function dee({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?uFe(new Date(e)):r*1e3}}o(dee,"parseRetryAfter");function Aee(t){let e=t.flatResponse.error;if(!e){Nu.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Nu.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}o(Aee,"getErrorFromResponse");function uFe(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}o(uFe,"calculatePollingIntervalFromDate");function pee(t){let{response:e,state:r,operationLocation:n}=t;function s(){var a;switch((a=r.config.metadata)===null||a===void 0?void 0:a.mode){case void 0:return WM(e.rawResponse.statusCode);case"Body":return jM(e,r);default:return"running"}}o(s,"helper");let i=s();return i==="running"&&n===void 0?"succeeded":i}o(pee,"getStatusFromInitialResponse");async function dFe(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:s,setErrorAsResult:i}=t;return nee({init:o(async()=>{let a=await s.sendInitialRequest(),c=lee({rawResponse:a.rawResponse,requestPath:s.requestPath,requestMethod:s.requestMethod,resourceLocationConfig:r});return Object.assign({response:a,operationLocation:c?.operationLocation,resourceLocation:c?.resourceLocation},c?.mode?{metadata:{mode:c.mode}}:{})},"init"),stateProxy:e,processResult:n?({flatResponse:a},c)=>n(a,c):({flatResponse:a})=>a,getOperationStatus:pee,setErrorAsResult:i})}o(dFe,"initHttpOperation");function fee({rawResponse:t},e){var r;switch((r=e.config.metadata)===null||r===void 0?void 0:r.mode){case"OperationLocation":return iee({operLine truncated
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(s){case 0:a=i,s=1;break;case 1:r[n++]=a<<2|(i&48)>>4,a=i,s=2;break;case 2:r[n++]=(a&15)<<4|(i&60)>>2,a=i,s=3;break;case 3:r[n++]=(a&3)<<6|i,s=0;break}}if(s==1)throw Error("invalid base64 string.");return r.subarray(0,n)}o(YFe,"base64decode");ap.base64decode=YFe;function WFe(t){let e="",r=0,n,s=0;for(let i=0;i<t.length;i++)switch(n=t[i],r){case 0:e+=La[n>>2],s=(n&3)<<4,r=1;break;case 1:e+=La[s|n>>4],s=(n&15)<<2,r=2;break;case 2:e+=La[s|n>>6],e+=La[n&63],r=0;break}return r&&(e+=La[s],e+="=",r==1&&(e+="=")),e}o(WFe,"base64encode");ap.base64encode=WFe});var Vee=m(lw=>{"use strict";Object.defineProperty(lw,"__esModule",{value:!0});lw.utf8read=void 0;var oL=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function jFe(t){if(t.length<1)return"";let e=0,r=[],n=[],s=0,i,a=t.length;for(;e<a;)i=t[e++],i<128?n[s++]=i:i>191&&i<224?n[s++]=(i&31)<<6|t[e++]&63:i>239&&i<365?(i=((i&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[s++]=55296+(i>>10),n[s++]=56320+(i&1023)):n[s++]=(i&15)<<12|(t[e++]&63)<<6|t[e++]&63,s>8191&&(r.push(oL(n)),s=0);return r.length?(s&&r.push(oL(n.slice(0,s))),r.join("")):oL(n.slice(0,s))}o(jFe,"utf8read");lw.utf8read=jFe});var Ag=m(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.WireType=xo.mergeBinaryOptions=xo.UnknownFieldHandler=void 0;var KFe;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,s,i,a)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:s,wireType:i,data:a})},t.onWrite=(r,n,s)=>{for(let{no:i,wireType:a,data:c}of t.list(n))s.tag(i,a).raw(c)},t.list=(r,n)=>{if(e(r)){let s=r[t.symbol];return n?s.filter(i=>i.no==n):s}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=o(r=>r&&Array.isArray(r[t.symbol]),"is")})(KFe=xo.UnknownFieldHandler||(xo.UnknownFieldHandler={}));function XFe(t,e){return Object.assign(Object.assign({},t),e)}o(XFe,"mergeBinaryOptions");xo.mergeBinaryOptions=XFe;var ZFe;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(ZFe=xo.WireType||(xo.WireType={}))});var dw=m(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.varint32read=xn.varint32write=xn.int64toString=xn.int64fromString=xn.varint64write=xn.varint64read=void 0;function eUe(){let t=0,e=0;for(let n=0;n<28;n+=7){let s=this.buf[this.pos++];if(t|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[t,e]}let r=this.buf[this.pos++];if(t|=(r&15)<<28,e=(r&112)>>4,(r&128)==0)return this.assertBounds(),[t,e];for(let n=3;n<=31;n+=7){let s=this.buf[this.pos++];if(e|=(s&127)<<n,(s&128)==0)return this.assertBounds(),[t,e]}throw new Error("invalid varint")}o(eUe,"varint64read");xn.varint64read=eUe;function tUe(t,e,r){for(let i=0;i<28;i=i+7){let a=t>>>i,c=!(!(a>>>7)&&e==0),l=(c?a|128:a)&255;if(r.push(l),!c)return}let n=t>>>28&15|(e&7)<<4,s=e>>3!=0;if(r.push((s?n|128:n)&255),!!s){for(let i=3;i<31;i=i+7){let a=e>>>i,c=!!(a>>>7),l=(c?a|128:a)&255;if(r.push(l),!c)return}r.push(e>>>31&1)}}o(tUe,"varint64write");xn.varint64write=tUe;var uw=65536*65536;function rUe(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,s=0;function i(a,c){let l=Number(t.slice(a,c));s*=r,n=n*r+l,n>=uw&&(s=s+(n/uw|0),n=n%uw)}return o(i,"add1e6digit"),i(-24,-18),i(-18,-12),i(-12,-6),i(-6),[e,n,s]}o(rUe,"int64fromString");xn.int64fromString=rUe;function nUe(t,e){if(e>>>0<=2097151)return""+(uw*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,s=e>>16&65535,i=r+n*6777216+s*6710656,a=n+s*8147497,c=s*2,l=1e7;i>=l&&(a+=Math.floor(i/l),i%=l),a>=l&&(c+=Math.floor(a/l),a%=l);function u(d,A){let p=d?String(d):"";return A?"0000000".slice(p.length)+p:p}return o(u,"decimalFrom1e7"),u(c,0)+u(a,c)+u(i,1)}o(nUe,"int64toString");xn.int64toString=nUe;function sUe(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let r=0;r<9;r++)e.push(t&127|128),t=t>>7;e.push(1)}}o(sUe,"varint32write");xn.varint32write=sUe;function iUe(){let t=this.buf[this.pos++],e=t&127;if((t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,(t&128)==0)return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,(t&128)==0)return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let r=5;(t&128)!==0&&r<10;r++)t=this.buf[this.pos++];if((t&128)!=0)throw new Error("invalid varint");return this.assertBounds(),e>>>0}o(iUe,"varint32read");xn.varint32read=iUe});var Jc=m(zc=>{"use strict";Object.defineProperty(zc,"__esModule",{value:!0});zc.PbLong=zc.PbULong=zc.detectBi=void 0;var pg=dw(),Ke;function zee(){let t=new DataView(new ArrayBuffer(8));Ke=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("922337203685477580
Line truncated
|
||||
`)}};Lw.RpcError=_L});var DL=m(Uw=>{"use strict";Object.defineProperty(Uw,"__esModule",{value:!0});Uw.mergeRpcOptions=void 0;var bte=Ut();function x2e(t,e){if(!e)return t;let r={};Fw(t,r),Fw(e,r);for(let n of Object.keys(e)){let s=e[n];switch(n){case"jsonOptions":r.jsonOptions=bte.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=bte.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},Fw(t.meta,r.meta),Fw(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(s):s.concat();break}}return r}o(x2e,"mergeRpcOptions");Uw.mergeRpcOptions=x2e;function Fw(t,e){if(!t)return;let r=e;for(let[n,s]of Object.entries(t))s instanceof Date?r[n]=new Date(s.getTime()):Array.isArray(s)?r[n]=s.concat():r[n]=s}o(Fw,"copy")});var ML=m(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.Deferred=vu.DeferredState=void 0;var To;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(To=vu.DeferredState||(vu.DeferredState={}));var OL=class{static{o(this,"Deferred")}constructor(e=!0){this._state=To.PENDING,this._promise=new Promise((r,n)=>{this._resolve=r,this._reject=n}),e&&this._promise.catch(r=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==To.PENDING)throw new Error(`cannot resolve ${To[this.state].toLowerCase()}`);this._resolve(e),this._state=To.RESOLVED}reject(e){if(this.state!==To.PENDING)throw new Error(`cannot reject ${To[this.state].toLowerCase()}`);this._reject(e),this._state=To.REJECTED}resolvePending(e){this._state===To.PENDING&&this.resolve(e)}rejectPending(e){this._state===To.PENDING&&this.reject(e)}};vu.Deferred=OL});var FL=m(qw=>{"use strict";Object.defineProperty(qw,"__esModule",{value:!0});qw.RpcOutputStreamController=void 0;var wte=ML(),Pu=Ut(),LL=class{static{o(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1,this._itState={q:[]}}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,r){return r.push(e),()=>{let n=r.indexOf(e);n>=0&&r.splice(n,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,r,n){Pu.assert((e?1:0)+(r?1:0)+(n?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),r&&this.notifyError(r),n&&this.notifyComplete()}notifyMessage(e){Pu.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(e,void 0,!1))}notifyError(e){Pu.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(r=>r(e)),this._lis.nxt.forEach(r=>r(void 0,e,!1)),this.clearLis()}notifyComplete(){Pu.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:o(()=>{let e=this._itState;Pu.assert(e,"bad state"),Pu.assert(!e.p,"iterator contract broken");let r=e.q.shift();return r?"value"in r?Promise.resolve(r):Promise.reject(r):(e.p=new wte.Deferred,e.p.promise)},"next")}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;Pu.assert(n.state==wte.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};qw.RpcOutputStreamController=LL});var qL=m(fp=>{"use strict";var Q2e=fp&&fp.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(fp,"__esModule",{value:!0});fp.UnaryCall=void 0;var UL=class{static{o(this,"UnaryCall")}constructor(e,r,n,s,i,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.response=i,this.status=a,this.trailers=c}then(e,r){return this.promiseFinished().then(n=>e?Promise.resolve(e(n)):n,n=>r?Promise.resolve(r(n)):Promise.reject(n))}promiseFinished(){return Q2e(this,void 0,void 0,function*(){let[e,r,n,s]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:r,status:n,trailers:s}})}};fp.UnaryCall=UL});var HL=m(hp=>{"use strict";var R2e=hp&&hp.__awaiter||function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function
Line truncated
|
||||
You can add a runtime option to disable the check or this warning:
|
||||
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}o(Qze,"logUnexpecedPropertyAccessOnce");function Rze(){Object.keys(I0).forEach(function(t){delete I0[t]})}o(Rze,"resetLoggedProperties")});var b0=m(ko=>{"use strict";ko.__esModule=!0;ko.HandlebarsEnvironment=aF;function Nse(t){return t&&t.__esModule?t:{default:t}}o(Nse,"_interopRequireDefault");var Lu=nn(),Tze=ds(),iF=Nse(Tze),vze=tF(),Pze=Bse(),_ze=nF(),B0=Nse(_ze),kze=sF(),Dze="4.7.9";ko.VERSION=Dze;var Oze=8;ko.COMPILER_REVISION=Oze;var Mze=7;ko.LAST_COMPATIBLE_COMPILER_REVISION=Mze;var Lze={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"};ko.REVISION_CHANGES=Lze;var oF="[object Object]";function aF(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},vze.registerDefaultHelpers(this),Pze.registerDefaultDecorators(this)}o(aF,"HandlebarsEnvironment");aF.prototype={constructor:aF,logger:B0.default,log:B0.default.log,registerHelper:o(function(e,r){if(Lu.toString.call(e)===oF){if(r)throw new iF.default("Arg not supported with multiple helpers");Lu.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:o(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:o(function(e,r){if(Lu.toString.call(e)===oF)Lu.extend(this.partials,e);else{if(typeof r>"u")throw new iF.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:o(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:o(function(e,r){if(Lu.toString.call(e)===oF){if(r)throw new iF.default("Arg not supported with multiple decorators");Lu.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:o(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:o(function(){kze.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var Fze=B0.default.log;ko.log=Fze;ko.createFrame=Lu.createFrame;ko.logger=B0.default});var Qse=m((w0,xse)=>{"use strict";w0.__esModule=!0;function cF(t){this.string=t}o(cF,"SafeString");cF.prototype.toString=cF.prototype.toHTML=function(){return""+this.string};w0.default=cF;xse.exports=w0.default});var Rse=m(lF=>{"use strict";lF.__esModule=!0;lF.wrapHelper=Uze;function Uze(t,e){if(typeof t!="function")return t;var r=o(function(){var s=arguments[arguments.length-1];return arguments[arguments.length-1]=e(s),t.apply(this,arguments)},"wrapper");return r}o(Uze,"wrapHelper")});var Dse=m(jc=>{"use strict";jc.__esModule=!0;jc.checkRevision=Jze;jc.template=$ze;jc.wrapProgram=S0;jc.resolvePartial=Yze;jc.invokePartial=Wze;jc.noop=_se;function qze(t){return t&&t.__esModule?t:{default:t}}o(qze,"_interopRequireDefault");function Gze(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}o(Gze,"_interopRequireWildcard");var Hze=nn(),xp=Gze(Hze),Vze=ds(),qa=qze(Vze),Ga=b0(),Tse=tF(),zze=Rse(),vse=sF();function Jze(t){var e=t&&t[0]||1,r=Ga.COMPILER_REVISION;if(!(e>=Ga.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Ga.COMPILER_REVISION))if(e<Ga.LAST_COMPATIBLE_COMPILER_REVISION){var n=Ga.REVISION_CHANGES[r],s=Ga.REVISION_CHANGES[e];throw new qa.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+s+").")}else throw new qa.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}o(Jze,"checkRevision");function $ze(t,e){if(!e)throw new qa.default("No environment passed to template");if(!t||!t.main)throw new qa.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(a,c,l){l.hash&&(c=xp.extend({},c,l.hash),l.ids&&(l.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,c,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var u=e.VM.invokePartial.call(this,a,c,l);if(u==null&&e.compile&&(l.partials[l.name]=e.compile(a,t.compilerOptions,e),u=l.partials[l.name](c,l)),u!=null){if(l.indent){for(var d=u.split(`
|
||||
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}o(vze,"logUnexpecedPropertyAccessOnce");function Pze(){Object.keys(B0).forEach(function(t){delete B0[t]})}o(Pze,"resetLoggedProperties")});var w0=m(ko=>{"use strict";ko.__esModule=!0;ko.HandlebarsEnvironment=lF;function Qse(t){return t&&t.__esModule?t:{default:t}}o(Qse,"_interopRequireDefault");var Lu=nn(),_ze=ds(),aF=Qse(_ze),kze=nF(),Dze=wse(),Oze=iF(),b0=Qse(Oze),Mze=oF(),Lze="4.7.9";ko.VERSION=Lze;var Fze=8;ko.COMPILER_REVISION=Fze;var Uze=7;ko.LAST_COMPATIBLE_COMPILER_REVISION=Uze;var qze={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"};ko.REVISION_CHANGES=qze;var cF="[object Object]";function lF(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},kze.registerDefaultHelpers(this),Dze.registerDefaultDecorators(this)}o(lF,"HandlebarsEnvironment");lF.prototype={constructor:lF,logger:b0.default,log:b0.default.log,registerHelper:o(function(e,r){if(Lu.toString.call(e)===cF){if(r)throw new aF.default("Arg not supported with multiple helpers");Lu.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:o(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:o(function(e,r){if(Lu.toString.call(e)===cF)Lu.extend(this.partials,e);else{if(typeof r>"u")throw new aF.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:o(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:o(function(e,r){if(Lu.toString.call(e)===cF){if(r)throw new aF.default("Arg not supported with multiple decorators");Lu.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:o(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:o(function(){Mze.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var Gze=b0.default.log;ko.log=Gze;ko.createFrame=Lu.createFrame;ko.logger=b0.default});var Tse=m((S0,Rse)=>{"use strict";S0.__esModule=!0;function uF(t){this.string=t}o(uF,"SafeString");uF.prototype.toString=uF.prototype.toHTML=function(){return""+this.string};S0.default=uF;Rse.exports=S0.default});var vse=m(dF=>{"use strict";dF.__esModule=!0;dF.wrapHelper=Hze;function Hze(t,e){if(typeof t!="function")return t;var r=o(function(){var s=arguments[arguments.length-1];return arguments[arguments.length-1]=e(s),t.apply(this,arguments)},"wrapper");return r}o(Hze,"wrapHelper")});var Mse=m(jc=>{"use strict";jc.__esModule=!0;jc.checkRevision=Wze;jc.template=jze;jc.wrapProgram=N0;jc.resolvePartial=Kze;jc.invokePartial=Xze;jc.noop=Dse;function Vze(t){return t&&t.__esModule?t:{default:t}}o(Vze,"_interopRequireDefault");function zze(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}o(zze,"_interopRequireWildcard");var Jze=nn(),Qp=zze(Jze),$ze=ds(),qa=Vze($ze),Ga=w0(),Pse=nF(),Yze=vse(),_se=oF();function Wze(t){var e=t&&t[0]||1,r=Ga.COMPILER_REVISION;if(!(e>=Ga.LAST_COMPATIBLE_COMPILER_REVISION&&e<=Ga.COMPILER_REVISION))if(e<Ga.LAST_COMPATIBLE_COMPILER_REVISION){var n=Ga.REVISION_CHANGES[r],s=Ga.REVISION_CHANGES[e];throw new qa.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+s+").")}else throw new qa.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}o(Wze,"checkRevision");function jze(t,e){if(!e)throw new qa.default("No environment passed to template");if(!t||!t.main)throw new qa.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function n(a,c,l){l.hash&&(c=Qp.extend({},c,l.hash),l.ids&&(l.ids[0]=!0)),a=e.VM.resolvePartial.call(this,a,c,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var u=e.VM.invokePartial.call(this,a,c,l);if(u==null&&e.compile&&(l.partials[l.name]=e.compile(a,t.compilerOptions,e),u=l.partials[l.name](c,l)),u!=null){if(l.indent){for(var d=u.split(`
|
||||
`),A=0,p=d.length;A<p&&!(!d[A]&&A+1===p);A++)d[A]=l.indent+d[A];u=d.join(`
|
||||
`)}return u}else throw new qa.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}o(n,"invokePartialWrapper");var s={strict:o(function(c,l,u){if(!c||!(l in c))throw new qa.default('"'+l+'" not defined in '+c,{loc:u});return s.lookupProperty(c,l)},"strict"),lookupProperty:o(function(c,l){var u=c[l];if(u==null||Object.prototype.hasOwnProperty.call(c,l)||vse.resultIsAllowed(u,s.protoAccessControl,l))return u},"lookupProperty"),lookup:o(function(c,l){for(var u=c.length,d=0;d<u;d++){var A=c[d]&&s.lookupProperty(c[d],l);if(A!=null)return A}},"lookup"),lambda:o(function(c,l){return typeof c=="function"?c.call(l):c},"lambda"),escapeExpression:xp.escapeExpression,invokePartial:n,fn:o(function(c){var l=t[c];return l.decorator=t[c+"_d"],l},"fn"),programs:[],program:o(function(c,l,u,d,A){var p=this.programs[c],f=this.fn(c);return l||A||d||u?p=S0(this,c,f,l,u,d,A):p||(p=this.programs[c]=S0(this,c,f)),p},"program"),data:o(function(c,l){for(;c&&l--;)c=c._parent;return c},"data"),mergeIfNeeded:o(function(c,l){var u=c||l;return c&&l&&c!==l&&(u=xp.extend({},l,c)),u},"mergeIfNeeded"),nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function i(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=c.data;i._setup(c),!c.partial&&t.useData&&(l=jze(a,l));var u=void 0,d=t.useBlockParams?[]:void 0;t.useDepths&&(c.depths?u=a!=c.depths[0]?[a].concat(c.depths):c.depths:u=[a]);function A(p){return""+t.main(s,p,s.helpers,s.partials,l,d,u)}return o(A,"main"),A=kse(t.main,A,s,c.depths||[],l,d),A(a,c)}return o(i,"ret"),i.isTop=!0,i._setup=function(a){if(a.partial)s.protoAccessControl=a.protoAccessControl,s.helpers=a.helpers,s.partials=a.partials,s.decorators=a.decorators,s.hooks=a.hooks;else{var c={};Pse(c,e.helpers,s),Pse(c,a.helpers,s),s.helpers=c,t.usePartial&&(s.partials=s.mergeIfNeeded(a.partials,e.partials)),(t.usePartial||t.useDecorators)&&(s.decorators=xp.extend({},e.decorators,a.decorators)),s.hooks={},s.protoAccessControl=vse.createProtoAccessControl(a);var l=a.allowCallsToHelperMissing||r;Tse.moveHelperToHooks(s,"helperMissing",l),Tse.moveHelperToHooks(s,"blockHelperMissing",l)}},i._child=function(a,c,l,u){if(t.useBlockParams&&!l)throw new qa.default("must pass block params");if(t.useDepths&&!u)throw new qa.default("must pass parent depths");return S0(s,a,t[a],c,0,l,u)},i}o($ze,"template");function S0(t,e,r,n,s,i,a){function c(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=a;return a&&l!=a[0]&&!(l===t.nullContext&&a[0]===null)&&(d=[l].concat(a)),r(t,l,t.helpers,t.partials,u.data||n,i&&[u.blockParams].concat(i),d)}return o(c,"prog"),c=kse(r,c,t,a,n,i),c.program=e,c.depth=a?a.length:0,c.blockParams=s||0,c}o(S0,"wrapProgram");function Yze(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=N0(r.partials,t)):r.name==="@partial-block"?t=N0(r.data,"partial-block"):t=N0(r.partials,r.name),t}o(Yze,"resolvePartial");function Wze(t,e,r){var n=N0(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var s=void 0;if(r.fn&&r.fn!==_se&&(function(){r.data=Ga.createFrame(r.data);var i=r.fn;s=r.data["partial-block"]=o(function(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Ga.createFrame(l.data),l.data["partial-block"]=n,i(c,l)},"partialBlockWrapper"),i.partials&&(r.partials=xp.extend({},r.partials,i.partials))})(),t===void 0&&s&&(t=s),t===void 0)throw new qa.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}o(Wze,"invokePartial");function _se(){return""}o(_se,"noop");function N0(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}o(N0,"lookupOwnProperty");function jze(t,e){return(!e||!("root"in e))&&(e=e?Ga.createFrame(e):{},e.root=t),e}o(jze,"initData");function kse(t,e,r,n,s,i){if(t.decorator){var a={};e=t.decorator(e,a,r,n&&n[0],s,i,n),xp.extend(e,a)}return e}o(kse,"executeDecorators");function Pse(t,e,r){e&&Object.keys(e).forEach(function(n){var s=e[n];t[n]=Kze(s,r)})}o(Pse,"addHelpers");function Kze(t,e){var r=e.lookupProperty;return zze.wrapHelper(t,function(n){return n.lookupProperty=r,n})}o(Kze,"passLookupPropertyOption")});var uF=m((x0,Ose)=>{"use strict";x0.__esModule=!0;x0.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};Ose.exports=x0.default});var qse=m((Q0,Use)=>{"use strict";Q0.__esModule=!0;function AF(t){return t&&t.__esModule?t:{default:t}}o(AF,"_interopRequireDefault");function pF(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}o(pF,"_interopRequireWildcard");var Xze=b0(),Mse=pF(Xze),Zze=Qse(),eJe=AF(Zze),tJe=ds(),rJe=AF(tJe),nJe=nn(),dF=pF(nJe),sJe=Dse
Line truncated
|
||||
`)}return u}else throw new qa.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}o(n,"invokePartialWrapper");var s={strict:o(function(c,l,u){if(!c||!(l in c))throw new qa.default('"'+l+'" not defined in '+c,{loc:u});return s.lookupProperty(c,l)},"strict"),lookupProperty:o(function(c,l){var u=c[l];if(u==null||Object.prototype.hasOwnProperty.call(c,l)||_se.resultIsAllowed(u,s.protoAccessControl,l))return u},"lookupProperty"),lookup:o(function(c,l){for(var u=c.length,d=0;d<u;d++){var A=c[d]&&s.lookupProperty(c[d],l);if(A!=null)return A}},"lookup"),lambda:o(function(c,l){return typeof c=="function"?c.call(l):c},"lambda"),escapeExpression:Qp.escapeExpression,invokePartial:n,fn:o(function(c){var l=t[c];return l.decorator=t[c+"_d"],l},"fn"),programs:[],program:o(function(c,l,u,d,A){var p=this.programs[c],f=this.fn(c);return l||A||d||u?p=N0(this,c,f,l,u,d,A):p||(p=this.programs[c]=N0(this,c,f)),p},"program"),data:o(function(c,l){for(;c&&l--;)c=c._parent;return c},"data"),mergeIfNeeded:o(function(c,l){var u=c||l;return c&&l&&c!==l&&(u=Qp.extend({},l,c)),u},"mergeIfNeeded"),nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function i(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=c.data;i._setup(c),!c.partial&&t.useData&&(l=Zze(a,l));var u=void 0,d=t.useBlockParams?[]:void 0;t.useDepths&&(c.depths?u=a!=c.depths[0]?[a].concat(c.depths):c.depths:u=[a]);function A(p){return""+t.main(s,p,s.helpers,s.partials,l,d,u)}return o(A,"main"),A=Ose(t.main,A,s,c.depths||[],l,d),A(a,c)}return o(i,"ret"),i.isTop=!0,i._setup=function(a){if(a.partial)s.protoAccessControl=a.protoAccessControl,s.helpers=a.helpers,s.partials=a.partials,s.decorators=a.decorators,s.hooks=a.hooks;else{var c={};kse(c,e.helpers,s),kse(c,a.helpers,s),s.helpers=c,t.usePartial&&(s.partials=s.mergeIfNeeded(a.partials,e.partials)),(t.usePartial||t.useDecorators)&&(s.decorators=Qp.extend({},e.decorators,a.decorators)),s.hooks={},s.protoAccessControl=_se.createProtoAccessControl(a);var l=a.allowCallsToHelperMissing||r;Pse.moveHelperToHooks(s,"helperMissing",l),Pse.moveHelperToHooks(s,"blockHelperMissing",l)}},i._child=function(a,c,l,u){if(t.useBlockParams&&!l)throw new qa.default("must pass block params");if(t.useDepths&&!u)throw new qa.default("must pass parent depths");return N0(s,a,t[a],c,0,l,u)},i}o(jze,"template");function N0(t,e,r,n,s,i,a){function c(l){var u=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],d=a;return a&&l!=a[0]&&!(l===t.nullContext&&a[0]===null)&&(d=[l].concat(a)),r(t,l,t.helpers,t.partials,u.data||n,i&&[u.blockParams].concat(i),d)}return o(c,"prog"),c=Ose(r,c,t,a,n,i),c.program=e,c.depth=a?a.length:0,c.blockParams=s||0,c}o(N0,"wrapProgram");function Kze(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=x0(r.partials,t)):r.name==="@partial-block"?t=x0(r.data,"partial-block"):t=x0(r.partials,r.name),t}o(Kze,"resolvePartial");function Xze(t,e,r){var n=x0(r.data,"partial-block");r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var s=void 0;if(r.fn&&r.fn!==Dse&&(function(){r.data=Ga.createFrame(r.data);var i=r.fn;s=r.data["partial-block"]=o(function(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=Ga.createFrame(l.data),l.data["partial-block"]=n,i(c,l)},"partialBlockWrapper"),i.partials&&(r.partials=Qp.extend({},r.partials,i.partials))})(),t===void 0&&s&&(t=s),t===void 0)throw new qa.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}o(Xze,"invokePartial");function Dse(){return""}o(Dse,"noop");function x0(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}o(x0,"lookupOwnProperty");function Zze(t,e){return(!e||!("root"in e))&&(e=e?Ga.createFrame(e):{},e.root=t),e}o(Zze,"initData");function Ose(t,e,r,n,s,i){if(t.decorator){var a={};e=t.decorator(e,a,r,n&&n[0],s,i,n),Qp.extend(e,a)}return e}o(Ose,"executeDecorators");function kse(t,e,r){e&&Object.keys(e).forEach(function(n){var s=e[n];t[n]=eJe(s,r)})}o(kse,"addHelpers");function eJe(t,e){var r=e.lookupProperty;return Yze.wrapHelper(t,function(n){return n.lookupProperty=r,n})}o(eJe,"passLookupPropertyOption")});var AF=m((Q0,Lse)=>{"use strict";Q0.__esModule=!0;Q0.default=function(t){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var e=globalThis.Handlebars;t.noConflict=function(){return globalThis.Handlebars===t&&(globalThis.Handlebars=e),t}};Lse.exports=Q0.default});var Hse=m((R0,Gse)=>{"use strict";R0.__esModule=!0;function fF(t){return t&&t.__esModule?t:{default:t}}o(fF,"_interopRequireDefault");function hF(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}o(hF,"_interopRequireWildcard");var tJe=w0(),Fse=hF(tJe),rJe=Tse(),nJe=fF(rJe),sJe=ds(),iJe=fF(sJe),oJe=nn(),pF=hF(oJe),aJe=Mse
Line truncated
|
||||
`+this.lexer.showPosition()+`
|
||||
Expecting `+de.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Lr="Parse error on line "+(A+1)+": Unexpected "+(B==1?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Lr,{text:this.lexer.match,token:this.terminals_[B]||B,line:this.lexer.yylineno,loc:y,expected:de})}}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+B);switch(D[0]){case 1:a.push(B),c.push(this.lexer.yytext),l.push(this.lexer.yylloc),a.push(D[1]),B=null,N?(B=N,N=null):(p=this.lexer.yyleng,d=this.lexer.yytext,A=this.lexer.yylineno,y=this.lexer.yylloc,f>0&&f--);break;case 2:if(Ce=this.productions_[D[1]][1],ke.$=c[c.length-Ce],ke._$={first_line:l[l.length-(Ce||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(Ce||1)].first_column,last_column:l[l.length-1].last_column},E&&(ke._$.range=[l[l.length-(Ce||1)].range[0],l[l.length-1].range[1]]),xe=this.performAction.call(ke,d,p,A,this.yy,D[1],c,l),typeof xe<"u")return xe;Ce&&(a=a.slice(0,-1*Ce*2),c=c.slice(0,-1*Ce),l=l.slice(0,-1*Ce)),a.push(this.productions_[D[1]][0]),c.push(ke.$),l.push(ke._$),Xe=u[a[a.length-2]][a[a.length-1]],a.push(Xe);break;case 3:return!0}}return!0},"parse")},e=(function(){var n={EOF:1,parseError:o(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:o(function(i){return this._input=i,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===l.length?this.yylloc.first_column:0)+l[l.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-a]),this},"unput"),more:o(function(){return this._more=!0,this},"more"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
||||
Expecting `+de.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Lr="Parse error on line "+(A+1)+": Unexpected "+(B==1?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Lr,{text:this.lexer.match,token:this.terminals_[B]||B,line:this.lexer.yylineno,loc:y,expected:de})}}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+B);switch(D[0]){case 1:a.push(B),c.push(this.lexer.yytext),l.push(this.lexer.yylloc),a.push(D[1]),B=null,N?(B=N,N=null):(p=this.lexer.yyleng,d=this.lexer.yytext,A=this.lexer.yylineno,y=this.lexer.yylloc,f>0&&f--);break;case 2:if(Ce=this.productions_[D[1]][1],ke.$=c[c.length-Ce],ke._$={first_line:l[l.length-(Ce||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(Ce||1)].first_column,last_column:l[l.length-1].last_column},E&&(ke._$.range=[l[l.length-(Ce||1)].range[0],l[l.length-1].range[1]]),xe=this.performAction.call(ke,d,p,A,this.yy,D[1],c,l),typeof xe<"u")return xe;Ce&&(a=a.slice(0,-1*Ce*2),c=c.slice(0,-1*Ce),l=l.slice(0,-1*Ce)),a.push(this.productions_[D[1]][0]),c.push(ke.$),l.push(ke._$),Ze=u[a[a.length-2]][a[a.length-1]],a.push(Ze);break;case 3:return!0}}return!0},"parse")},e=(function(){var n={EOF:1,parseError:o(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:o(function(i){return this._input=i,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a-1),this.offset-=a;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===l.length?this.yylloc.first_column:0)+l[l.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-a]),this},"unput"),more:o(function(){return this._more=!0,this},"more"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
|
||||
`+a+"^"},"showPosition"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,c,l,u,d;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),p=0;p<A.length&&(c=this._input.match(this.rules[A[p]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,l=p,!this.options.flex)));p++);return a?(d=a[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],i=this.performAction.call(this,this.yy,this,A[l],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)+`. Unrecognized text.
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var i=this.next();return typeof i<"u"?i:this.lex()},"lex"),begin:o(function(i){this.conditionStack.push(i)},"begin"),popState:o(function(){return this.conditionStack.pop()},"popState"),_currentRules:o(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:o(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:o(function(i){this.begin(i)},"begin")};return n.options={},n.performAction=o(function(i,a,c,l){function u(A,p){return a.yytext=a.yytext.substring(A,a.yyleng-p+A)}o(u,"strip");var d=l;switch(c){case 0:if(a.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return a.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},"anonymous"),n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return o(r,"Parser"),r.prototype=t,t.Parser=r,new r})();T0.default=aJe;Vse.exports=T0.default});var k0=m((_0,Yse)=>{"use strict";_0.__esModule=!0;function cJe(t){return t&&t.__esModule?t:{default:t}}o(cJe,"_interopRequireDefault");var lJe=ds(),hF=cJe(lJe);function v0(){this.parents=[]}o(v0,"Visitor");v0.prototype={constructor:v0,mutating:!1,acceptKey:o(function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!v0.prototype[n.type])throw new hF.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},"acceptKey"),acceptRequired:o(function(e,r){if(this.acceptKey(e,r),!e[r])throw new hF.default(e.type+" requires "+r)},"acceptRequired"),acceptArray:o(function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},"acceptArray"),accept:o(function(e){if(e){if(!this[e.type])throw new hF.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},"accept"),Program:o(function(e){this.acceptArray(e.body)},"Program"),MustacheStatement:P0,Decorator:P0,BlockStatement:Jse,DecoratorBlock:Jse,PartialStatement:$se,PartialBlockStatement:o(function(e){$se.call(this,e),this.acceptKey(e,"program")},"PartialBlockStatement"),ContentStatement:o(function(){},"ContentStatement"),CommentStatement:o(function(){},"CommentStatement"),SubExpression:P0,PathExpression:o(function(){},"PathExpressionLine truncated
|
||||
`])}),e},"merge"),each:o(function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},"each"),empty:o(function(){var e=this.currentLocation||{start:{}};return new Gu(e.start.line,e.start.column,this.srcFile)},"empty"),wrap:o(function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Gu?e:(e=MF(e,this,r),new Gu(r.start.line,r.start.column,this.srcFile,e))},"wrap"),functionCall:o(function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:o(function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},"quotedString"),objectLiteral:o(function(e){var r=this,n=[];Object.keys(e).forEach(function(i){var a=MF(e[i],r);a!=="undefined"&&n.push([r.quotedString(i),":",a])});var s=this.generateList(n);return s.prepend("{"),s.add("}"),s},"objectLiteral"),generateList:o(function(e){for(var r=this.empty(),n=0,s=e.length;n<s;n++)n&&r.add(","),r.add(MF(e[n],this));return r},"generateList"),generateArray:o(function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r},"generateArray")};G0.default=Rie;Tie.exports=G0.default});var Oie=m((H0,Die)=>{"use strict";H0.__esModule=!0;function kie(t){return t&&t.__esModule?t:{default:t}}o(kie,"_interopRequireDefault");var Pie=b0(),o$e=ds(),FF=kie(o$e),a$e=nn(),c$e=vie(),_ie=kie(c$e);function _p(t){this.value=t}o(_p,"Literal");function kp(){}o(kp,"JavaScriptCompiler");kp.prototype={nameLookup:o(function(e,r){return this.internalNameLookup(e,r)},"nameLookup"),depthedLookup:o(function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},"depthedLookup"),compilerInfo:o(function(){var e=Pie.COMPILER_REVISION,r=Pie.REVISION_CHANGES[e];return[e,r]},"compilerInfo"),appendToBuffer:o(function(e,r,n){return a$e.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},"appendToBuffer"),initializeBuffer:o(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:o(function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:o(function(e,r,n,s){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!s,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var i=e.opcodes,a=void 0,c=void 0,l=void 0,u=void 0;for(l=0,u=i.length;l<u;l++)a=i[l],this.source.currentLocation=a.loc,c=c||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=c,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new FF.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
||||
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var i=this.next();return typeof i<"u"?i:this.lex()},"lex"),begin:o(function(i){this.conditionStack.push(i)},"begin"),popState:o(function(){return this.conditionStack.pop()},"popState"),_currentRules:o(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:o(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:o(function(i){this.begin(i)},"begin")};return n.options={},n.performAction=o(function(i,a,c,l){function u(A,p){return a.yytext=a.yytext.substring(A,a.yyleng-p+A)}o(u,"strip");var d=l;switch(c){case 0:if(a.yytext.slice(-2)==="\\\\"?(u(0,1),this.begin("mu")):a.yytext.slice(-1)==="\\"?(u(0,1),this.begin("emu")):this.begin("mu"),a.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;break;case 3:return this.begin("raw"),15;break;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(u(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;break;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;break;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;break;case 16:return this.popState(),44;break;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(a.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;break;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;break;case 30:return this.popState(),33;break;case 31:return a.yytext=u(1,2).replace(/\\"/g,'"'),80;break;case 32:return a.yytext=u(1,2).replace(/\\'/g,"'"),80;break;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return a.yytext=a.yytext.replace(/\\([\\\]])/g,"$1"),72;break;case 43:return"INVALID";case 44:return 5}},"anonymous"),n.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],n.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},n})();t.lexer=e;function r(){this.yy={}}return o(r,"Parser"),r.prototype=t,t.Parser=r,new r})();v0.default=uJe;Jse.exports=v0.default});var D0=m((k0,jse)=>{"use strict";k0.__esModule=!0;function dJe(t){return t&&t.__esModule?t:{default:t}}o(dJe,"_interopRequireDefault");var AJe=ds(),gF=dJe(AJe);function P0(){this.parents=[]}o(P0,"Visitor");P0.prototype={constructor:P0,mutating:!1,acceptKey:o(function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!P0.prototype[n.type])throw new gF.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},"acceptKey"),acceptRequired:o(function(e,r){if(this.acceptKey(e,r),!e[r])throw new gF.default(e.type+" requires "+r)},"acceptRequired"),acceptArray:o(function(e){for(var r=0,n=e.length;r<n;r++)this.acceptKey(e,r),e[r]||(e.splice(r,1),r--,n--)},"acceptArray"),accept:o(function(e){if(e){if(!this[e.type])throw new gF.default("Unknown type: "+e.type,e);this.current&&this.parents.unshift(this.current),this.current=e;var r=this[e.type](e);if(this.current=this.parents.shift(),!this.mutating||r)return r;if(r!==!1)return e}},"accept"),Program:o(function(e){this.acceptArray(e.body)},"Program"),MustacheStatement:_0,Decorator:_0,BlockStatement:Yse,DecoratorBlock:Yse,PartialStatement:Wse,PartialBlockStatement:o(function(e){Wse.call(this,e),this.acceptKey(e,"program")},"PartialBlockStatement"),ContentStatement:o(function(){},"ContentStatement"),CommentStatement:o(function(){},"CommentStatement"),SubExpression:_0,PathExpression:o(function(){},"PathExpressionLine truncated
|
||||
`])}),e},"merge"),each:o(function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},"each"),empty:o(function(){var e=this.currentLocation||{start:{}};return new Gu(e.start.line,e.start.column,this.srcFile)},"empty"),wrap:o(function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Gu?e:(e=FF(e,this,r),new Gu(r.start.line,r.start.column,this.srcFile,e))},"wrap"),functionCall:o(function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:o(function(e){return'"'+(e+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},"quotedString"),objectLiteral:o(function(e){var r=this,n=[];Object.keys(e).forEach(function(i){var a=FF(e[i],r);a!=="undefined"&&n.push([r.quotedString(i),":",a])});var s=this.generateList(n);return s.prepend("{"),s.add("}"),s},"objectLiteral"),generateList:o(function(e){for(var r=this.empty(),n=0,s=e.length;n<s;n++)n&&r.add(","),r.add(FF(e[n],this));return r},"generateList"),generateArray:o(function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r},"generateArray")};H0.default=vie;Pie.exports=H0.default});var Lie=m((V0,Mie)=>{"use strict";V0.__esModule=!0;function Oie(t){return t&&t.__esModule?t:{default:t}}o(Oie,"_interopRequireDefault");var kie=w0(),l$e=ds(),qF=Oie(l$e),u$e=nn(),d$e=_ie(),Die=Oie(d$e);function kp(t){this.value=t}o(kp,"Literal");function Dp(){}o(Dp,"JavaScriptCompiler");Dp.prototype={nameLookup:o(function(e,r){return this.internalNameLookup(e,r)},"nameLookup"),depthedLookup:o(function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},"depthedLookup"),compilerInfo:o(function(){var e=kie.COMPILER_REVISION,r=kie.REVISION_CHANGES[e];return[e,r]},"compilerInfo"),appendToBuffer:o(function(e,r,n){return u$e.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},"appendToBuffer"),initializeBuffer:o(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:o(function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:o(function(e,r,n,s){this.environment=e,this.options=r,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!s,this.name=this.environment.name,this.isChild=!!n,this.context=n||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(e,r),this.useDepths=this.useDepths||e.useDepths||e.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||e.useBlockParams;var i=e.opcodes,a=void 0,c=void 0,l=void 0,u=void 0;for(l=0,u=i.length;l<u;l++)a=i[l],this.source.currentLocation=a.loc,c=c||a.loc,this[a.opcode].apply(this,a.args);if(this.source.currentLocation=c,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new qF.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
||||
`]),this.decorators.push("return fn;"),s?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
||||
`),this.decorators.push(`}
|
||||
`),this.decorators=this.decorators.merge()));var d=this.createFunctionContext(s);if(this.isChild)return d;var A={compiler:this.compilerInfo(),main:d};this.decorators&&(A.main_d=this.decorators,A.useDecorators=!0);var p=this.context,f=p.programs,h=p.decorators;for(l=0,u=f.length;l<u;l++)A[l]=f[l],h[l]&&(A[l+"_d"]=h[l],A.useDecorators=!0);return this.environment.usePartial&&(A.usePartial=!0),this.options.data&&(A.useData=!0),this.useDepths&&(A.useDepths=!0),this.useBlockParams&&(A.useBlockParams=!0),this.options.compat&&(A.compat=!0),s?A.compilerOptions=this.options:(A.compiler=JSON.stringify(A.compiler),this.source.currentLocation={start:{line:1,column:0}},A=this.objectLiteral(A),r.srcName?(A=A.toStringWithSourceMap({file:r.destName}),A.map=A.map&&A.map.toString()):A=A.toString()),A},"compile"),preamble:o(function(){this.lastContext=0,this.source=new _ie.default(this.options.srcName),this.decorators=new _ie.default(this.options.srcName)},"preamble"),createFunctionContext:o(function(e){var r=this,n="",s=this.stackVars.concat(this.registers.list);s.length>0&&(n+=", "+s.join(", "));var i=0;Object.keys(this.aliases).forEach(function(l){var u=r.aliases[l];u.children&&u.referenceCount>1&&(n+=", alias"+ ++i+"="+l,u.children[0]="alias"+i)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var c=this.mergeSource(n);return e?(a.push(c),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),`) {
|
||||
`),this.decorators=this.decorators.merge()));var d=this.createFunctionContext(s);if(this.isChild)return d;var A={compiler:this.compilerInfo(),main:d};this.decorators&&(A.main_d=this.decorators,A.useDecorators=!0);var p=this.context,f=p.programs,h=p.decorators;for(l=0,u=f.length;l<u;l++)A[l]=f[l],h[l]&&(A[l+"_d"]=h[l],A.useDecorators=!0);return this.environment.usePartial&&(A.usePartial=!0),this.options.data&&(A.useData=!0),this.useDepths&&(A.useDepths=!0),this.useBlockParams&&(A.useBlockParams=!0),this.options.compat&&(A.compat=!0),s?A.compilerOptions=this.options:(A.compiler=JSON.stringify(A.compiler),this.source.currentLocation={start:{line:1,column:0}},A=this.objectLiteral(A),r.srcName?(A=A.toStringWithSourceMap({file:r.destName}),A.map=A.map&&A.map.toString()):A=A.toString()),A},"compile"),preamble:o(function(){this.lastContext=0,this.source=new Die.default(this.options.srcName),this.decorators=new Die.default(this.options.srcName)},"preamble"),createFunctionContext:o(function(e){var r=this,n="",s=this.stackVars.concat(this.registers.list);s.length>0&&(n+=", "+s.join(", "));var i=0;Object.keys(this.aliases).forEach(function(l){var u=r.aliases[l];u.children&&u.referenceCount>1&&(n+=", alias"+ ++i+"="+l,u.children[0]="alias"+i)}),this.lookupPropertyFunctionIsUsed&&(n+=", "+this.lookupPropertyFunctionVarDeclaration());var a=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&a.push("blockParams"),this.useDepths&&a.push("depths");var c=this.mergeSource(n);return e?(a.push(c),Function.apply(this,a)):this.source.wrap(["function(",a.join(","),`) {
|
||||
`,c,"}"])},"createFunctionContext"),mergeSource:o(function(e){var r=this.environment.isSimple,n=!this.forceBuffer,s=void 0,i=void 0,a=void 0,c=void 0;return this.source.each(function(l){l.appendToBuffer?(a?l.prepend(" + "):a=l,c=l):(a&&(i?a.prepend("buffer += "):s=!0,c.add(";"),a=c=void 0),i=!0,r||(n=!1))}),n?a?(a.prepend("return "),c.add(";")):i||this.source.push('return "";'):(e+=", buffer = "+(s?"":this.initializeBuffer()),a?(a.prepend("return buffer + "),c.add(";")):this.source.push("return buffer;")),e&&this.source.prepend("var "+e.substring(2)+(s?"":`;
|
||||
`)),this.source.merge()},"mergeSource"),lookupPropertyFunctionVarDeclaration:o(function(){return`
|
||||
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
||||
@@ -84,26 +84,26 @@ Expecting `+de.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Lr="Parse error
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
`.trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:o(function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var s=this.popStack();n.splice(1,0,s),this.push(this.source.functionCall(r,"call",n))},"blockValue"),ambiguousBlockValue:o(function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},"ambiguousBlockValue"),appendContent:o(function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},"appendContent"),append:o(function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},"append"),appendEscaped:o(function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:o(function(e){this.lastContext=e},"getContext"),pushContext:o(function(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:o(function(e,r,n,s){var i=0;!s&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[i++])):this.pushContext(),this.resolvePath("context",e,i,r,n)},"lookupOnContext"),lookupBlockParam:o(function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:o(function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},"lookupData"),resolvePath:o(function(e,r,n,s,i){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(l$e(this.options.strict&&i,this,r,n,e));return}for(var c=r.length,l=o(function(d){a.replaceStack(function(A){var p=a.nameLookup(A,r[d],e);return s?[" && ",p]:[" != null ? ",p," : ",A]})},"_loop"),u=n;u<c;u++)l(u)},"resolvePath"),resolvePossibleLambda:o(function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:o(function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},"pushStringParam"),emptyHash:o(function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},"emptyHash"),pushHash:o(function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:o(function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},"popHash"),pushString:o(function(e){this.pushStackLiteral(this.quotedString(e))},"pushString"),pushLiteral:o(function(e){this.pushStackLiteral(e)},"pushLiteral"),pushProgram:o(function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},"pushProgram"),registerDecorator:o(function(e,r){var n=this.nameLookup("decorators",r,"decorator"),s=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",s])," || fn;"])},"registerDecorator"),invokeHelper:o(function(e,r,n){var s=this.popStack(),i=this.setupHelper(e,r),a=[];n&&a.push(i.name),a.push(s),this.options.strict||a.push(this.aliasable("container.hooks.helperMissing"));var c=["(",this.itemsSeparatedBy(a,"||"),")"],l=this.source.functionCall(c,"call",i.callParams);this.push(l)},"invokeHelper"),itemsSeparatedBy:o(function(e,r){var n=[];n.push(e[0]);for(var s=1;s<e.length;s++)n.push(r,e[s]);return n},"itemsSeparatedBy"),invokeKnownHelper:o(function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},"invokeKnownHelper"),invokeAmbiguous:o(function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var s=this.setupHelper(0,e,r),i=this.lastHelper=this.nameLookup("helpers",e,"helper"),a=["(","(helper = ",i," || ",n,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,s.paramsInit?["),(",s.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("h
Line truncated
|
||||
`,e};vt.prototype.Program=function(t){var e="",r=t.body,n=void 0,s=void 0;if(t.blockParams){var i="BLOCK PARAMS: [";for(n=0,s=t.blockParams.length;n<s;n++)i+=" "+t.blockParams[n];i+=" ]",e+=this.pad(i)}for(n=0,s=r.length;n<s;n++)e+=this.accept(r[n]);return this.padding--,e};vt.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};vt.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};vt.prototype.BlockStatement=vt.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};vt.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};vt.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};vt.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};vt.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};vt.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,s=0,i=e.length;s<i;s++)r.push(this.accept(e[s]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};vt.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};vt.prototype.StringLiteral=function(t){return'"'+t.value+'"'};vt.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};vt.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};vt.prototype.UndefinedLiteral=function(){return"UNDEFINED"};vt.prototype.NullLiteral=function(){return"NULL"};vt.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,s=e.length;n<s;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};vt.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var Vie=m((LTt,Hie)=>{var J0=Fie().default,Gie=Uie();J0.PrintVisitor=Gie.PrintVisitor;J0.print=Gie.print;Hie.exports=J0;function qie(t,e){var r=require("fs"),n=r.readFileSync(e,"utf8");t.exports=J0.compile(n)}o(qie,"extension");typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=qie,require.extensions[".hbs"]=qie)});var toe=m(K0=>{"use strict";Object.defineProperty(K0,"__esModule",{value:!0});K0.getProxyUrl=Q$e;K0.checkBypass=eoe;function Q$e(t){let e=t.protocol==="https:";if(eoe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new j0(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new j0(`http://${r}`)}else return}o(Q$e,"getProxyUrl");function eoe(t){if(!t.hostname)return!1;let e=t.hostname;if(R$e(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let s=[t.hostname.toUpperCase()];typeof n=="number"&&s.push(`${s[0]}:${n}`);for(let i of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(i==="*"||s.some(a=>a===i||a.endsWith(`.${i}`)||i.startsWith(".")&&a.endsWith(`${i}`)))return!0;return!1}o(eoe,"checkBypass");function R$e(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}o(R$e,"isLoopbackAddress");var j0=class extends URL{static{o(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}});var noe=m(gt=>{"use strict";var T$e=gt&>.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),v$e=gt&>.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),tS=gt&>.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[n.length]=s);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),s=0;s<n.length;s++)n[s]!=="default"&&T$e(r,e,n[s]);return v$e(r,e),
Line truncated
|
||||
`.trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:o(function(e){var r=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs(e,0,n);var s=this.popStack();n.splice(1,0,s),this.push(this.source.functionCall(r,"call",n))},"blockValue"),ambiguousBlockValue:o(function(){var e=this.aliasable("container.hooks.blockHelperMissing"),r=[this.contextName(0)];this.setupHelperArgs("",0,r,!0),this.flushInline();var n=this.topStack();r.splice(1,0,n),this.pushSource(["if (!",this.lastHelper,") { ",n," = ",this.source.functionCall(e,"call",r),"}"])},"ambiguousBlockValue"),appendContent:o(function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},"appendContent"),append:o(function(){if(this.isInline())this.replaceStack(function(r){return[" != null ? ",r,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var e=this.popStack();this.pushSource(["if (",e," != null) { ",this.appendToBuffer(e,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},"append"),appendEscaped:o(function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:o(function(e){this.lastContext=e},"getContext"),pushContext:o(function(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:o(function(e,r,n,s){var i=0;!s&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[i++])):this.pushContext(),this.resolvePath("context",e,i,r,n)},"lookupOnContext"),lookupBlockParam:o(function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:o(function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},"lookupData"),resolvePath:o(function(e,r,n,s,i){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(A$e(this.options.strict&&i,this,r,n,e));return}for(var c=r.length,l=o(function(d){a.replaceStack(function(A){var p=a.nameLookup(A,r[d],e);return s?[" && ",p]:[" != null ? ",p," : ",A]})},"_loop"),u=n;u<c;u++)l(u)},"resolvePath"),resolvePossibleLambda:o(function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:o(function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},"pushStringParam"),emptyHash:o(function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},"emptyHash"),pushHash:o(function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:o(function(){var e=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(e.ids)),this.stringParams&&(this.push(this.objectLiteral(e.contexts)),this.push(this.objectLiteral(e.types))),this.push(this.objectLiteral(e.values))},"popHash"),pushString:o(function(e){this.pushStackLiteral(this.quotedString(e))},"pushString"),pushLiteral:o(function(e){this.pushStackLiteral(e)},"pushLiteral"),pushProgram:o(function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},"pushProgram"),registerDecorator:o(function(e,r){var n=this.nameLookup("decorators",r,"decorator"),s=this.setupHelperArgs(r,e);this.decorators.push(["var decorator = ",n,";"]),this.decorators.push(['if (typeof decorator !== "function") { throw new Error(',this.quotedString('Missing decorator: "'+r+'"'),"); }"]),this.decorators.push(["fn = ",this.decorators.functionCall("decorator","",["fn","props","container",s])," || fn;"])},"registerDecorator"),invokeHelper:o(function(e,r,n){var s=this.popStack(),i=this.setupHelper(e,r),a=[];n&&a.push(i.name),a.push(s),this.options.strict||a.push(this.aliasable("container.hooks.helperMissing"));var c=["(",this.itemsSeparatedBy(a,"||"),")"],l=this.source.functionCall(c,"call",i.callParams);this.push(l)},"invokeHelper"),itemsSeparatedBy:o(function(e,r){var n=[];n.push(e[0]);for(var s=1;s<e.length;s++)n.push(r,e[s]);return n},"itemsSeparatedBy"),invokeKnownHelper:o(function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},"invokeKnownHelper"),invokeAmbiguous:o(function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var s=this.setupHelper(0,e,r),i=this.lastHelper=this.nameLookup("helpers",e,"helper"),a=["(","(helper = ",i," || ",n,")"];this.options.strict||(a[0]="(helper = ",a.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",a,s.paramsInit?["),(",s.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("h
Line truncated
|
||||
`,e};vt.prototype.Program=function(t){var e="",r=t.body,n=void 0,s=void 0;if(t.blockParams){var i="BLOCK PARAMS: [";for(n=0,s=t.blockParams.length;n<s;n++)i+=" "+t.blockParams[n];i+=" ]",e+=this.pad(i)}for(n=0,s=r.length;n<s;n++)e+=this.accept(r[n]);return this.padding--,e};vt.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};vt.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};vt.prototype.BlockStatement=vt.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e};vt.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")};vt.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")};vt.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};vt.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};vt.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,s=0,i=e.length;s<i;s++)r.push(this.accept(e[s]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};vt.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};vt.prototype.StringLiteral=function(t){return'"'+t.value+'"'};vt.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};vt.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};vt.prototype.UndefinedLiteral=function(){return"UNDEFINED"};vt.prototype.NullLiteral=function(){return"NULL"};vt.prototype.Hash=function(t){for(var e=t.pairs,r=[],n=0,s=e.length;n<s;n++)r.push(this.accept(e[n]));return"HASH{"+r.join(", ")+"}"};vt.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var Jie=m((qTt,zie)=>{var $0=qie().default,Vie=Gie();$0.PrintVisitor=Vie.PrintVisitor;$0.print=Vie.print;zie.exports=$0;function Hie(t,e){var r=require("fs"),n=r.readFileSync(e,"utf8");t.exports=$0.compile(n)}o(Hie,"extension");typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=Hie,require.extensions[".hbs"]=Hie)});var noe=m(X0=>{"use strict";Object.defineProperty(X0,"__esModule",{value:!0});X0.getProxyUrl=v$e;X0.checkBypass=roe;function v$e(t){let e=t.protocol==="https:";if(roe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new K0(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new K0(`http://${r}`)}else return}o(v$e,"getProxyUrl");function roe(t){if(!t.hostname)return!1;let e=t.hostname;if(P$e(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let s=[t.hostname.toUpperCase()];typeof n=="number"&&s.push(`${s[0]}:${n}`);for(let i of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(i==="*"||s.some(a=>a===i||a.endsWith(`.${i}`)||i.startsWith(".")&&a.endsWith(`${i}`)))return!0;return!1}o(roe,"checkBypass");function P$e(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}o(P$e,"isLoopbackAddress");var K0=class extends URL{static{o(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}}});var ioe=m(gt=>{"use strict";var _$e=gt&>.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),k$e=gt&>.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),rS=gt&>.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[n.length]=s);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),s=0;s<n.length;s++)n[s]!=="default"&&_$e(r,e,n[s]);return k$e(r,e),
Line truncated
|
||||
`).join(`
|
||||
`+i),t.push(s+"m+"+ZS.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=I4e()+e+" "+t[0]}o(C4e,"formatArgs");function I4e(){return gr.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(I4e,"getDate");function B4e(...t){return process.stderr.write(XS.formatWithOptions(gr.inspectOpts,...t)+`
|
||||
`)}o(B4e,"log");function b4e(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(b4e,"save");function w4e(){return process.env.DEBUG}o(w4e,"load");function S4e(t){t.inspectOpts={};let e=Object.keys(gr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=gr.inspectOpts[e[r]]}o(S4e,"init");ZS.exports=h2()(gr);var{formatters:Qce}=ZS.exports;Qce.o=function(t){return this.inspectOpts.colors=this.useColors,XS.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};Qce.O=function(t){return this.inspectOpts.colors=this.useColors,XS.inspect(t,this.inspectOpts)}});var g2=m((gDt,m2)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?m2.exports=xce():m2.exports=Rce()});var tN=m(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.DownloadHTTPError=Pt.DownloadLengthMismatchError=Pt.DownloadError=Pt.ExpiredMetadataError=Pt.EqualVersionError=Pt.BadVersionError=Pt.RepositoryError=Pt.PersistError=Pt.RuntimeError=Pt.ValueError=void 0;var E2=class extends Error{static{o(this,"ValueError")}};Pt.ValueError=E2;var y2=class extends Error{static{o(this,"RuntimeError")}};Pt.RuntimeError=y2;var C2=class extends Error{static{o(this,"PersistError")}};Pt.PersistError=C2;var pE=class extends Error{static{o(this,"RepositoryError")}};Pt.RepositoryError=pE;var eN=class extends pE{static{o(this,"BadVersionError")}};Pt.BadVersionError=eN;var I2=class extends eN{static{o(this,"EqualVersionError")}};Pt.EqualVersionError=I2;var B2=class extends pE{static{o(this,"ExpiredMetadataError")}};Pt.ExpiredMetadataError=B2;var fE=class extends Error{static{o(this,"DownloadError")}};Pt.DownloadError=fE;var b2=class extends fE{static{o(this,"DownloadLengthMismatchError")}};Pt.DownloadLengthMismatchError=b2;var w2=class extends fE{static{o(this,"DownloadHTTPError")}statusCode;constructor(e,r){super(e),this.statusCode=r}};Pt.DownloadHTTPError=w2});var vce=m(sf=>{"use strict";var N2=sf&&sf.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sf,"__esModule",{value:!0});sf.withTempFile=void 0;var S2=N2(require("fs/promises")),N4e=N2(require("os")),Tce=N2(require("path")),x4e=o(async t=>Q4e(async e=>t(Tce.default.join(e,"tempfile"))),"withTempFile");sf.withTempFile=x4e;var Q4e=o(async t=>{let e=await S2.default.realpath(N4e.default.tmpdir()),r=await S2.default.mkdtemp(e+Tce.default.sep);try{return await t(r)}finally{await S2.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}},"withTempDir")});var _ce=m((BDt,Pce)=>{var x2=class{static{o(this,"RetryOperation")}#e=1;#t=null;#n=[];#r=null;#s;#i=null;#a;#o;#l=null;#c;constructor(e,r={}){this.#a=[...e],this.#o=[...e],this.#c=r.unref,this.#s=r.maxRetryTime||1/0,r.forever&&(this.#t=[...this.#o])}get timeouts(){return[...this.#o]}get errors(){return[...this.#n]}get attempts(){return this.#e}get mainError(){let e=null;if(this.#n.length){let r=0,n={};for(let s=0;s<this.#n.length;s++){let i=this.#n[s],{message:a}=i;n[a]||(n[a]=0),n[a]++,n[a]>=r&&(e=i,r=n[a])}}return e}reset(){this.#e=1,this.#o=[...this.#a]}stop(){this.#l&&clearTimeout(this.#l),this.#o=[],this.#t=null}retry(e){if(this.#n.push(e),new Date().getTime()-this.#i>=this.#s)return this.#n.unshift(new Error("RetryOperation timeout occurred")),!1;let r=this.#o.shift();if(r===void 0)if(this.#t)this.#n.pop(),r=this.#t.at(-1);else return!1;return this.#l=setTimeout(()=>{this.#e++,this.#r(this.#e)},r),this.#c&&this.#l.unref(),!0}attempt(e){this.#r=e,this.#i=new Date().getTime(),this.#r(this.#e)}};Pce.exports={RetryOperation:x2}});var Oce=m((wDt,Dce)=>{var{RetryOperation:R4e}=_ce(),kce=o((t,e)=>Math.min(Math.round((1+(e.randomize?Math.random():0))*Math.max(e.minTimeout,1)*Math.pow(e.factor,t)),e.maxTimeout),"createTimeout"),T4e=o(t=>t?.code==="EPROMISERETRY"&&Object.hasOwn(t,"retried"),"isRetryError"),v4e=o(async(t,e={})=>{let r=[];if(e instanceof Array)r=[...e];else{e.retries===1/0&&(e.forever=!0,delete e.retries);let s={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1,...e};if(s.minTimeout>s.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");if(s.retries){for(let i=0;i<s.retries;i++)r.push(kce(i,s));r.sort((i,a)=>i-a)}else e.forever&&r.push(kce(0,s))}let n=new R4e(r,{forever:e.forever,unref:e.unref,maxRetryTime:e.maxRetryTime});return new Promise(function(s,i){n.attempt(async a=>{try{let c=await t(l=>{throw Object.assign(new Error("Retrying"),{code:"EPROMISERETRY",retried:l})},a,n);return s(c)}catch(c){if(!T4e(c))return i(c);if(!n.retry(c.retried||new Error))return i(c.retried)}})})},"promiseRetry");Dce.exports={promiseRetry:v4e}});var T2=m(cl=>{"use strict";var R2=cl&&cl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cl,"__esModule",{value:!0});cl.DefaultFetcher=cl.BaseFetcher=void 0;var P4e=R2(g2()),Mce=R2(require("fs")),_4e=R2(require("util")),Lce=tN(),k4e=vce(),D4e=Oce(),O4e=(0,P4e.default)("tuf:fetch"),M4e="User-Agent",rN=class{static{o(this,"BaseFetcher")}async downloadFile(e,r,n){return(0,k4e.withTempFile)(async s=>{let i=await this.fetch(e),a=0,c=Mce.default.createWriteStream(s),l=i.getReader();try{for(;;){let{done:u,value:d}=await l.read();if(u)break;if(a+=d.length,a>r)throw new Lce.DownloadLengthMismatchError("Max length reached");await L4e(c,Buffer.from(d))}}finally{l.releaseLock(),await _4e.default.promisify(c.close).bind(c)()}return n(s)})}async downloadBytes(e,r){return this.downloadFile(e,r,async n=>{let s=Mce.defau
Line truncated
|
||||
`).forEach(r=>{r.match(H5e)||r.match(V5e)||(e+=r)}),Buffer.from(e,"base64")}o(z5e,"toDER");function J5e(t,e="CERTIFICATE"){let n=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...n,`-----END ${e}-----`].join(`
|
||||
`+i),t.push(s+"m+"+eN.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=w4e()+e+" "+t[0]}o(b4e,"formatArgs");function w4e(){return gr.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(w4e,"getDate");function S4e(...t){return process.stderr.write(ZS.formatWithOptions(gr.inspectOpts,...t)+`
|
||||
`)}o(S4e,"log");function N4e(t){t?process.env.DEBUG=t:delete process.env.DEBUG}o(N4e,"save");function x4e(){return process.env.DEBUG}o(x4e,"load");function Q4e(t){t.inspectOpts={};let e=Object.keys(gr.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=gr.inspectOpts[e[r]]}o(Q4e,"init");eN.exports=g2()(gr);var{formatters:Tce}=eN.exports;Tce.o=function(t){return this.inspectOpts.colors=this.useColors,ZS.inspect(t,this.inspectOpts).split(`
|
||||
`).map(e=>e.trim()).join(" ")};Tce.O=function(t){return this.inspectOpts.colors=this.useColors,ZS.inspect(t,this.inspectOpts)}});var y2=m((CDt,E2)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?E2.exports=Rce():E2.exports=vce()});var rN=m(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.DownloadHTTPError=Pt.DownloadLengthMismatchError=Pt.DownloadError=Pt.ExpiredMetadataError=Pt.EqualVersionError=Pt.BadVersionError=Pt.RepositoryError=Pt.PersistError=Pt.RuntimeError=Pt.ValueError=void 0;var C2=class extends Error{static{o(this,"ValueError")}};Pt.ValueError=C2;var I2=class extends Error{static{o(this,"RuntimeError")}};Pt.RuntimeError=I2;var B2=class extends Error{static{o(this,"PersistError")}};Pt.PersistError=B2;var fE=class extends Error{static{o(this,"RepositoryError")}};Pt.RepositoryError=fE;var tN=class extends fE{static{o(this,"BadVersionError")}};Pt.BadVersionError=tN;var b2=class extends tN{static{o(this,"EqualVersionError")}};Pt.EqualVersionError=b2;var w2=class extends fE{static{o(this,"ExpiredMetadataError")}};Pt.ExpiredMetadataError=w2;var hE=class extends Error{static{o(this,"DownloadError")}};Pt.DownloadError=hE;var S2=class extends hE{static{o(this,"DownloadLengthMismatchError")}};Pt.DownloadLengthMismatchError=S2;var N2=class extends hE{static{o(this,"DownloadHTTPError")}statusCode;constructor(e,r){super(e),this.statusCode=r}};Pt.DownloadHTTPError=N2});var _ce=m(of=>{"use strict";var Q2=of&&of.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(of,"__esModule",{value:!0});of.withTempFile=void 0;var x2=Q2(require("fs/promises")),R4e=Q2(require("os")),Pce=Q2(require("path")),T4e=o(async t=>v4e(async e=>t(Pce.default.join(e,"tempfile"))),"withTempFile");of.withTempFile=T4e;var v4e=o(async t=>{let e=await x2.default.realpath(R4e.default.tmpdir()),r=await x2.default.mkdtemp(e+Pce.default.sep);try{return await t(r)}finally{await x2.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}},"withTempDir")});var Dce=m((SDt,kce)=>{var R2=class{static{o(this,"RetryOperation")}#e=1;#t=null;#n=[];#r=null;#s;#i=null;#a;#o;#l=null;#c;constructor(e,r={}){this.#a=[...e],this.#o=[...e],this.#c=r.unref,this.#s=r.maxRetryTime||1/0,r.forever&&(this.#t=[...this.#o])}get timeouts(){return[...this.#o]}get errors(){return[...this.#n]}get attempts(){return this.#e}get mainError(){let e=null;if(this.#n.length){let r=0,n={};for(let s=0;s<this.#n.length;s++){let i=this.#n[s],{message:a}=i;n[a]||(n[a]=0),n[a]++,n[a]>=r&&(e=i,r=n[a])}}return e}reset(){this.#e=1,this.#o=[...this.#a]}stop(){this.#l&&clearTimeout(this.#l),this.#o=[],this.#t=null}retry(e){if(this.#n.push(e),new Date().getTime()-this.#i>=this.#s)return this.#n.unshift(new Error("RetryOperation timeout occurred")),!1;let r=this.#o.shift();if(r===void 0)if(this.#t)this.#n.pop(),r=this.#t.at(-1);else return!1;return this.#l=setTimeout(()=>{this.#e++,this.#r(this.#e)},r),this.#c&&this.#l.unref(),!0}attempt(e){this.#r=e,this.#i=new Date().getTime(),this.#r(this.#e)}};kce.exports={RetryOperation:R2}});var Lce=m((xDt,Mce)=>{var{RetryOperation:P4e}=Dce(),Oce=o((t,e)=>Math.min(Math.round((1+(e.randomize?Math.random():0))*Math.max(e.minTimeout,1)*Math.pow(e.factor,t)),e.maxTimeout),"createTimeout"),_4e=o(t=>t?.code==="EPROMISERETRY"&&Object.hasOwn(t,"retried"),"isRetryError"),k4e=o(async(t,e={})=>{let r=[];if(e instanceof Array)r=[...e];else{e.retries===1/0&&(e.forever=!0,delete e.retries);let s={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1,...e};if(s.minTimeout>s.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");if(s.retries){for(let i=0;i<s.retries;i++)r.push(Oce(i,s));r.sort((i,a)=>i-a)}else e.forever&&r.push(Oce(0,s))}let n=new P4e(r,{forever:e.forever,unref:e.unref,maxRetryTime:e.maxRetryTime});return new Promise(function(s,i){n.attempt(async a=>{try{let c=await t(l=>{throw Object.assign(new Error("Retrying"),{code:"EPROMISERETRY",retried:l})},a,n);return s(c)}catch(c){if(!_4e(c))return i(c);if(!n.retry(c.retried||new Error))return i(c.retried)}})})},"promiseRetry");Mce.exports={promiseRetry:k4e}});var P2=m(cl=>{"use strict";var v2=cl&&cl.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cl,"__esModule",{value:!0});cl.DefaultFetcher=cl.BaseFetcher=void 0;var D4e=v2(y2()),Fce=v2(require("fs")),O4e=v2(require("util")),Uce=rN(),M4e=_ce(),L4e=Lce(),F4e=(0,D4e.default)("tuf:fetch"),U4e="User-Agent",nN=class{static{o(this,"BaseFetcher")}async downloadFile(e,r,n){return(0,M4e.withTempFile)(async s=>{let i=await this.fetch(e),a=0,c=Fce.default.createWriteStream(s),l=i.getReader();try{for(;;){let{done:u,value:d}=await l.read();if(u)break;if(a+=d.length,a>r)throw new Uce.DownloadLengthMismatchError("Max length reached");await q4e(c,Buffer.from(d))}}finally{l.releaseLock(),await O4e.default.promisify(c.close).bind(c)()}return n(s)})}async downloadBytes(e,r){return this.downloadFile(e,r,async n=>{let s=Fce.defau
Line truncated
|
||||
`).forEach(r=>{r.match(J5e)||r.match($5e)||(e+=r)}),Buffer.from(e,"base64")}o(Y5e,"toDER");function W5e(t,e="CERTIFICATE"){let n=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...n,`-----END ${e}-----`].join(`
|
||||
`).concat(`
|
||||
`)}o(J5e,"fromDER")});var EN=m(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.SHA2_HASH_ALGOS=pl.RSA_SIGNATURE_ALGOS=pl.ECDSA_SIGNATURE_ALGOS=void 0;pl.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};pl.RSA_SIGNATURE_ALGOS={"1.2.840.113549.1.1.14":"sha224","1.2.840.113549.1.1.11":"sha256","1.2.840.113549.1.1.12":"sha384","1.2.840.113549.1.1.13":"sha512"};pl.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});var eq=m(yN=>{"use strict";Object.defineProperty(yN,"__esModule",{value:!0});yN.RFC3161TimestampVerificationError=void 0;var Z2=class extends Error{static{o(this,"RFC3161TimestampVerificationError")}};yN.RFC3161TimestampVerificationError=Z2});var fle=m(Go=>{"use strict";var $5e=Go&&Go.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Y5e=Go&&Go.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),W5e=Go&&Go.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[n.length]=s);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),s=0;s<n.length;s++)n[s]!=="default"&&$5e(r,e,n[s]);return Y5e(r,e),r}})();Object.defineProperty(Go,"__esModule",{value:!0});Go.TSTInfo=void 0;var ple=W5e(df()),j5e=EN(),K5e=eq(),tq=class{static{o(this,"TSTInfo")}root;constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return j5e.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=ple.digest(this.messageImprintHashAlgorithm,e);if(!ple.bufferEqual(r,this.messageImprintHashedMessage))throw new K5e.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};Go.TSTInfo=tq});var mle=m(Ho=>{"use strict";var X5e=Ho&&Ho.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Z5e=Ho&&Ho.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),e8e=Ho&&Ho.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[n.length]=s);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),s=0;s<n.length;s++)n[s]!=="default"&&X5e(r,e,n[s]);return Z5e(r,e),r}})();Object.defineProperty(Ho,"__esModule",{value:!0});Ho.RFC3161Timestamp=void 0;var t8e=hN(),rq=e8e(df()),hle=EN(),CE=eq(),r8e=fle(),n8e="1.2.840.113549.1.7.2",s8e="1.2.840.113549.1.9.16.1.4",i8e="1.2.840.113549.1.9.4",nq=class t{static{o(this,"RFC3161Timestamp")}root;constructor(e){this.root=e}static parse(e){let r=t8e.ASN1Obj.parseBuffer(e);return new t(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return hle.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return hle.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new r8e.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new CE.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==n8e)throw new CE.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==s8e)throw new CE.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=rq.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].valu
Line truncated
|
||||
`)}o(W5e,"fromDER")});var yN=m(pl=>{"use strict";Object.defineProperty(pl,"__esModule",{value:!0});pl.SHA2_HASH_ALGOS=pl.RSA_SIGNATURE_ALGOS=pl.ECDSA_SIGNATURE_ALGOS=void 0;pl.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};pl.RSA_SIGNATURE_ALGOS={"1.2.840.113549.1.1.14":"sha224","1.2.840.113549.1.1.11":"sha256","1.2.840.113549.1.1.12":"sha384","1.2.840.113549.1.1.13":"sha512"};pl.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});var rq=m(CN=>{"use strict";Object.defineProperty(CN,"__esModule",{value:!0});CN.RFC3161TimestampVerificationError=void 0;var tq=class extends Error{static{o(this,"RFC3161TimestampVerificationError")}};CN.RFC3161TimestampVerificationError=tq});var mle=m(Go=>{"use strict";var j5e=Go&&Go.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),K5e=Go&&Go.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),X5e=Go&&Go.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[n.length]=s);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),s=0;s<n.length;s++)n[s]!=="default"&&j5e(r,e,n[s]);return K5e(r,e),r}})();Object.defineProperty(Go,"__esModule",{value:!0});Go.TSTInfo=void 0;var hle=X5e(Af()),Z5e=yN(),e8e=rq(),nq=class{static{o(this,"TSTInfo")}root;constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return Z5e.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=hle.digest(this.messageImprintHashAlgorithm,e);if(!hle.bufferEqual(r,this.messageImprintHashedMessage))throw new e8e.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};Go.TSTInfo=nq});var Ele=m(Ho=>{"use strict";var t8e=Ho&&Ho.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:o(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),r8e=Ho&&Ho.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),n8e=Ho&&Ho.__importStar||(function(){var t=o(function(e){return t=Object.getOwnPropertyNames||function(r){var n=[];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[n.length]=s);return n},t(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var n=t(e),s=0;s<n.length;s++)n[s]!=="default"&&t8e(r,e,n[s]);return r8e(r,e),r}})();Object.defineProperty(Ho,"__esModule",{value:!0});Ho.RFC3161Timestamp=void 0;var s8e=mN(),sq=n8e(Af()),gle=yN(),IE=rq(),i8e=mle(),o8e="1.2.840.113549.1.7.2",a8e="1.2.840.113549.1.9.16.1.4",c8e="1.2.840.113549.1.9.4",iq=class t{static{o(this,"RFC3161Timestamp")}root;constructor(e){this.root=e}static parse(e){let r=s8e.ASN1Obj.parseBuffer(e);return new t(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return gle.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return gle.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new i8e.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new IE.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==o8e)throw new IE.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==a8e)throw new IE.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=sq.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].valu
Line truncated
|
||||
|
||||
`,S9e=/\u2014 (\S+) (\S+)\n/g;function N9e(t,e){let r=t.inclusionProof,n=_q.fromString(r.checkpoint.envelope),s=FN.fromString(n.note);if(!x9e(n,e))throw new SE.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return s}o(N9e,"verifyCheckpoint");function x9e(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(n=>{let s=e.find(i=>jle.crypto.bufferEqual(i.logID.subarray(0,4),n.keyHint)&&i.baseURL.match(n.name));return s?jle.crypto.verify(r,s.publicKey,n.signature):!1})}o(x9e,"verifySignedNote");var _q=class t{static{o(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(Pq))throw new SE.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(Pq),n=e.slice(0,r+1),i=e.slice(r+Pq.length).matchAll(S9e),a=Array.from(i,c=>{let[,l,u]=c,d=Buffer.from(u,"base64");if(d.length<5)throw new SE.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:l,keyHint:d.subarray(0,4),signature:d.subarray(4)}});if(a.length===0)throw new SE.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(n,a)}},FN=class t{static{o(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,n,s){this.origin=e,this.logSize=r,this.logHash=n,this.rest=s}static fromString(e){let r=e.trimEnd().split(`
|
||||
`);if(r.length<3)throw new SE.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let n=r[0],s=BigInt(r[1]),i=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(n,s,i,a)}};NE.LogCheckpoint=FN});var Xle=m(Mq=>{"use strict";Object.defineProperty(Mq,"__esModule",{value:!0});Mq.verifyMerkleInclusion=T9e;var Oq=Ri(),kq=Mr(),Q9e=Buffer.from([0]),R9e=Buffer.from([1]);function T9e(t,e){let r=t.inclusionProof,n=BigInt(r.logIndex),s=BigInt(e.logSize);if(n<0n||n>=s)throw new kq.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${n}`});let{inner:i,border:a}=v9e(n,s);if(r.hashes.length!==i+a)throw new kq.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,i),l=r.hashes.slice(i),u=M9e(t.canonicalizedBody),d=_9e(P9e(u,c,n),l);if(!Oq.crypto.bufferEqual(d,e.logHash))throw new kq.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}o(T9e,"verifyMerkleInclusion");function v9e(t,e){let r=k9e(t,e),n=D9e(t>>BigInt(r));return{inner:r,border:n}}o(v9e,"decompInclProof");function P9e(t,e,r){return e.reduce((n,s,i)=>r>>BigInt(i)&BigInt(1)?Dq(s,n):Dq(n,s),t)}o(P9e,"chainInner");function _9e(t,e){return e.reduce((r,n)=>Dq(n,r),t)}o(_9e,"chainBorderRight");function k9e(t,e){return O9e(t^e-BigInt(1))}o(k9e,"innerProofSize");function D9e(t){return t.toString(2).split("1").length-1}o(D9e,"onesCount");function O9e(t){return t===0n?0:t.toString(2).length}o(O9e,"bitLength");function Dq(t,e){return Oq.crypto.digest("sha256",R9e,t,e)}o(Dq,"hashChildren");function M9e(t){return Oq.crypto.digest("sha256",Q9e,t)}o(M9e,"hashLeaf")});var eue=m(Lq=>{"use strict";Object.defineProperty(Lq,"__esModule",{value:!0});Lq.verifyTLogSET=U9e;var Zle=Ri(),L9e=Mr(),F9e=ff();function U9e(t,e){if(!(0,F9e.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(s=>{let i=q9e(t),a=Buffer.from(Zle.json.canonicalize(i),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return Zle.crypto.verify(a,s.publicKey,c)}))throw new L9e.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}o(U9e,"verifyTLogSET");function q9e(t){let{integratedTime:e,logIndex:r,logId:n,canonicalizedBody:s}=t;return{body:s.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:n.keyId.toString("hex")}}o(q9e,"toVerificationPayload")});var rue=m(UN=>{"use strict";Object.defineProperty(UN,"__esModule",{value:!0});UN.verifyTLogBody=J9e;UN.verifyTLogInclusion=$9e;var tue=Jle(),qq=Mr(),Fq=$le(),Uq=Yle(),G9e=Wle(),H9e=Kle(),V9e=Xle(),z9e=eue();function J9e(t,e){let{kind:r,version:n}=t.kindVersion,s=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==s.kind||n!==s.apiVersion)throw new qq.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${r}/${n}, received: ${s.kind}/${s.apiVersion}`});switch(r){case"dsse":if(n==Fq.DSSE_API_VERSION_V1)return(0,Fq.verifyDSSETLogBody)(s,e);{let i=tue.Entry.fromJSON(s);return(0,Fq.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,G9e.verifyIntotoTLogBody)(s,e);case"hashedrekord":if(n==Uq.HASHEDREKORD_API_VERSION_V1)return(0,Uq.verifyHashedRekordTLogBody)(s,e);{let i=tue.Entry.fromJSON(s);return(0,Uq.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new qq.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${r}`})}}o(J9e,"verifyTLogBody");function $9e(t,e){let r=!1;if(Y9e(t)&&((0,z9e.verifyTLogSET)(t,e),r=!0),W9e(t)){let n=(0,H9e.verifyCheckpoint)(t,e);(0,V9e.verifyMerkleInclusion)(t,n),r=!0}if(!r)throw new qq.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}o($9e,"verifyTLogInclusion");function Y9e(t){return t.inclusionPromise!==void 0}o(Y9e,"isTLogEntryWithInclusionPromise");function W9e(t){return t.inclusionProof!==void 0}o(W9e,"isTLogEntryWithInclusionProof")});var aue=m(qN=>{"use strict";Object.defineProperty(qN,"__esModule",{value:!0});qN.Verifier=void 0;var j9e=require("util"),Ef=Mr(),nue=kle(),Gq=Dle(),sue=Lle(),iue=rue(),Hq=class{static{o(this,"Verifier")}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 n=this.verifyTimestamps(e),s=this.verifySigningKey(e,n);return this.verifyTLogs(e),this.verifySignature(e,s),r&&this.verifyPolicy(r,s.identity||{}),s}verifyTimestamps(e){let r=[];for(let n of e.timestamps)switch(n.$case){case"timestamp-authority":r.push((0,sue.getTSATimestamp)(n.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities));break;case"transparency-log":{let s=(0,sue.getTLogTimestamp)(n.tlogEntry);s&&r.push(s);break}}if(oue(r))throw new Ef.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"});if(r.length<this.options.timestampThresho
Line truncated
|
||||
${l}`}let A=ox(t.buffer,s[c],i[c],t.position,d);l+=`${" ".repeat(r.indent)}${ax((t.line+1).toString(),u)} | ${A.str}
|
||||
`,Q9e=/\u2014 (\S+) (\S+)\n/g;function R9e(t,e){let r=t.inclusionProof,n=Dq.fromString(r.checkpoint.envelope),s=UN.fromString(n.note);if(!T9e(n,e))throw new NE.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});return s}o(R9e,"verifyCheckpoint");function T9e(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.some(n=>{let s=e.find(i=>Xle.crypto.bufferEqual(i.logID.subarray(0,4),n.keyHint)&&i.baseURL.match(n.name));return s?Xle.crypto.verify(r,s.publicKey,n.signature):!1})}o(T9e,"verifySignedNote");var Dq=class t{static{o(this,"SignedNote")}note;signatures;constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(kq))throw new NE.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(kq),n=e.slice(0,r+1),i=e.slice(r+kq.length).matchAll(Q9e),a=Array.from(i,c=>{let[,l,u]=c,d=Buffer.from(u,"base64");if(d.length<5)throw new NE.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:l,keyHint:d.subarray(0,4),signature:d.subarray(4)}});if(a.length===0)throw new NE.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(n,a)}},UN=class t{static{o(this,"LogCheckpoint")}origin;logSize;logHash;rest;constructor(e,r,n,s){this.origin=e,this.logSize=r,this.logHash=n,this.rest=s}static fromString(e){let r=e.trimEnd().split(`
|
||||
`);if(r.length<3)throw new NE.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let n=r[0],s=BigInt(r[1]),i=Buffer.from(r[2],"base64"),a=r.slice(3);return new t(n,s,i,a)}};xE.LogCheckpoint=UN});var eue=m(Fq=>{"use strict";Object.defineProperty(Fq,"__esModule",{value:!0});Fq.verifyMerkleInclusion=_9e;var Lq=Ri(),Oq=Mr(),v9e=Buffer.from([0]),P9e=Buffer.from([1]);function _9e(t,e){let r=t.inclusionProof,n=BigInt(r.logIndex),s=BigInt(e.logSize);if(n<0n||n>=s)throw new Oq.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${n}`});let{inner:i,border:a}=k9e(n,s);if(r.hashes.length!==i+a)throw new Oq.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=r.hashes.slice(0,i),l=r.hashes.slice(i),u=U9e(t.canonicalizedBody),d=O9e(D9e(u,c,n),l);if(!Lq.crypto.bufferEqual(d,e.logHash))throw new Oq.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}o(_9e,"verifyMerkleInclusion");function k9e(t,e){let r=M9e(t,e),n=L9e(t>>BigInt(r));return{inner:r,border:n}}o(k9e,"decompInclProof");function D9e(t,e,r){return e.reduce((n,s,i)=>r>>BigInt(i)&BigInt(1)?Mq(s,n):Mq(n,s),t)}o(D9e,"chainInner");function O9e(t,e){return e.reduce((r,n)=>Mq(n,r),t)}o(O9e,"chainBorderRight");function M9e(t,e){return F9e(t^e-BigInt(1))}o(M9e,"innerProofSize");function L9e(t){return t.toString(2).split("1").length-1}o(L9e,"onesCount");function F9e(t){return t===0n?0:t.toString(2).length}o(F9e,"bitLength");function Mq(t,e){return Lq.crypto.digest("sha256",P9e,t,e)}o(Mq,"hashChildren");function U9e(t){return Lq.crypto.digest("sha256",v9e,t)}o(U9e,"hashLeaf")});var rue=m(Uq=>{"use strict";Object.defineProperty(Uq,"__esModule",{value:!0});Uq.verifyTLogSET=H9e;var tue=Ri(),q9e=Mr(),G9e=hf();function H9e(t,e){if(!(0,G9e.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(s=>{let i=V9e(t),a=Buffer.from(tue.json.canonicalize(i),"utf8"),c=t.inclusionPromise.signedEntryTimestamp;return tue.crypto.verify(a,s.publicKey,c)}))throw new q9e.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}o(H9e,"verifyTLogSET");function V9e(t){let{integratedTime:e,logIndex:r,logId:n,canonicalizedBody:s}=t;return{body:s.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:n.keyId.toString("hex")}}o(V9e,"toVerificationPayload")});var sue=m(qN=>{"use strict";Object.defineProperty(qN,"__esModule",{value:!0});qN.verifyTLogBody=W9e;qN.verifyTLogInclusion=j9e;var nue=Yle(),Hq=Mr(),qq=Wle(),Gq=jle(),z9e=Kle(),J9e=Zle(),$9e=eue(),Y9e=rue();function W9e(t,e){let{kind:r,version:n}=t.kindVersion,s=JSON.parse(t.canonicalizedBody.toString("utf8"));if(r!==s.kind||n!==s.apiVersion)throw new Hq.VerificationError({code:"TLOG_BODY_ERROR",message:`kind/version mismatch - expected: ${r}/${n}, received: ${s.kind}/${s.apiVersion}`});switch(r){case"dsse":if(n==qq.DSSE_API_VERSION_V1)return(0,qq.verifyDSSETLogBody)(s,e);{let i=nue.Entry.fromJSON(s);return(0,qq.verifyDSSETLogBodyV2)(i,e)}case"intoto":return(0,z9e.verifyIntotoTLogBody)(s,e);case"hashedrekord":if(n==Gq.HASHEDREKORD_API_VERSION_V1)return(0,Gq.verifyHashedRekordTLogBody)(s,e);{let i=nue.Entry.fromJSON(s);return(0,Gq.verifyHashedRekordTLogBodyV2)(i,e)}default:throw new Hq.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported kind: ${r}`})}}o(W9e,"verifyTLogBody");function j9e(t,e){let r=!1;if(K9e(t)&&((0,Y9e.verifyTLogSET)(t,e),r=!0),X9e(t)){let n=(0,J9e.verifyCheckpoint)(t,e);(0,$9e.verifyMerkleInclusion)(t,n),r=!0}if(!r)throw new Hq.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"})}o(j9e,"verifyTLogInclusion");function K9e(t){return t.inclusionPromise!==void 0}o(K9e,"isTLogEntryWithInclusionPromise");function X9e(t){return t.inclusionProof!==void 0}o(X9e,"isTLogEntryWithInclusionProof")});var lue=m(GN=>{"use strict";Object.defineProperty(GN,"__esModule",{value:!0});GN.Verifier=void 0;var Z9e=require("util"),yf=Mr(),iue=Ole(),Vq=Mle(),oue=Ule(),aue=sue(),zq=class{static{o(this,"Verifier")}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 n=this.verifyTimestamps(e),s=this.verifySigningKey(e,n);return this.verifyTLogs(e),this.verifySignature(e,s),r&&this.verifyPolicy(r,s.identity||{}),s}verifyTimestamps(e){let r=[];for(let n of e.timestamps)switch(n.$case){case"timestamp-authority":r.push((0,oue.getTSATimestamp)(n.timestamp,e.signature.signature,this.trustMaterial.timestampAuthorities));break;case"transparency-log":{let s=(0,oue.getTLogTimestamp)(n.tlogEntry);s&&r.push(s);break}}if(cue(r))throw new yf.VerificationError({code:"TIMESTAMP_ERROR",message:"duplicate timestamp"});if(r.length<this.options.timestampThresho
Line truncated
|
||||
${l}`}let A=ax(t.buffer,s[c],i[c],t.position,d);l+=`${" ".repeat(r.indent)}${cx((t.line+1).toString(),u)} | ${A.str}
|
||||
`,l+=`${"-".repeat(r.indent+u+3+A.pos)}^
|
||||
`;for(let p=1;p<=r.linesAfter&&!(c+p>=i.length);p++){let f=ox(t.buffer,s[c+p],i[c+p],t.position-(s[c]-s[c+p]),d);l+=`${" ".repeat(r.indent)}${ax((t.line+p+1).toString(),u)} | ${f.str}
|
||||
`}return l.replace(/\n$/,"")}o(eAe,"makeSnippet");function nG(t,e){let r="";return t.mark?(t.mark.name&&(r+=`in "${t.mark.name}" `),r+=`(${t.mark.line+1}:${t.mark.column+1})`,!e&&t.mark.snippet&&(r+=`
|
||||
`;for(let p=1;p<=r.linesAfter&&!(c+p>=i.length);p++){let f=ax(t.buffer,s[c+p],i[c+p],t.position-(s[c]-s[c+p]),d);l+=`${" ".repeat(r.indent)}${cx((t.line+p+1).toString(),u)} | ${f.str}
|
||||
`}return l.replace(/\n$/,"")}o(rAe,"makeSnippet");function iG(t,e){let r="";return t.mark?(t.mark.name&&(r+=`in "${t.mark.name}" `),r+=`(${t.mark.line+1}:${t.mark.column+1})`,!e&&t.mark.snippet&&(r+=`
|
||||
|
||||
${t.mark.snippet}`),`${t.reason} ${r}`):t.reason}o(nG,"formatError");var DE=class extends Error{static{o(this,"YAMLException")}reason;mark;constructor(t,e){super(),this.name="YAMLException",this.reason=t,this.mark=e,this.message=nG(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(t){return`${this.name}: ${nG(this,t)}`}};function qE(t,e,r,n=""){let s=0,i=0;for(let c=0;c<e;c++){let l=t.charCodeAt(c);l===10?(s++,i=c+1):l===13&&(s++,t.charCodeAt(c+1)===10&&c++,i=c+1)}let a={name:n,buffer:t,position:e,line:s,column:e-i};throw a.snippet=eAe(a),new DE(r,a)}o(qE,"throwErrorAt");var tAe=-1;function sG(t){switch(t){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
||||
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}o(sG,"simpleEscapeSequence");var fG=new Array(256),hG=new Array(256);for(let t=0;t<256;t++)fG[t]=sG(t)?1:0,hG[t]=sG(t);function rAe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}o(rAe,"charFromCodepoint");function nAe(t){return t>=48&&t<=57?t-48:(t|32)-97+10}o(nAe,"fromHexCode$1");function sAe(t){return t===120?2:t===117?4:8}o(sAe,"escapedHexLen$1");function OE(t,e,r){let n=0;for(;e<r;){let s=t.charCodeAt(e);if(s===10)n++,e++;else if(s===13)n++,e++,t.charCodeAt(e)===10&&e++;else if(s===32||s===9)e++;else break}return{position:e,breaks:n}}o(OE,"skipFoldedBreaks");function Cx(t){return t===1?" ":`
|
||||
`.repeat(t-1)}o(Cx,"foldedBreaks");function iAe(t,e,r){let n="",s=e,i=e,a=e;for(;s<r;){let c=t.charCodeAt(s);if(c===10||c===13){n+=t.slice(i,a);let l=OE(t,s,r);n+=Cx(l.breaks),s=i=a=l.position}else s++,c!==32&&c!==9&&(a=s)}return n+t.slice(i,a)}o(iAe,"getPlainValue");function oAe(t,e,r){let n="",s=e,i=e,a=e;for(;s<r;){let c=t.charCodeAt(s);if(c===39)n+=t.slice(i,s)+"'",s+=2,i=a=s;else if(c===10||c===13){n+=t.slice(i,a);let l=OE(t,s,r);n+=Cx(l.breaks),s=i=a=l.position}else s++,c!==32&&c!==9&&(a=s)}return n+t.slice(i,r)}o(oAe,"getSingleQuotedValue");function aAe(t,e,r){let n="",s=e,i=e,a=e;for(;s<r;){let c=t.charCodeAt(s);if(c===92){n+=t.slice(i,s),s++;let l=t.charCodeAt(s);if(l===10||l===13)s=OE(t,s,r).position;else if(l<256&&fG[l])n+=hG[l],s++;else{let u=sAe(l),d=0;for(;u>0;u--){s++;let A=nAe(t.charCodeAt(s));d=(d<<4)+A}n+=rAe(d),s++}i=a=s}else if(c===10||c===13){n+=t.slice(i,a);let l=OE(t,s,r);n+=Cx(l.breaks),s=i=a=l.position}else s++,c!==32&&c!==9&&(a=s)}return n+t.slice(i,r)}o(aAe,"getDoubleQuotedValue");function iG(t,e,r,n,s,i){let a=n<0?0:n,c=t.slice(e,r).replace(/\r\n?/g,`
|
||||
${t.mark.snippet}`),`${t.reason} ${r}`):t.reason}o(iG,"formatError");var OE=class extends Error{static{o(this,"YAMLException")}reason;mark;constructor(t,e){super(),this.name="YAMLException",this.reason=t,this.mark=e,this.message=iG(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(t){return`${this.name}: ${iG(this,t)}`}};function GE(t,e,r,n=""){let s=0,i=0;for(let c=0;c<e;c++){let l=t.charCodeAt(c);l===10?(s++,i=c+1):l===13&&(s++,t.charCodeAt(c+1)===10&&c++,i=c+1)}let a={name:n,buffer:t,position:e,line:s,column:e-i};throw a.snippet=rAe(a),new OE(r,a)}o(GE,"throwErrorAt");var nAe=-1;function oG(t){switch(t){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
||||
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"\x85";case 95:return"\xA0";case 76:return"\u2028";case 80:return"\u2029";default:return""}}o(oG,"simpleEscapeSequence");var mG=new Array(256),gG=new Array(256);for(let t=0;t<256;t++)mG[t]=oG(t)?1:0,gG[t]=oG(t);function sAe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}o(sAe,"charFromCodepoint");function iAe(t){return t>=48&&t<=57?t-48:(t|32)-97+10}o(iAe,"fromHexCode$1");function oAe(t){return t===120?2:t===117?4:8}o(oAe,"escapedHexLen$1");function ME(t,e,r){let n=0;for(;e<r;){let s=t.charCodeAt(e);if(s===10)n++,e++;else if(s===13)n++,e++,t.charCodeAt(e)===10&&e++;else if(s===32||s===9)e++;else break}return{position:e,breaks:n}}o(ME,"skipFoldedBreaks");function Ix(t){return t===1?" ":`
|
||||
`.repeat(t-1)}o(Ix,"foldedBreaks");function aAe(t,e,r){let n="",s=e,i=e,a=e;for(;s<r;){let c=t.charCodeAt(s);if(c===10||c===13){n+=t.slice(i,a);let l=ME(t,s,r);n+=Ix(l.breaks),s=i=a=l.position}else s++,c!==32&&c!==9&&(a=s)}return n+t.slice(i,a)}o(aAe,"getPlainValue");function cAe(t,e,r){let n="",s=e,i=e,a=e;for(;s<r;){let c=t.charCodeAt(s);if(c===39)n+=t.slice(i,s)+"'",s+=2,i=a=s;else if(c===10||c===13){n+=t.slice(i,a);let l=ME(t,s,r);n+=Ix(l.breaks),s=i=a=l.position}else s++,c!==32&&c!==9&&(a=s)}return n+t.slice(i,r)}o(cAe,"getSingleQuotedValue");function lAe(t,e,r){let n="",s=e,i=e,a=e;for(;s<r;){let c=t.charCodeAt(s);if(c===92){n+=t.slice(i,s),s++;let l=t.charCodeAt(s);if(l===10||l===13)s=ME(t,s,r).position;else if(l<256&&mG[l])n+=gG[l],s++;else{let u=oAe(l),d=0;for(;u>0;u--){s++;let A=iAe(t.charCodeAt(s));d=(d<<4)+A}n+=sAe(d),s++}i=a=s}else if(c===10||c===13){n+=t.slice(i,a);let l=ME(t,s,r);n+=Ix(l.breaks),s=i=a=l.position}else s++,c!==32&&c!==9&&(a=s)}return n+t.slice(i,r)}o(lAe,"getDoubleQuotedValue");function aG(t,e,r,n,s,i){let a=n<0?0:n,c=t.slice(e,r).replace(/\r\n?/g,`
|
||||
`),l=c===""?[]:(c.endsWith(`
|
||||
`)?c.slice(0,-1):c).split(`
|
||||
`),u="",d=!1,A=0,p=!1;for(let f of l){let h=0;for(;h<a&&f.charCodeAt(h)===32;)h++;if(n<0||h>=f.length){A++;continue}let g=f.slice(a),y=g.charCodeAt(0);i?y===32||y===9?(p=!0,u+=`
|
||||
@@ -112,66 +112,66 @@ ${t.mark.snippet}`),`${t.reason} ${r}`):t.reason}o(nG,"formatError");var DE=clas
|
||||
`.repeat(A):u+=`
|
||||
`.repeat(d?1+A:A),u+=g,d=!0,A=0}return s===3?u+=`
|
||||
`.repeat(d?1+A:A):s!==2&&d&&(u+=`
|
||||
`),u}o(iG,"getBlockValue");function cAe(t,e){if(e.valueStart===tAe)return"";let{valueStart:r,valueEnd:n}=e;if(e.fast)return t.slice(r,n);switch(e.style){case 2:return oAe(t,r,n);case 3:return aAe(t,r,n);case 4:return iG(t,r,n,e.indent,e.chomping,!1);case 5:return iG(t,r,n,e.indent,e.chomping,!0);default:return iAe(t,r,n)}}o(cAe,"getScalarValue");var lAe={"!":"!","!!":"tag:yaml.org,2002:"};function mG(t,e){if(t.startsWith("!<")&&t.endsWith(">"))return decodeURIComponent(t.slice(2,-1));let r=t.indexOf("!",1),n=r===-1?"!":t.slice(0,r+1),s=e?.[n]??lAe[n]??n;return decodeURIComponent(s)+decodeURIComponent(t.slice(n.length))}o(mG,"tagNameFull");var pd=-1,Ix={filename:"",schema:Kde,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function uAe(t){return"tagStart"in t&&t.tagStart!==pd?t.tagStart:"anchorStart"in t&&t.anchorStart!==pd?t.anchorStart:"valueStart"in t&&t.valueStart!==pd?t.valueStart:"start"in t?t.start:0}o(uAe,"eventPosition$1");function un(t,e){qE(t.source,t.position,e,t.filename)}o(un,"throwError$1");function gG(t,e,r,n){try{return r.finalize(n)}catch(s){if(s instanceof DE)throw s;qE(t.source,e,s instanceof Error?s.message:String(s),t.filename)}}o(gG,"finalizeCollection");function kE(t,e,r){let n=t[r];if(n)return n;for(let s of e)if(r.startsWith(s.tagName))return s}o(kE,"lookupTag");function dAe(t,e,r,n,s){let i=kE(e,r,n);if(i)return i;un(t,`unknown ${s} tag !<${n}>`)}o(dAe,"findExplicitTag");function AAe(t,e){let r=cAe(t.source,e),n=e.tagStart===pd?"":t.source.slice(e.tagStart,e.tagEnd),s=t.schema.defaultScalarTag;if(n!==""){if(n==="!")return{value:r,tag:s};let i=mG(n,t.tagHandlers),a=kE(t.schema.exact.scalar,t.schema.prefix.scalar,i);if(a){let l=a.resolve(r,!0,i);return l===ve&&un(t,`cannot resolve a node with !<${i}> explicit tag`),{value:l,tag:a}}let c=kE(t.schema.exact.mapping,t.schema.prefix.mapping,i)??kE(t.schema.exact.sequence,t.schema.prefix.sequence,i);if(c){r!==""&&un(t,`cannot resolve a node with !<${i}> explicit tag`);let l=c.create(i);return{value:c.carrierIsResult?l:gG(t,t.position,c,l),tag:c}}un(t,`unknown scalar tag !<${i}>`)}if(e.style===1){let i=t.schema.implicitScalarByFirstChar.get(r.charAt(0))??t.schema.implicitScalarAnyFirstChar;for(let a of i){let c=a.resolve(r,!1,a.tagName);if(c!==ve)return{value:c,tag:a}}}return{value:s.resolve(r,!1,s.tagName),tag:s}}o(AAe,"constructScalar");function oG(t,e,r,n,s,i){let a=e.tagStart===pd?"":t.source.slice(e.tagStart,e.tagEnd),c=a===""||a==="!"?s:mG(a,t.tagHandlers);return{tagName:c,tag:dAe(t,r,n,c,i)}}o(oG,"collectionTag");function EG(t){return t.nodeKind==="mapping"}o(EG,"isMappingTag");function aG(t,e,r,n){for(let s of n.keys(r)){if(t.maxTotalMergeKeys!==-1&&++t.totalMergeKeys>t.maxTotalMergeKeys&&un(t,`merge keys exceeded maxTotalMergeKeys (${t.maxTotalMergeKeys})`),e.tag.has(e.value,s))continue;let i=e.tag.addPair(e.value,s,n.get(r,s));i&&un(t,i),(e.overridable??=new Set).add(s)}}o(aG,"mergeKeys");function pAe(t,e,r,n){if(t.position=e.keyPosition,EG(n))aG(t,e,r,n);else if(n.nodeKind==="sequence"&&Array.isArray(r))for(let s of r)aG(t,e,s,e.tag);else un(t,"cannot merge mappings; the provided source object is unacceptable")}o(pAe,"mergeSource");function fAe(t,e,r,n,s){if(t.position=e.keyPosition,r===mx){pAe(t,e,n,s);return}!t.json&&e.tag.has(e.value,r)&&!e.overridable?.has(r)&&un(t,"duplicated mapping key");let i=e.tag.addPair(e.value,r,n);i&&un(t,i),e.overridable?.delete(r)}o(fAe,"addMappingValue");function cx(t,e,r){let n=t.frames[t.frames.length-1];if(n.kind==="document")n.value=e,n.hasValue=!0;else if(n.kind==="sequence"){n.merge&&(EG(r)||un(t,"cannot merge mappings; the provided source object is unacceptable"));let s=n.tag.addItem(n.value,e,n.index++);s&&un(t,s)}else if(n.hasKey){let s=n.key;n.key=void 0,n.hasKey=!1,fAe(t,n,s,e,r)}else n.key=e,n.keyPosition=t.position,n.hasKey=!0}o(cx,"addValue");function lx(t,e,r,n,s){if(e.anchorStart!==pd){let i={value:r,tag:n,isValueFinal:s};return t.anchors.set(t.source.slice(e.anchorStart,e.anchorEnd),i),i}return null}o(lx,"storeAnchor");function hAe(t,e){let r={...Ix,...e,events:t,documents:[],eventIndex:0,position:0,frames:[],anchors:new Map,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0};for(;r.eventIndex<r.events.length;){let n=r.events[r.eventIndex++];switch(r.position=uAe(n),n.type){case 1:r.anchors=new Map,r.aliasCount=0,r.tagHandlers=Object.create(null);for(let s of n.directives)s.kind==="tag"&&(r.tagHandlers[s.handle]=s.prefix);r.frames.push({kind:"document",position:r.position,value:void 0,hasValue:!1});break;case 4:{let{value:s,tag:i}=AAe(r,n);lx(r,n,s,i,!0),cx(r,s,i);break}case 2:{let s=oG(r,n,r.schema.exact.sequence,r.schema.prefix.sequence,"tag:yaml.org,2002:seq","sequence"),i=s.tag.create(s.tagName),a=lx(r,n,i,s.tag,s.tag.carrierIsResult),c=r.frames[r.frames.length-1],l=c!==void 0&&c.kind==="mapping"&&c.hasKey&&c.key===mx;r.frames.push({kind:"sequence",position:r.position,value:i,tag:s.tag,anchor:a,index:0,merge:l});break}case 3:{let s=oG(r,n,r.schema.exact.mapping,r.sche
Line truncated
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}o(Kl,"getBooleanInput");function Oh(t,e){if(process.env.GITHUB_OUTPUT||"")return VE("OUTPUT",Nx(t,e));process.stdout.write(fv.EOL),ta("set-output",{name:t},ea(e))}o(Oh,"setOutput");function Qj(t){process.exitCode=pv.Failure,hA(t)}o(Qj,"setFailed");function ya(){return process.env.RUNNER_DEBUG==="1"}o(ya,"isDebug");function b(t){ta("debug",{},t)}o(b,"debug");function hA(t,e={}){ta("error",bx(e),t instanceof Error?t.toString():t)}o(hA,"error");function Ve(t,e={}){ta("warning",bx(e),t instanceof Error?t.toString():t)}o(Ve,"warning");function S(t){process.stdout.write(t+fv.EOL)}o(S,"info");function bSe(t){Sx("group",t)}o(bSe,"startGroup");function wSe(){Sx("endgroup")}o(wSe,"endGroup");function it(t,e){return BSe(this,void 0,void 0,function*(){bSe(t);let r;try{r=yield e()}finally{wSe()}return r})}o(it,"group");function gn(t,e){if(process.env.GITHUB_STATE||"")return VE("STATE",Nx(t,e));ta("save-state",{name:t},ea(e))}o(gn,"saveState");function Rj(t){return process.env[`STATE_${t}`]||""}o(Rj,"getState");var Yw=w(require("fs"),1),B1=w(require("os"),1),b1=w(require("path"),1);var vj=w(require("os"),1);function Mh(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(Mh,"toCommandValue");function Pj(t,e,r){let n=new hv(t,e,r);process.stdout.write(n.toString()+vj.EOL)}o(Pj,"issueCommand");var Tj="::",hv=class{static{o(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=Tj+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let s=this.properties[n];s&&(r?r=!1:e+=",",e+=`${n}=${NSe(s)}`)}}return e+=`${Tj}${SSe(this.message)}`,e}};function SSe(t){return Mh(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(SSe,"escapeData");function NSe(t){return Mh(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(NSe,"escapeProperty");var Oj=w(require("os"),1);var kj=require("os"),Lh=require("fs");var mv=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},{access:xSe,appendFile:QSe,writeFile:RSe}=Lh.promises,_j="GITHUB_STEP_SUMMARY";var gv=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){return mv(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[_j];if(!e)throw new Error(`Unable to find environment variable for $${_j}. Check if your runtime environment supports job summaries.`);try{yield xSe(e,Lh.constants.R_OK|Lh.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let s=Object.entries(n).map(([i,a])=>` ${i}="${a}"`).join("");return r?`<${e}${s}>${r}</${e}>`:`<${e}${s}>`}write(e){return mv(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?RSe:QSe)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return mv(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(kj.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",s=e.map(a=>this.wrap("li",a)).join(""),i=this.wrap(n,s);return this.addRaw(i).addEOL()}addTable(e){let r=e.map(s=>{let i=s.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:u,rowspan:d}=a,A=c?"th":"td",p=Object.assign(Object.assign({},u&&{colspan:u}),d&&{rowspan:d});return this.wrap(A,l,p)}).join("");return this.wrap("tr",i)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:s,height:i}=n||{},a=Object.assign(Object.assign({},s&&{width:s}),i&&{height:i}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",i=this.wrap(s,e);return this.addRaw(i).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}Line truncated
|
||||
`),u}o(aG,"getBlockValue");function uAe(t,e){if(e.valueStart===nAe)return"";let{valueStart:r,valueEnd:n}=e;if(e.fast)return t.slice(r,n);switch(e.style){case 2:return cAe(t,r,n);case 3:return lAe(t,r,n);case 4:return aG(t,r,n,e.indent,e.chomping,!1);case 5:return aG(t,r,n,e.indent,e.chomping,!0);default:return aAe(t,r,n)}}o(uAe,"getScalarValue");var dAe={"!":"!","!!":"tag:yaml.org,2002:"};function EG(t,e){if(t.startsWith("!<")&&t.endsWith(">"))return decodeURIComponent(t.slice(2,-1));let r=t.indexOf("!",1),n=r===-1?"!":t.slice(0,r+1),s=e?.[n]??dAe[n]??n;return decodeURIComponent(s)+decodeURIComponent(t.slice(n.length))}o(EG,"tagNameFull");var pd=-1,Bx={filename:"",schema:Zde,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function AAe(t){return"tagStart"in t&&t.tagStart!==pd?t.tagStart:"anchorStart"in t&&t.anchorStart!==pd?t.anchorStart:"valueStart"in t&&t.valueStart!==pd?t.valueStart:"start"in t?t.start:0}o(AAe,"eventPosition$1");function un(t,e){GE(t.source,t.position,e,t.filename)}o(un,"throwError$1");function yG(t,e,r,n){try{return r.finalize(n)}catch(s){if(s instanceof OE)throw s;GE(t.source,e,s instanceof Error?s.message:String(s),t.filename)}}o(yG,"finalizeCollection");function DE(t,e,r){let n=t[r];if(n)return n;for(let s of e)if(r.startsWith(s.tagName))return s}o(DE,"lookupTag");function pAe(t,e,r,n,s){let i=DE(e,r,n);if(i)return i;un(t,`unknown ${s} tag !<${n}>`)}o(pAe,"findExplicitTag");function fAe(t,e){let r=uAe(t.source,e),n=e.tagStart===pd?"":t.source.slice(e.tagStart,e.tagEnd),s=t.schema.defaultScalarTag;if(n!==""){if(n==="!")return{value:r,tag:s};let i=EG(n,t.tagHandlers),a=DE(t.schema.exact.scalar,t.schema.prefix.scalar,i);if(a){let l=a.resolve(r,!0,i);return l===ve&&un(t,`cannot resolve a node with !<${i}> explicit tag`),{value:l,tag:a}}let c=DE(t.schema.exact.mapping,t.schema.prefix.mapping,i)??DE(t.schema.exact.sequence,t.schema.prefix.sequence,i);if(c){r!==""&&un(t,`cannot resolve a node with !<${i}> explicit tag`);let l=c.create(i);return{value:c.carrierIsResult?l:yG(t,t.position,c,l),tag:c}}un(t,`unknown scalar tag !<${i}>`)}if(e.style===1){let i=t.schema.implicitScalarByFirstChar.get(r.charAt(0))??t.schema.implicitScalarAnyFirstChar;for(let a of i){let c=a.resolve(r,!1,a.tagName);if(c!==ve)return{value:c,tag:a}}}return{value:s.resolve(r,!1,s.tagName),tag:s}}o(fAe,"constructScalar");function cG(t,e,r,n,s,i){let a=e.tagStart===pd?"":t.source.slice(e.tagStart,e.tagEnd),c=a===""||a==="!"?s:EG(a,t.tagHandlers);return{tagName:c,tag:pAe(t,r,n,c,i)}}o(cG,"collectionTag");function CG(t){return t.nodeKind==="mapping"}o(CG,"isMappingTag");function lG(t,e,r,n){for(let s of n.keys(r)){if(t.maxTotalMergeKeys!==-1&&++t.totalMergeKeys>t.maxTotalMergeKeys&&un(t,`merge keys exceeded maxTotalMergeKeys (${t.maxTotalMergeKeys})`),e.tag.has(e.value,s))continue;let i=e.tag.addPair(e.value,s,n.get(r,s));i&&un(t,i),(e.overridable??=new Set).add(s)}}o(lG,"mergeKeys");function hAe(t,e,r,n){if(t.position=e.keyPosition,CG(n))lG(t,e,r,n);else if(n.nodeKind==="sequence"&&Array.isArray(r))for(let s of r)lG(t,e,s,e.tag);else un(t,"cannot merge mappings; the provided source object is unacceptable")}o(hAe,"mergeSource");function mAe(t,e,r,n,s){if(t.position=e.keyPosition,r===gx){hAe(t,e,n,s);return}!t.json&&e.tag.has(e.value,r)&&!e.overridable?.has(r)&&un(t,"duplicated mapping key");let i=e.tag.addPair(e.value,r,n);i&&un(t,i),e.overridable?.delete(r)}o(mAe,"addMappingValue");function lx(t,e,r){let n=t.frames[t.frames.length-1];if(n.kind==="document")n.value=e,n.hasValue=!0;else if(n.kind==="sequence"){n.merge&&(CG(r)||un(t,"cannot merge mappings; the provided source object is unacceptable"));let s=n.tag.addItem(n.value,e,n.index++);s&&un(t,s)}else if(n.hasKey){let s=n.key;n.key=void 0,n.hasKey=!1,mAe(t,n,s,e,r)}else n.key=e,n.keyPosition=t.position,n.hasKey=!0}o(lx,"addValue");function ux(t,e,r,n,s){if(e.anchorStart!==pd){let i={value:r,tag:n,isValueFinal:s};return t.anchors.set(t.source.slice(e.anchorStart,e.anchorEnd),i),i}return null}o(ux,"storeAnchor");function gAe(t,e){let r={...Bx,...e,events:t,documents:[],eventIndex:0,position:0,frames:[],anchors:new Map,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0};for(;r.eventIndex<r.events.length;){let n=r.events[r.eventIndex++];switch(r.position=AAe(n),n.type){case 1:r.anchors=new Map,r.aliasCount=0,r.tagHandlers=Object.create(null);for(let s of n.directives)s.kind==="tag"&&(r.tagHandlers[s.handle]=s.prefix);r.frames.push({kind:"document",position:r.position,value:void 0,hasValue:!1});break;case 4:{let{value:s,tag:i}=fAe(r,n);ux(r,n,s,i,!0),lx(r,s,i);break}case 2:{let s=cG(r,n,r.schema.exact.sequence,r.schema.prefix.sequence,"tag:yaml.org,2002:seq","sequence"),i=s.tag.create(s.tagName),a=ux(r,n,i,s.tag,s.tag.carrierIsResult),c=r.frames[r.frames.length-1],l=c!==void 0&&c.kind==="mapping"&&c.hasKey&&c.key===gx;r.frames.push({kind:"sequence",position:r.position,value:i,tag:s.tag,anchor:a,index:0,merge:l});break}case 3:{let s=cG(r,n,r.schema.exact.mapping,r.sche
Line truncated
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}o(Kl,"getBooleanInput");function Mh(t,e){if(process.env.GITHUB_OUTPUT||"")return zE("OUTPUT",xx(t,e));process.stdout.write(mv.EOL),ta("set-output",{name:t},ea(e))}o(Mh,"setOutput");function Tj(t){process.exitCode=hv.Failure,mA(t)}o(Tj,"setFailed");function ya(){return process.env.RUNNER_DEBUG==="1"}o(ya,"isDebug");function b(t){ta("debug",{},t)}o(b,"debug");function mA(t,e={}){ta("error",wx(e),t instanceof Error?t.toString():t)}o(mA,"error");function Ve(t,e={}){ta("warning",wx(e),t instanceof Error?t.toString():t)}o(Ve,"warning");function S(t){process.stdout.write(t+mv.EOL)}o(S,"info");function NSe(t){Nx("group",t)}o(NSe,"startGroup");function xSe(){Nx("endgroup")}o(xSe,"endGroup");function it(t,e){return SSe(this,void 0,void 0,function*(){NSe(t);let r;try{r=yield e()}finally{xSe()}return r})}o(it,"group");function gn(t,e){if(process.env.GITHUB_STATE||"")return zE("STATE",xx(t,e));ta("save-state",{name:t},ea(e))}o(gn,"saveState");function vj(t){return process.env[`STATE_${t}`]||""}o(vj,"getState");var Ww=w(require("fs"),1),w1=w(require("os"),1),S1=w(require("path"),1);var _j=w(require("os"),1);function Lh(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(Lh,"toCommandValue");function kj(t,e,r){let n=new gv(t,e,r);process.stdout.write(n.toString()+_j.EOL)}o(kj,"issueCommand");var Pj="::",gv=class{static{o(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=Pj+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let r=!0;for(let n in this.properties)if(this.properties.hasOwnProperty(n)){let s=this.properties[n];s&&(r?r=!1:e+=",",e+=`${n}=${RSe(s)}`)}}return e+=`${Pj}${QSe(this.message)}`,e}};function QSe(t){return Lh(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(QSe,"escapeData");function RSe(t){return Lh(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(RSe,"escapeProperty");var Lj=w(require("os"),1);var Oj=require("os"),Fh=require("fs");var Ev=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},{access:TSe,appendFile:vSe,writeFile:PSe}=Fh.promises,Dj="GITHUB_STEP_SUMMARY";var yv=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){return Ev(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[Dj];if(!e)throw new Error(`Unable to find environment variable for $${Dj}. Check if your runtime environment supports job summaries.`);try{yield TSe(e,Fh.constants.R_OK|Fh.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,r,n={}){let s=Object.entries(n).map(([i,a])=>` ${i}="${a}"`).join("");return r?`<${e}${s}>${r}</${e}>`:`<${e}${s}>`}write(e){return Ev(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?PSe:vSe)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return Ev(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,r=!1){return this._buffer+=e,r?this.addEOL():this}addEOL(){return this.addRaw(Oj.EOL)}addCodeBlock(e,r){let n=Object.assign({},r&&{lang:r}),s=this.wrap("pre",this.wrap("code",e),n);return this.addRaw(s).addEOL()}addList(e,r=!1){let n=r?"ol":"ul",s=e.map(a=>this.wrap("li",a)).join(""),i=this.wrap(n,s);return this.addRaw(i).addEOL()}addTable(e){let r=e.map(s=>{let i=s.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:u,rowspan:d}=a,A=c?"th":"td",p=Object.assign(Object.assign({},u&&{colspan:u}),d&&{rowspan:d});return this.wrap(A,l,p)}).join("");return this.wrap("tr",i)}).join(""),n=this.wrap("table",r);return this.addRaw(n).addEOL()}addDetails(e,r){let n=this.wrap("details",this.wrap("summary",e)+r);return this.addRaw(n).addEOL()}addImage(e,r,n){let{width:s,height:i}=n||{},a=Object.assign(Object.assign({},s&&{width:s}),i&&{height:i}),c=this.wrap("img",null,Object.assign({src:e,alt:r},a));return this.addRaw(c).addEOL()}addHeading(e,r){let n=`h${r}`,s=["h1","h2","h3","h4","h5","h6"].includes(n)?n:"h1",i=this.wrap(s,e);return this.addRaw(i).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,r){let n=Object.assign({},r&&{cite:r}),s=this.wrap("blockquote",e,n);return this.addRaw(s).addEOL()}Line truncated
|
||||
`),e=e.replace(/\r/g,`
|
||||
`));let s=e.split(`
|
||||
`).map(i=>i.trim());for(let i of s)!i||i.startsWith("#")||n.patterns.push(new Kh(i));return n.searchPaths.push(...Xv(n.patterns)),n})}static stat(e,r,n){return nP(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield BA.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Ns(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw i}else s=yield BA.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let i=yield BA.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===i)){Ns(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}n.push(i)}return s})}};var mRe=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function f8(t,e){return mRe(this,void 0,void 0,function*(){return yield uI.create(t,e)})}o(f8,"create");var NI=w(require("crypto"),1),NA=w(require("fs"),1),ru=w(require("path"),1),a6=w(i6(),1),c6=w(require("util"),1);var sm;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(sm||(sm={}));var Wr;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Wr||(Wr={}));var Kn;(function(t){t.GNU="gnu",t.BSD="bsd"})(Kn||(Kn={}));var wI=2,SI=5e3,wP=5e3,SP=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,o6=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,im="cache.tar",NP="manifest.txt",Zst=10*Math.pow(1024,3);var SA=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},bPe=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=t[i]&&function(a){return new Promise(function(c,l){a=t[i](a),s(c,l,a.done,a.value)})}}function s(i,a,c,l){Promise.resolve(l).then(function(u){i({value:u,done:c})},a)}},wPe="1.0";function om(){return SA(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let n;t?n=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?n="/Users":n="/home",e=ru.join(n,"actions","temp")}let r=ru.join(e,NI.randomUUID());return yield Ea(r),r})}o(om,"createTempDirectory");function ji(t){return NA.statSync(t).size}o(ji,"getArchiveFileSizeInBytes");function xP(t){return SA(this,void 0,void 0,function*(){var e,r,n,s,i;let a=[],c=(i=process.env.GITHUB_WORKSPACE)!==null&&i!==void 0?i:process.cwd(),l=yield f8(t.join(`
|
||||
`),{implicitDescendants:!1});try{for(var u=!0,d=bPe(l.globGenerator()),A;A=yield d.next(),e=A.done,!e;u=!0){s=A.value,u=!1;let f=ru.relative(c,s).replace(new RegExp(`\\${ru.sep}`,"g"),"/");b(`Matched: ${f}`),f===""?a.push("."):a.push(`${f}`)}}catch(p){r={error:p}}finally{try{!u&&!e&&(n=d.return)&&(yield n.call(d))}finally{if(r)throw r.error}}return a})}o(xP,"resolvePaths");function am(t){return SA(this,void 0,void 0,function*(){return c6.promisify(NA.unlink)(t)})}o(am,"unlinkFile");function l6(t){return SA(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),b(`Checking ${e} ${r.join(" ")}`);try{yield Wn(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:o(s=>n+=s.toString(),"stdout"),stderr:o(s=>n+=s.toString(),"stderr")}})}catch(s){b(s.message)}return n=n.trim(),b(n),n})}o(l6,"getVersion");function cm(){return SA(this,void 0,void 0,function*(){let t=yield l6("zstd",["--quiet"]),e=a6.clean(t);return b(`zstd version: ${e}`),t===""?Wr.Gzip:Wr.ZstdWithoutLong})}o(cm,"getCompressionMethod");function vc(t){return t===Wr.Gzip?sm.Gzip:sm.Zstd}o(vc,"getCacheFileName");function u6(){return SA(this,void 0,void 0,function*(){return NA.existsSync(SP)?SP:(yield l6("tar")).toLowerCase().includes("gnu tar")?yr("tar"):""})}o(u6,"getGnuTarPathOnWindows");function QP(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(QP,"assertDefined");function xA(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(wPe),NI.createHash("sha256").update(n.join("|")).digest("hex")}o(xA,"getCacheVersion");function d6(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(d6,"getRuntimeToken");var um=w(require("http"),1),vP=w(require("https"),1);function RP(t){let e=t.protocol==="https:";if(SPe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new QI(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new QI(`http://${r}`)}else return}o(RP,"getProxyUrl");function SPe(t){if(!t.hostname)return!1;let e=t.hostname;if(NPe(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let s=[t.hostname.toUpperCase()];typeof n=="number"&&s.push(`${s[0]}:${n}`);for(let i of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(i==="*"||s.some(a=>a===i||a.endsWith(`.${i}`)||i.startsWith(".")&&a.endsWith(`${i}`)))return!0;return!1}o(SPe,"checkBypass");function NPe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}o(NPe,"isLoopbackAddress");var QI=class extends URL{static{o(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var Pc=w(Qf(),1),A6=w(AA(),1);var Ot=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},wt;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(wt||(wt={}));var jr;(function(t){t.Accept="accept",t.ContentType="content-type"})(jr||(jr={}));var ba;(function(t){t.ApplicationJson="application/json"})(ba||(ba={}));var QPe=[wt.MovedPermanently,wt.ResourceMoved,wt.SeeOther,wt.TemporaryRedirect,wt.PermanentRedirect],RPe=[wt.BadGateway,wt.ServiceUnavailable,wt.GatewayTimeout],TPe=["OPTIONS","GET","DELETE","HEAD"],vPe=10,PPe=5,Ki=class t extends Error{static{o(this,"HttpClientError")}constructor(e,r)
Line truncated
|
||||
${qPe.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function kI(t){return t instanceof Kr?!0:su(t)&&t.name==="RestError"}o(kI,"isRestError");function En(t,e){return Buffer.from(t,e)}o(En,"stringToUint8Array");var DI=w(require("node:http"),1),OI=w(require("node:https"),1),qP=w(require("node:zlib"),1),T6=require("node:stream");var Rs=dm("ts-http-runtime");var GPe={};function Am(t){return t&&typeof t.pipe=="function"}o(Am,"isReadableStream");function R6(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=o(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}o(R6,"isStreamComplete");function v6(t){return t&&typeof t.byteLength=="number"}o(v6,"isArrayBuffer");var MI=class extends T6.Transform{static{o(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(s){n(s)}}constructor(e){super(),this.progressCallback=e}},GP=class{static{o(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Xi("The operation was aborted. Request has already been canceled.");n=o(u=>{u.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let u=new mi;Rs.info(`request to '${u.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),a=i?.includes("gzip")||i?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let u=JPe(c);u!==null&&e.headers.set("Content-Length",u)}let l;try{if(c&&e.onUploadProgress){let h=e.onUploadProgress,g=new MI(h);g.on("error",y=>{Rs.error("Error in upload progress",y)}),Am(c)?c.pipe(g):g.end(c),c=g}let u=await this.makeRequest(e,r,c);s!==void 0&&clearTimeout(s);let d=HPe(u),p={status:u.statusCode??0,headers:d,request:e};if(e.method==="HEAD")return u.resume(),p;l=a?VPe(u,d):u;let f=e.onDownloadProgress;if(f){let h=new MI(f);h.on("error",g=>{Rs.error("Error in download progress",g)}),l.pipe(h),l=h}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(p.status)?p.readableStreamBody=l:p.bodyAsText=await zPe(l),p}finally{if(e.abortSignal&&n){let u=Promise.resolve();Am(c)&&(u=R6(c));let d=Promise.resolve();Am(l)&&(d=R6(l)),Promise.all([u,d]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(A=>{Rs.warning("Error when cleaning up abortListener on httpRequest",A)})}}}makeRequest(e,r,n){let s=new URL(e.url),i=s.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,i),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((l,u)=>{let d=i?DI.default.request(c,l):OI.default.request(c,l);d.once("error",A=>{u(new Kr(A.message,{code:A.code??Kr.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let A=new Xi("The operation was aborted. Rejecting from abort signal callback while making request.");d.destroy(A),u(A)}),n&&Am(n)?n.pipe(d):n?typeof n=="string"||Buffer.isBuffer(n)?d.end(n):v6(n)?d.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Rs.error("Unrecognized body type",n),u(new Kr("Unrecognized body type"))):d.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?DI.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new DI.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return OI.default.globalAgent;let s=e.tlsSettings??GPe,i=this.cachedHttpsAgents.get(s);return i&&i.options.keepAlive===!n||(Rs.info("No cached TLS Agent exist, creating a new Agent"),i=new OI.default.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,i)),i}}};function HPe(t){let e=Xn();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}o(HPe,"getResponseHeaders");function VPe(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=qP.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=qP.default.createInflate();return t.pipe(n),n}return t}o(VPe,"getDecodedResponseStream");function zPe(t){return new Promise((e,r)=>{let n=[];t.on("data",s=>{Buffer.isBuffer(s)?n.push(s):n.push(Buffer.from(s))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",s=>{s&&s?.name==="AbortError"?r(s):r(new Kr(`Error reading response as text: ${s.message}`,{code:Kr.PARSE_ERROR}))})})}o(zPe,"streamToText");function JPe(t){return t?Buffer.isBuffer(t)?t.length:Am(t)?nul
Line truncated
|
||||
`;return e}o(bke,"encodeHeaders");function wke(t){return t instanceof Uint8Array?t.byteLength:aB(t)?t.size===-1?void 0:t.size:void 0}o(wke,"getLength");function Ske(t){let e=0;for(let r of t){let n=wke(r);if(n===void 0)return;e+=n}return e}o(Ske,"getTotalLength");async function Nke(t,e,r){let n=[En(`--${r}`,"utf-8"),...e.flatMap(i=>[En(`\r
|
||||
`,"utf-8"),En(bke(i.headers),"utf-8"),En(`\r
|
||||
`).map(i=>i.trim());for(let i of s)!i||i.startsWith("#")||n.patterns.push(new Xh(i));return n.searchPaths.push(...eP(n.patterns)),n})}static stat(e,r,n){return iP(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield bA.promises.stat(e.path)}catch(i){if(i.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Ns(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw i}else s=yield bA.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let i=yield bA.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===i)){Ns(`Symlink cycle detected for path '${e.path}' and realpath '${i}'`);return}n.push(i)}return s})}};var yRe=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function m8(t,e){return yRe(this,void 0,void 0,function*(){return yield dI.create(t,e)})}o(m8,"create");var xI=w(require("crypto"),1),xA=w(require("fs"),1),ru=w(require("path"),1),l6=w(a6(),1),u6=w(require("util"),1);var im;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(im||(im={}));var Wr;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Wr||(Wr={}));var Kn;(function(t){t.GNU="gnu",t.BSD="bsd"})(Kn||(Kn={}));var SI=2,NI=5e3,NP=5e3,xP=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,c6=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,om="cache.tar",QP="manifest.txt",rit=10*Math.pow(1024,3);var NA=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},NPe=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof __values=="function"?__values(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=t[i]&&function(a){return new Promise(function(c,l){a=t[i](a),s(c,l,a.done,a.value)})}}function s(i,a,c,l){Promise.resolve(l).then(function(u){i({value:u,done:c})},a)}},xPe="1.0";function am(){return NA(this,void 0,void 0,function*(){let t=process.platform==="win32",e=process.env.RUNNER_TEMP||"";if(!e){let n;t?n=process.env.USERPROFILE||"C:\\":process.platform==="darwin"?n="/Users":n="/home",e=ru.join(n,"actions","temp")}let r=ru.join(e,xI.randomUUID());return yield Ea(r),r})}o(am,"createTempDirectory");function ji(t){return xA.statSync(t).size}o(ji,"getArchiveFileSizeInBytes");function RP(t){return NA(this,void 0,void 0,function*(){var e,r,n,s,i;let a=[],c=(i=process.env.GITHUB_WORKSPACE)!==null&&i!==void 0?i:process.cwd(),l=yield m8(t.join(`
|
||||
`),{implicitDescendants:!1});try{for(var u=!0,d=NPe(l.globGenerator()),A;A=yield d.next(),e=A.done,!e;u=!0){s=A.value,u=!1;let f=ru.relative(c,s).replace(new RegExp(`\\${ru.sep}`,"g"),"/");b(`Matched: ${f}`),f===""?a.push("."):a.push(`${f}`)}}catch(p){r={error:p}}finally{try{!u&&!e&&(n=d.return)&&(yield n.call(d))}finally{if(r)throw r.error}}return a})}o(RP,"resolvePaths");function cm(t){return NA(this,void 0,void 0,function*(){return u6.promisify(xA.unlink)(t)})}o(cm,"unlinkFile");function d6(t){return NA(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),b(`Checking ${e} ${r.join(" ")}`);try{yield Wn(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:o(s=>n+=s.toString(),"stdout"),stderr:o(s=>n+=s.toString(),"stderr")}})}catch(s){b(s.message)}return n=n.trim(),b(n),n})}o(d6,"getVersion");function lm(){return NA(this,void 0,void 0,function*(){let t=yield d6("zstd",["--quiet"]),e=l6.clean(t);return b(`zstd version: ${e}`),t===""?Wr.Gzip:Wr.ZstdWithoutLong})}o(lm,"getCompressionMethod");function vc(t){return t===Wr.Gzip?im.Gzip:im.Zstd}o(vc,"getCacheFileName");function A6(){return NA(this,void 0,void 0,function*(){return xA.existsSync(xP)?xP:(yield d6("tar")).toLowerCase().includes("gnu tar")?yr("tar"):""})}o(A6,"getGnuTarPathOnWindows");function TP(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(TP,"assertDefined");function QA(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(xPe),xI.createHash("sha256").update(n.join("|")).digest("hex")}o(QA,"getCacheVersion");function p6(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(p6,"getRuntimeToken");var dm=w(require("http"),1),_P=w(require("https"),1);function vP(t){let e=t.protocol==="https:";if(QPe(t))return;let r=e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY;if(r)try{return new RI(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new RI(`http://${r}`)}else return}o(vP,"getProxyUrl");function QPe(t){if(!t.hostname)return!1;let e=t.hostname;if(RPe(e))return!0;let r=process.env.no_proxy||process.env.NO_PROXY||"";if(!r)return!1;let n;t.port?n=Number(t.port):t.protocol==="http:"?n=80:t.protocol==="https:"&&(n=443);let s=[t.hostname.toUpperCase()];typeof n=="number"&&s.push(`${s[0]}:${n}`);for(let i of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(i==="*"||s.some(a=>a===i||a.endsWith(`.${i}`)||i.startsWith(".")&&a.endsWith(`${i}`)))return!0;return!1}o(QPe,"checkBypass");function RPe(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}o(RPe,"isLoopbackAddress");var RI=class extends URL{static{o(this,"DecodedURL")}constructor(e,r){super(e,r),this._decodedUsername=decodeURIComponent(super.username),this._decodedPassword=decodeURIComponent(super.password)}get username(){return this._decodedUsername}get password(){return this._decodedPassword}};var Pc=w(Rf(),1),f6=w(pA(),1);var Ot=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},wt;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(wt||(wt={}));var jr;(function(t){t.Accept="accept",t.ContentType="content-type"})(jr||(jr={}));var ba;(function(t){t.ApplicationJson="application/json"})(ba||(ba={}));var vPe=[wt.MovedPermanently,wt.ResourceMoved,wt.SeeOther,wt.TemporaryRedirect,wt.PermanentRedirect],PPe=[wt.BadGateway,wt.ServiceUnavailable,wt.GatewayTimeout],_Pe=["OPTIONS","GET","DELETE","HEAD"],kPe=10,DPe=5,Ki=class t extends Error{static{o(this,"HttpClientError")}constructor(e,r)
Line truncated
|
||||
${VPe.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function DI(t){return t instanceof Kr?!0:su(t)&&t.name==="RestError"}o(DI,"isRestError");function En(t,e){return Buffer.from(t,e)}o(En,"stringToUint8Array");var OI=w(require("node:http"),1),MI=w(require("node:https"),1),HP=w(require("node:zlib"),1),P6=require("node:stream");var Rs=Am("ts-http-runtime");var zPe={};function pm(t){return t&&typeof t.pipe=="function"}o(pm,"isReadableStream");function v6(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=o(()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)},"handler");t.on("close",r),t.on("end",r),t.on("error",r)})}o(v6,"isStreamComplete");function _6(t){return t&&typeof t.byteLength=="number"}o(_6,"isArrayBuffer");var LI=class extends P6.Transform{static{o(this,"ReportTransform")}loadedBytes=0;progressCallback;_transform(e,r,n){this.push(e),this.loadedBytes+=e.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),n()}catch(s){n(s)}}constructor(e){super(),this.progressCallback=e}},VP=class{static{o(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Xi("The operation was aborted. Request has already been canceled.");n=o(u=>{u.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let u=new mi;Rs.info(`request to '${u.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let i=e.headers.get("Accept-Encoding"),a=i?.includes("gzip")||i?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let u=WPe(c);u!==null&&e.headers.set("Content-Length",u)}let l;try{if(c&&e.onUploadProgress){let h=e.onUploadProgress,g=new LI(h);g.on("error",y=>{Rs.error("Error in upload progress",y)}),pm(c)?c.pipe(g):g.end(c),c=g}let u=await this.makeRequest(e,r,c);s!==void 0&&clearTimeout(s);let d=JPe(u),p={status:u.statusCode??0,headers:d,request:e};if(e.method==="HEAD")return u.resume(),p;l=a?$Pe(u,d):u;let f=e.onDownloadProgress;if(f){let h=new LI(f);h.on("error",g=>{Rs.error("Error in download progress",g)}),l.pipe(h),l=h}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(p.status)?p.readableStreamBody=l:p.bodyAsText=await YPe(l),p}finally{if(e.abortSignal&&n){let u=Promise.resolve();pm(c)&&(u=v6(c));let d=Promise.resolve();pm(l)&&(d=v6(l)),Promise.all([u,d]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(A=>{Rs.warning("Error when cleaning up abortListener on httpRequest",A)})}}}makeRequest(e,r,n){let s=new URL(e.url),i=s.protocol!=="https:";if(i&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,i),hostname:s.hostname,path:`${s.pathname}${s.search}`,port:s.port,method:e.method,headers:e.headers.toJSON({preserveCase:!0}),...e.requestOverrides};return new Promise((l,u)=>{let d=i?OI.default.request(c,l):MI.default.request(c,l);d.once("error",A=>{u(new Kr(A.message,{code:A.code??Kr.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let A=new Xi("The operation was aborted. Rejecting from abort signal callback while making request.");d.destroy(A),u(A)}),n&&pm(n)?n.pipe(d):n?typeof n=="string"||Buffer.isBuffer(n)?d.end(n):_6(n)?d.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Rs.error("Unrecognized body type",n),u(new Kr("Unrecognized body type"))):d.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?OI.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new OI.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return MI.default.globalAgent;let s=e.tlsSettings??zPe,i=this.cachedHttpsAgents.get(s);return i&&i.options.keepAlive===!n||(Rs.info("No cached TLS Agent exist, creating a new Agent"),i=new MI.default.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,i)),i}}};function JPe(t){let e=Xn();for(let r of Object.keys(t.headers)){let n=t.headers[r];Array.isArray(n)?n.length>0&&e.set(r,n[0]):n&&e.set(r,n)}return e}o(JPe,"getResponseHeaders");function $Pe(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=HP.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=HP.default.createInflate();return t.pipe(n),n}return t}o($Pe,"getDecodedResponseStream");function YPe(t){return new Promise((e,r)=>{let n=[];t.on("data",s=>{Buffer.isBuffer(s)?n.push(s):n.push(Buffer.from(s))}),t.on("end",()=>{e(Buffer.concat(n).toString("utf8"))}),t.on("error",s=>{s&&s?.name==="AbortError"?r(s):r(new Kr(`Error reading response as text: ${s.message}`,{code:Kr.PARSE_ERROR}))})})}o(YPe,"streamToText");function WPe(t){return t?Buffer.isBuffer(t)?t.length:pm(t)?nul
Line truncated
|
||||
`;return e}o(Nke,"encodeHeaders");function xke(t){return t instanceof Uint8Array?t.byteLength:cB(t)?t.size===-1?void 0:t.size:void 0}o(xke,"getLength");function Qke(t){let e=0;for(let r of t){let n=xke(r);if(n===void 0)return;e+=n}return e}o(Qke,"getTotalLength");async function Rke(t,e,r){let n=[En(`--${r}`,"utf-8"),...e.flatMap(i=>[En(`\r
|
||||
`,"utf-8"),En(Nke(i.headers),"utf-8"),En(`\r
|
||||
`,"utf-8"),i.body,En(`\r
|
||||
--${r}`,"utf-8")]),En(`--\r
|
||||
\r
|
||||
`,"utf-8")],s=Ske(n);s&&t.headers.set("Content-Length",s),t.body=await DK(n)}o(Nke,"buildRequestBody");var hm="multipartPolicy",xke=70,Qke=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Rke(t){if(t.length>xke)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!Qke.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}o(Rke,"assertValidBoundary");function lB(){return{name:hm,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,i,a]=s;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?Rke(r):r=Bke(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await Nke(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}o(lB,"multipartPolicy");function uB(){return _I()}o(uB,"createEmptyPipeline");var OK=TI({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),Klt=OK.logger;function to(t){return OK.createClientLogger(t)}o(to,"createClientLogger");var ro=to("core-rest-pipeline");function a_(t={}){return FI({logger:ro.info,...t})}o(a_,"logPolicy");var c_=UI;function l_(t={}){return qI(t)}o(l_,"redirectPolicy");var dB=w(require("node:os"),1),AB=w(require("node:process"),1);function MK(){return"User-Agent"}o(MK,"getHeaderName");async function LK(t){if(AB.default&&AB.default.versions){let e=`${dB.default.type()} ${dB.default.release()}; ${dB.default.arch()}`,r=AB.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}o(LK,"setPlatformSpecificData");var pB="1.22.2";function Mke(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}o(Mke,"getUserAgentString");function FK(){return MK()}o(FK,"getUserAgentHeaderName");async function fB(t){let e=new Map;e.set("core-rest-pipeline",pB),await LK(e);let r=Mke(e);return t?`${t} ${r}`:r}o(fB,"getUserAgentValue");var UK=FK(),qK="userAgentPolicy";function u_(t={}){let e=fB(t.userAgentPrefix);return{name:qK,async sendRequest(r,n){return r.headers.has(UK)||r.headers.set(UK,await e),n(r)}}}o(u_,"userAgentPolicy");var rs=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function d_(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((i,a)=>{function c(){a(new rs(s??"The operation was aborted."))}o(c,"rejectOnAbort");function l(){n?.removeEventListener("abort",u)}o(l,"removeListeners");function u(){r?.(),l(),c()}if(o(u,"onAbort"),n?.aborted)return c();try{t(d=>{l(),i(d)},d=>{l(),a(d)})}catch(d){a(d)}n?.addEventListener("abort",u)})}o(d_,"createAbortablePromise");var Gke="The delay was aborted.";function mm(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return d_(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:o(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:s??Gke})}o(mm,"delay");function kc(t){if(su(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`Unknown error ${e}`}}o(kc,"getErrorMessage");function GK(t){return su(t)}o(GK,"isError");function OA(){return nu()}o(OA,"randomUUID");var Fe=au;var HK=Symbol("rawContent");function p_(t){return typeof t[HK]=="function"}o(p_,"hasRawContent");function VK(t){return p_(t)?t[HK]():t}o(VK,"getRawContent");var hB=hm;function f_(){let t=lB();return{name:hB,sendRequest:o(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)p_(n.body)&&(n.body=VK(n.body));return t.sendRequest(e,r)},"sendRequest")}}o(f_,"multipartPolicy");var h_=GI;function m_(){return HI()}o(m_,"decompressResponsePolicy");function g_(t={}){return JI(t)}o(g_,"defaultRetryPolicy");function E_(){return $I()}o(E_,"formDataPolicy");function Dc(t){return r_(t)}o(Dc,"getDefaultProxySettings");function y_(t,e){return sB(t,e)}o(y_,"proxyPolicy");var zK="setClientRequestIdPolicy";function C_(t="x-ms-client-request-id"){return{name:zK,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}o(C_,"setClientRequestIdPolicy");function I_(t){return iB(t)}o(I_,"agentPolicy");function B_(t){return oB(t)}o(B_,"tlsPolicy");var MA={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function JK(t={}){let e=new b_(t.parentContext);return t.span&&(e=e.setValue(MA.span,t.span)),t.namespace&&(e=e.setValue(MA.namespace,t.namespace)),e}o(JK,"createTracingContext");var b_=class t{static{o(this,"TracingContextImpl")}_contextMap;constructor(e){this._contextMap=e instanceof t?new Map(e._context
Line truncated
|
||||
`&&t[i]!=="\r";i++)l+=t[i];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),i--),!AOe(l)){let A;return l.trim().length===0?A="Invalid space after '<'.":A="Tag '"+l+"' is an invalid name.",Mt("InvalidTag",A,Xr(t,i))}let u=aOe(t,i);if(u===!1)return Mt("InvalidAttr","Attributes for '"+l+"' have open quote.",Xr(t,i));let d=u.value;if(i=u.index,d[d.length-1]==="/"){let A=i-d.length;d=d.substring(0,d.length-1);let p=RX(d,e);if(p===!0)n=!0;else return Mt(p.err.code,p.err.msg,Xr(t,A+p.err.line))}else if(c)if(u.tagClosed){if(d.trim().length>0)return Mt("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",Xr(t,a));if(r.length===0)return Mt("InvalidTag","Closing tag '"+l+"' has not been opened.",Xr(t,a));{let A=r.pop();if(l!==A.tagName){let p=Xr(t,A.tagStartPos);return Mt("InvalidTag","Expected closing tag '"+A.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+l+"'.",Xr(t,a))}r.length==0&&(s=!0)}}else return Mt("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",Xr(t,i));else{let A=RX(d,e);if(A!==!0)return Mt(A.err.code,A.err.msg,Xr(t,i-d.length+A.err.line));if(s===!0)return Mt("InvalidXml","Multiple possible root nodes found.",Xr(t,i));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:a}),n=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=QX(t,i);continue}else if(t[i+1]==="?"){if(i=xX(t,++i),i.err)return i}else break;else if(t[i]==="&"){let A=uOe(t,i);if(A==-1)return Mt("InvalidChar","char '&' is not expected.",Xr(t,i));i=A}else if(s===!0&&!NX(t[i]))return Mt("InvalidXml","Extra text at the end",Xr(t,i));t[i]==="<"&&i--}}else{if(NX(t[i]))continue;return Mt("InvalidChar","char '"+t[i]+"' is not expected.",Xr(t,i))}if(n){if(r.length==1)return Mt("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Xr(t,r[0].tagStartPos));if(r.length>0)return Mt("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Mt("InvalidXml","Start tag expected.",1);return!0}o(QB,"validate");function NX(t){return t===" "||t===" "||t===`
|
||||
`||t==="\r"}o(NX,"isWhiteSpace");function xX(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let n=t.substr(r,e-r);if(e>5&&n==="xml")return Mt("InvalidXml","XML declaration allowed only at the start of the document.",Xr(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}o(xX,"readPI");function QX(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}o(QX,"readCommentAndCDATA");var iOe='"',oOe="'";function aOe(t,e){let r="",n="",s=!1;for(;e<t.length;e++){if(t[e]===iOe||t[e]===oOe)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){s=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:s}}o(aOe,"readAttributeStr");var cOe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function RX(t,e){let r=NB(t,cOe),n={};for(let s=0;s<r.length;s++){if(r[s][1].length===0)return Mt("InvalidAttr","Attribute '"+r[s][2]+"' has no space in starting.",Qm(r[s]));if(r[s][3]!==void 0&&r[s][4]===void 0)return Mt("InvalidAttr","Attribute '"+r[s][2]+"' is without value.",Qm(r[s]));if(r[s][3]===void 0&&!e.allowBooleanAttributes)return Mt("InvalidAttr","boolean attribute '"+r[s][2]+"' is not allowed.",Qm(r[s]));let i=r[s][2];if(!dOe(i))return Mt("InvalidAttr","Attribute '"+i+"' is an invalid name.",Qm(r[s]));if(!Object.prototype.hasOwnProperty.call(n,i))n[i]=1;else return Mt("InvalidAttr","Attribute '"+i+"' is repeated.",Qm(r[s]))}return!0}o(RX,"validateAttributeString");function lOe(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}o(lOe,"validateNumberAmpersand");function uOe(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,lOe(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}o(uOe,"validateAmpersand");function Mt(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}o(Mt,"getErrorObject");function dOe(t){return q_(t)}o(dOe,"validateAttrName");function AOe(t){return q_(t)}o(AOe,"validateTagName");function Xr(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}o(Xr,"getLineNumberForPosition");function Qm(t){return t.startIndex+t[1].length}o(Qm,"getPositionFromMatch");var TX={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"},vX={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",thorn:"\xFE",szlig:"\xDF",yuml:"\xFF",Yuml:"\u0178"},PX={Amacr:"\u0100",amacr:"\u0101",Abreve:"\u0102",abreve:"\u0103",Aogon:"\u0104",aogon:"\u0105",Cacute:"\u0106",cacute:"\u0107",Ccirc:"\u0108",ccirc:"\u0109",Cdot:"\u010A",cdot:"\u010B",Ccaron:"\u010C",ccaron:"\u010D",Dcaron:"\u010E",dcaron:"\u010F",Dstrok:"\u0110",dstrok:"\u0111",Emacr:"\u0112",emacr:"\u0113",Ecaron:"\u011A",ecaron:"\u011B",Edot:"\u0116",edot:"\u0117",Eogon:"\u0118",eogon:"\u0119",Gcirc:"\u011C",gcirc:"\u011D",Gbreve:"\u011E",gbreve:"\u011F",Gdot:"\u0120",gdot:"\u0121",Gcedil:"\u0122",Hcirc:"\u0124",hcirc:"\u0125",HstLine truncated
|
||||
`);let e=new Bn("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let s=this.options,i=new vm(s.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let u=t.charCodeAt(c+1);if(u===47){let d=GA(t,">",c,"Closing Tag is not closed."),A=t.substring(c+2,d).trim();if(s.removeNSPrefix){let f=A.indexOf(":");f!==-1&&(A=A.substr(f+1))}A=W_(s.transformTagName,A,"",s).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let p=this.matcher.getCurrentTag();if(A&&s.unpairedTagsSet.has(A))throw new Error(`Unpaired tag can not be used as closing tag: </${A}>`);p&&s.unpairedTagsSet.has(p)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=d}else if(u===63){let d=j_(t,c,!1,"?>");if(!d)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let A=this.buildAttributesMap(d.tagExp,this.matcher,d.tagName,!0);if(A){let p=A[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(p)||1),i.setXmlVersion(Number(p)||1)}if(!(s.ignoreDeclaration&&d.tagName==="?xml"||s.ignorePiTags)){let p=new Bn(d.tagName);p.add(s.textNodeName,""),d.tagName!==d.tagExp&&d.attrExpPresent&&s.ignoreAttributes!==!0&&(p[":@"]=A),this.addChild(r,p,this.readonlyMatcher,c)}c=d.closeIndex+1}else if(u===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let d=GA(t,"-->",c+4,"Comment is not closed.");if(s.commentPropName){let A=t.substring(c+4,d-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(s.commentPropName,[{[s.textNodeName]:A}])}c=d}else if(u===33&&t.charCodeAt(c+2)===68){let d=i.readDocType(t,c);this.entityDecoder.addInputEntities(d.entities),c=d.i}else if(u===33&&t.charCodeAt(c+2)===91){let d=GA(t,"]]>",c,"CDATA is not closed.")-2,A=t.substring(c+9,d);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let p=this.parseTextData(A,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);p==null&&(p=""),s.cdataPropName?r.add(s.cdataPropName,[{[s.textNodeName]:A}]):r.add(s.textNodeName,p),c=d+2}else{let d=j_(t,c,s.removeNSPrefix);if(!d){let Q=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${Q}"`)}let A=d.tagName,p=d.rawTagName,f=d.tagExp,h=d.attrExpPresent,g=d.closeIndex;if({tagName:A,tagExp:f}=W_(s.transformTagName,A,f,s),s.strictReservedNames&&(A===s.commentPropName||A===s.cdataPropName||A===s.textNodeName||A===s.attributesGroupName))throw new Error(`Invalid tag name: ${A}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let y=r;y&&s.unpairedTagsSet.has(y.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;f.length>0&&f.lastIndexOf("/")===f.length-1&&(E=!0,A[A.length-1]==="/"?(A=A.substr(0,A.length-1),f=A):f=f.substr(0,f.length-1),h=A!==f);let C=null,I={},B;B=DOe(p),A!==e.tagname&&this.matcher.push(A,{},B),A!==f&&h&&(C=this.buildAttributesMap(f,this.matcher,A),C&&(I=kOe(C,s))),A!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=c;if(this.isCurrentNodeStopNode){let Q="";if(E)c=d.closeIndex;else if(s.unpairedTagsSet.has(A))c=d.closeIndex;else{let ue=this.readStopNodeData(t,p,g+1);if(!ue)throw new Error(`Unexpected end of ${p}`);c=ue.i,Q=ue.tagContent}let D=new Bn(A);C&&(D[":@"]=C),D.add(s.textNodeName,Q),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,D,this.readonlyMatcher,N)}else{if(E){({tagName:A,tagExp:f}=W_(s.transformTagName,A,f,s));let Q=new Bn(A);C&&(Q[":@"]=C),this.addChild(r,Q,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(s.unpairedTagsSet.has(A)){let Q=new Bn(A);C&&(Q[":@"]=C),this.addChild(r,Q,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=d.closeIndex;continue}else{let Q=new Bn(A);if(this.tagsNodeStack.length>s.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),C&&(Q[":@"]=C),this.addChild(r,Q,this.readonlyMatcher,N),r=Q}n="",c=g}}}else n+=t[c];return e.child},"parseXml");function qOe(t,e,r,n){this.options.captureMetaData||(n=void 0);let s=this.options.jPath?r.toString():r,i=this.options.updateTag(e.tagname,s,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,n))}o(qOe,"addChild");function GOe(t,e,r){let n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){let s=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,s)))return t}if(n.tagFilter){let s=this.options.jPath?r.toString():r;if(!n.tagFilter(e,s))return t}return this.entityDecoder.decode(t)}o(GOe,"replaceEntitiesValue");function HOe(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}o(HOe,"saveTextToParentTag");function VOe(){return this.stopNodeExpressionsLine truncated
|
||||
`;function ZOe(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let r=t[0];if(rk(r)==="?xml"){let s=r[":@"];if(s){let i=e.attributeNamePrefix+"version";if(s[i])return s[i]}}return"1.0"}o(ZOe,"detectXmlVersionFromArray");function XX(t,e,r,n,s){return!r.sanitizeName||Au(t,{xmlVersion:s})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}o(XX,"resolveTagName");function tk(t,e){let r="";e.format&&(r=XOe);let n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let a=0;a<e.stopNodes.length;a++){let c=e.stopNodes[a];typeof c=="string"?n.push(new is(c)):c instanceof is&&n.push(c)}let s=ZOe(t,e),i=new io;return ZX(t,e,r,i,n,s)}o(tk,"toXml");function ZX(t,e,r,n,s,i){let a="",c=!1;if(e.maxNestedTags&&n.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let l=t.toString();return l=ek(l,e),l}return""}for(let l=0;l<t.length;l++){let u=t[l],d=rk(u);if(d===void 0)continue;let p=d===e.textNodeName||d===e.cdataPropName||d===e.commentPropName||d[0]==="?"?d:XX(d,!1,e,n,i),f=eMe(u[":@"],e);n.push(p,f);let h=rMe(n,s);if(p===e.textNodeName){let I=u[d];h||(I=e.tagValueProcessor(p,I),I=ek(I,e)),c&&(a+=r),a+=I,c=!1,n.pop();continue}else if(p===e.cdataPropName){c&&(a+=r);let I=u[d][0][e.textNodeName],B=_B(I);a+=`<![CDATA[${B}]]>`,c=!1,n.pop();continue}else if(p===e.commentPropName){let I=u[d][0][e.textNodeName],B=PB(I);a+=r+`<!--${B}-->`,c=!0,n.pop();continue}else if(p[0]==="?"){let I=KX(u[":@"],e,h,n,i);a+=(p==="?xml"?"":r)+`<${p}${I}?>`,c=!0,n.pop();continue}let g=r;g!==""&&(g+=e.indentBy);let y=KX(u[":@"],e,h,n,i),E=r+`<${p}${y}`,C;h?C=eZ(u[d],e):C=ZX(u[d],e,g,n,s,i),e.unpairedTags.indexOf(p)!==-1?e.suppressUnpairedNode?a+=E+">":a+=E+"/>":(!C||C.length===0)&&e.suppressEmptyNode?a+=E+"/>":C&&C.endsWith(">")?a+=E+`>${C}${r}</${p}>`:(a+=E+">",C&&r!==""&&(C.includes("/>")||C.includes("</"))?a+=r+e.indentBy+C+r:a+=C,a+=`</${p}>`),c=!0,n.pop()}return a}o(ZX,"arrToStr");function eMe(t,e){if(!t||e.ignoreAttributes)return null;let r={},n=!1;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=s.startsWith(e.attributeNamePrefix)?s.substr(e.attributeNamePrefix.length):s;r[i]=Lc(t[s]),n=!0}return n?r:null}o(eMe,"extractAttributeValues");function eZ(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let r="";for(let n=0;n<t.length;n++){let s=t[n],i=rk(s);if(i===e.textNodeName)r+=s[i];else if(i===e.cdataPropName)r+=s[i][0][e.textNodeName];else if(i===e.commentPropName)r+=s[i][0][e.textNodeName];else{if(i&&i[0]==="?")continue;if(i){let a=tMe(s[":@"],e),c=eZ(s[i],e);!c||c.length===0?r+=`<${i}${a}/>`:r+=`<${i}${a}>${c}</${i}>`}}}return r}o(eZ,"getRawContent");function tMe(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=t[n];s===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${Lc(s)}"`}return r}o(tMe,"attr_to_str_raw");function rk(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let n=e[r];if(Object.prototype.hasOwnProperty.call(t,n)&&n!==":@")return n}}o(rk,"propName");function KX(t,e,r,n,s){let i="";if(t&&!e.ignoreAttributes)for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=a.substr(e.attributeNamePrefix.length),l=r?c:XX(c,!0,e,n,s),u;r?u=t[a]:(u=e.attributeValueProcessor(a,t[a]),u=ek(u,e)),u===!0&&e.suppressBooleanAttributes?i+=` ${l}`:i+=` ${l}="${Lc(u)}"`}return i}o(KX,"attr_to_str");function rMe(t,e){if(!e||e.length===0)return!1;for(let r=0;r<e.length;r++)if(t.matches(e[r]))return!0;return!1}o(rMe,"checkStopNode");function ek(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){let n=e.entities[r];t=t.replace(n.regex,n.val)}return t}o(ek,"replaceEntitiesValue");function nk(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}o(nk,"getIgnoreAttributesFn");var nMe={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:o(function(t,e){return e},"tagValueProcessor"),attributeValueProcessor:o(function(t,e){return e},"attributeValueProcessor"),preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function wn(t){if(this.options=Object.assign({},nMe,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e=="string"&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.oLine truncated
|
||||
`,"utf-8")],s=Qke(n);s&&t.headers.set("Content-Length",s),t.body=await MK(n)}o(Rke,"buildRequestBody");var mm="multipartPolicy",Tke=70,vke=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Pke(t){if(t.length>Tke)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!vke.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}o(Pke,"assertValidBoundary");function uB(){return{name:mm,async sendRequest(t,e){if(!t.multipartBody)return e(t);if(t.body)throw new Error("multipartBody and regular body cannot be set at the same time");let r=t.multipartBody.boundary,n=t.headers.get("Content-Type")??"multipart/mixed",s=n.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!s)throw new Error(`Got multipart request body, but content-type header was not multipart: ${n}`);let[,i,a]=s;if(a&&r&&a!==r)throw new Error(`Multipart boundary was specified as ${a} in the header, but got ${r} in the request body`);return r??=a,r?Pke(r):r=Ske(),t.headers.set("Content-Type",`${i}; boundary=${r}`),await Rke(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}o(uB,"multipartPolicy");function dB(){return kI()}o(dB,"createEmptyPipeline");var LK=vI({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),eut=LK.logger;function to(t){return LK.createClientLogger(t)}o(to,"createClientLogger");var ro=to("core-rest-pipeline");function l_(t={}){return UI({logger:ro.info,...t})}o(l_,"logPolicy");var u_=qI;function d_(t={}){return GI(t)}o(d_,"redirectPolicy");var AB=w(require("node:os"),1),pB=w(require("node:process"),1);function FK(){return"User-Agent"}o(FK,"getHeaderName");async function UK(t){if(pB.default&&pB.default.versions){let e=`${AB.default.type()} ${AB.default.release()}; ${AB.default.arch()}`,r=pB.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}o(UK,"setPlatformSpecificData");var fB="1.22.2";function Uke(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}o(Uke,"getUserAgentString");function qK(){return FK()}o(qK,"getUserAgentHeaderName");async function hB(t){let e=new Map;e.set("core-rest-pipeline",fB),await UK(e);let r=Uke(e);return t?`${t} ${r}`:r}o(hB,"getUserAgentValue");var GK=qK(),HK="userAgentPolicy";function A_(t={}){let e=hB(t.userAgentPrefix);return{name:HK,async sendRequest(r,n){return r.headers.has(GK)||r.headers.set(GK,await e),n(r)}}}o(A_,"userAgentPolicy");var rs=class extends Error{static{o(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function p_(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((i,a)=>{function c(){a(new rs(s??"The operation was aborted."))}o(c,"rejectOnAbort");function l(){n?.removeEventListener("abort",u)}o(l,"removeListeners");function u(){r?.(),l(),c()}if(o(u,"onAbort"),n?.aborted)return c();try{t(d=>{l(),i(d)},d=>{l(),a(d)})}catch(d){a(d)}n?.addEventListener("abort",u)})}o(p_,"createAbortablePromise");var zke="The delay was aborted.";function gm(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return p_(i=>{r=setTimeout(i,t)},{cleanupBeforeAbort:o(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:s??zke})}o(gm,"delay");function kc(t){if(su(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`Unknown error ${e}`}}o(kc,"getErrorMessage");function VK(t){return su(t)}o(VK,"isError");function MA(){return nu()}o(MA,"randomUUID");var Fe=au;var zK=Symbol("rawContent");function h_(t){return typeof t[zK]=="function"}o(h_,"hasRawContent");function JK(t){return h_(t)?t[zK]():t}o(JK,"getRawContent");var mB=mm;function m_(){let t=uB();return{name:mB,sendRequest:o(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)h_(n.body)&&(n.body=JK(n.body));return t.sendRequest(e,r)},"sendRequest")}}o(m_,"multipartPolicy");var g_=HI;function E_(){return VI()}o(E_,"decompressResponsePolicy");function y_(t={}){return $I(t)}o(y_,"defaultRetryPolicy");function C_(){return YI()}o(C_,"formDataPolicy");function Dc(t){return s_(t)}o(Dc,"getDefaultProxySettings");function I_(t,e){return iB(t,e)}o(I_,"proxyPolicy");var $K="setClientRequestIdPolicy";function B_(t="x-ms-client-request-id"){return{name:$K,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}o(B_,"setClientRequestIdPolicy");function b_(t){return oB(t)}o(b_,"agentPolicy");function w_(t){return aB(t)}o(w_,"tlsPolicy");var LA={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function YK(t={}){let e=new S_(t.parentContext);return t.span&&(e=e.setValue(LA.span,t.span)),t.namespace&&(e=e.setValue(LA.namespace,t.namespace)),e}o(YK,"createTracingContext");var S_=class t{static{o(this,"TracingContextImpl")}_contextMap;constructor(e){this._contextMap=e instanceof t?new Map(e._context
Line truncated
|
||||
`&&t[i]!=="\r";i++)l+=t[i];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),i--),!hOe(l)){let A;return l.trim().length===0?A="Invalid space after '<'.":A="Tag '"+l+"' is an invalid name.",Mt("InvalidTag",A,Xr(t,i))}let u=uOe(t,i);if(u===!1)return Mt("InvalidAttr","Attributes for '"+l+"' have open quote.",Xr(t,i));let d=u.value;if(i=u.index,d[d.length-1]==="/"){let A=i-d.length;d=d.substring(0,d.length-1);let p=vX(d,e);if(p===!0)n=!0;else return Mt(p.err.code,p.err.msg,Xr(t,A+p.err.line))}else if(c)if(u.tagClosed){if(d.trim().length>0)return Mt("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",Xr(t,a));if(r.length===0)return Mt("InvalidTag","Closing tag '"+l+"' has not been opened.",Xr(t,a));{let A=r.pop();if(l!==A.tagName){let p=Xr(t,A.tagStartPos);return Mt("InvalidTag","Expected closing tag '"+A.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+l+"'.",Xr(t,a))}r.length==0&&(s=!0)}}else return Mt("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",Xr(t,i));else{let A=vX(d,e);if(A!==!0)return Mt(A.err.code,A.err.msg,Xr(t,i-d.length+A.err.line));if(s===!0)return Mt("InvalidXml","Multiple possible root nodes found.",Xr(t,i));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:a}),n=!0}for(i++;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="!"){i++,i=TX(t,i);continue}else if(t[i+1]==="?"){if(i=RX(t,++i),i.err)return i}else break;else if(t[i]==="&"){let A=pOe(t,i);if(A==-1)return Mt("InvalidChar","char '&' is not expected.",Xr(t,i));i=A}else if(s===!0&&!QX(t[i]))return Mt("InvalidXml","Extra text at the end",Xr(t,i));t[i]==="<"&&i--}}else{if(QX(t[i]))continue;return Mt("InvalidChar","char '"+t[i]+"' is not expected.",Xr(t,i))}if(n){if(r.length==1)return Mt("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Xr(t,r[0].tagStartPos));if(r.length>0)return Mt("InvalidXml","Invalid '"+JSON.stringify(r.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Mt("InvalidXml","Start tag expected.",1);return!0}o(RB,"validate");function QX(t){return t===" "||t===" "||t===`
|
||||
`||t==="\r"}o(QX,"isWhiteSpace");function RX(t,e){let r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){let n=t.substr(r,e-r);if(e>5&&n==="xml")return Mt("InvalidXml","XML declaration allowed only at the start of the document.",Xr(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}o(RX,"readPI");function TX(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}o(TX,"readCommentAndCDATA");var cOe='"',lOe="'";function uOe(t,e){let r="",n="",s=!1;for(;e<t.length;e++){if(t[e]===cOe||t[e]===lOe)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){s=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:s}}o(uOe,"readAttributeStr");var dOe=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function vX(t,e){let r=xB(t,dOe),n={};for(let s=0;s<r.length;s++){if(r[s][1].length===0)return Mt("InvalidAttr","Attribute '"+r[s][2]+"' has no space in starting.",Rm(r[s]));if(r[s][3]!==void 0&&r[s][4]===void 0)return Mt("InvalidAttr","Attribute '"+r[s][2]+"' is without value.",Rm(r[s]));if(r[s][3]===void 0&&!e.allowBooleanAttributes)return Mt("InvalidAttr","boolean attribute '"+r[s][2]+"' is not allowed.",Rm(r[s]));let i=r[s][2];if(!fOe(i))return Mt("InvalidAttr","Attribute '"+i+"' is an invalid name.",Rm(r[s]));if(!Object.prototype.hasOwnProperty.call(n,i))n[i]=1;else return Mt("InvalidAttr","Attribute '"+i+"' is repeated.",Rm(r[s]))}return!0}o(vX,"validateAttributeString");function AOe(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}o(AOe,"validateNumberAmpersand");function pOe(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,AOe(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}o(pOe,"validateAmpersand");function Mt(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}o(Mt,"getErrorObject");function fOe(t){return H_(t)}o(fOe,"validateAttrName");function hOe(t){return H_(t)}o(hOe,"validateTagName");function Xr(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}o(Xr,"getLineNumberForPosition");function Rm(t){return t.startIndex+t[1].length}o(Rm,"getPositionFromMatch");var PX={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"},_X={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",thorn:"\xFE",szlig:"\xDF",yuml:"\xFF",Yuml:"\u0178"},kX={Amacr:"\u0100",amacr:"\u0101",Abreve:"\u0102",abreve:"\u0103",Aogon:"\u0104",aogon:"\u0105",Cacute:"\u0106",cacute:"\u0107",Ccirc:"\u0108",ccirc:"\u0109",Cdot:"\u010A",cdot:"\u010B",Ccaron:"\u010C",ccaron:"\u010D",Dcaron:"\u010E",dcaron:"\u010F",Dstrok:"\u0110",dstrok:"\u0111",Emacr:"\u0112",emacr:"\u0113",Ecaron:"\u011A",ecaron:"\u011B",Edot:"\u0116",edot:"\u0117",Eogon:"\u0118",eogon:"\u0119",Gcirc:"\u011C",gcirc:"\u011D",Gbreve:"\u011E",gbreve:"\u011F",Gdot:"\u0120",gdot:"\u0121",Gcedil:"\u0122",Hcirc:"\u0124",hcirc:"\u0125",HstLine truncated
|
||||
`);let e=new Bn("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let s=this.options,i=new Pm(s.processEntities),a=t.length;for(let c=0;c<a;c++)if(t[c]==="<"){let u=t.charCodeAt(c+1);if(u===47){let d=HA(t,">",c,"Closing Tag is not closed."),A=t.substring(c+2,d).trim();if(s.removeNSPrefix){let f=A.indexOf(":");f!==-1&&(A=A.substr(f+1))}A=K_(s.transformTagName,A,"",s).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let p=this.matcher.getCurrentTag();if(A&&s.unpairedTagsSet.has(A))throw new Error(`Unpaired tag can not be used as closing tag: </${A}>`);p&&s.unpairedTagsSet.has(p)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",c=d}else if(u===63){let d=X_(t,c,!1,"?>");if(!d)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let A=this.buildAttributesMap(d.tagExp,this.matcher,d.tagName,!0);if(A){let p=A[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(p)||1),i.setXmlVersion(Number(p)||1)}if(!(s.ignoreDeclaration&&d.tagName==="?xml"||s.ignorePiTags)){let p=new Bn(d.tagName);p.add(s.textNodeName,""),d.tagName!==d.tagExp&&d.attrExpPresent&&s.ignoreAttributes!==!0&&(p[":@"]=A),this.addChild(r,p,this.readonlyMatcher,c)}c=d.closeIndex+1}else if(u===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let d=HA(t,"-->",c+4,"Comment is not closed.");if(s.commentPropName){let A=t.substring(c+4,d-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(s.commentPropName,[{[s.textNodeName]:A}])}c=d}else if(u===33&&t.charCodeAt(c+2)===68){let d=i.readDocType(t,c);this.entityDecoder.addInputEntities(d.entities),c=d.i}else if(u===33&&t.charCodeAt(c+2)===91){let d=HA(t,"]]>",c,"CDATA is not closed.")-2,A=t.substring(c+9,d);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let p=this.parseTextData(A,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);p==null&&(p=""),s.cdataPropName?r.add(s.cdataPropName,[{[s.textNodeName]:A}]):r.add(s.textNodeName,p),c=d+2}else{let d=X_(t,c,s.removeNSPrefix);if(!d){let Q=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${Q}"`)}let A=d.tagName,p=d.rawTagName,f=d.tagExp,h=d.attrExpPresent,g=d.closeIndex;if({tagName:A,tagExp:f}=K_(s.transformTagName,A,f,s),s.strictReservedNames&&(A===s.commentPropName||A===s.cdataPropName||A===s.textNodeName||A===s.attributesGroupName))throw new Error(`Invalid tag name: ${A}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let y=r;y&&s.unpairedTagsSet.has(y.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let E=!1;f.length>0&&f.lastIndexOf("/")===f.length-1&&(E=!0,A[A.length-1]==="/"?(A=A.substr(0,A.length-1),f=A):f=f.substr(0,f.length-1),h=A!==f);let C=null,I={},B;B=LOe(p),A!==e.tagname&&this.matcher.push(A,{},B),A!==f&&h&&(C=this.buildAttributesMap(f,this.matcher,A),C&&(I=MOe(C,s))),A!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=c;if(this.isCurrentNodeStopNode){let Q="";if(E)c=d.closeIndex;else if(s.unpairedTagsSet.has(A))c=d.closeIndex;else{let ue=this.readStopNodeData(t,p,g+1);if(!ue)throw new Error(`Unexpected end of ${p}`);c=ue.i,Q=ue.tagContent}let D=new Bn(A);C&&(D[":@"]=C),D.add(s.textNodeName,Q),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,D,this.readonlyMatcher,N)}else{if(E){({tagName:A,tagExp:f}=K_(s.transformTagName,A,f,s));let Q=new Bn(A);C&&(Q[":@"]=C),this.addChild(r,Q,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(s.unpairedTagsSet.has(A)){let Q=new Bn(A);C&&(Q[":@"]=C),this.addChild(r,Q,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=d.closeIndex;continue}else{let Q=new Bn(A);if(this.tagsNodeStack.length>s.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),C&&(Q[":@"]=C),this.addChild(r,Q,this.readonlyMatcher,N),r=Q}n="",c=g}}}else n+=t[c];return e.child},"parseXml");function VOe(t,e,r,n){this.options.captureMetaData||(n=void 0);let s=this.options.jPath?r.toString():r,i=this.options.updateTag(e.tagname,s,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,n))}o(VOe,"addChild");function zOe(t,e,r){let n=this.options.processEntities;if(!n||!n.enabled)return t;if(n.allowedTags){let s=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(e):n.allowedTags(e,s)))return t}if(n.tagFilter){let s=this.options.jPath?r.toString():r;if(!n.tagFilter(e,s))return t}return this.entityDecoder.decode(t)}o(zOe,"replaceEntitiesValue");function JOe(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}o(JOe,"saveTextToParentTag");function $Oe(){return this.stopNodeExpressionsLine truncated
|
||||
`;function rMe(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let r=t[0];if(sk(r)==="?xml"){let s=r[":@"];if(s){let i=e.attributeNamePrefix+"version";if(s[i])return s[i]}}return"1.0"}o(rMe,"detectXmlVersionFromArray");function eZ(t,e,r,n,s){return!r.sanitizeName||Au(t,{xmlVersion:s})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}o(eZ,"resolveTagName");function nk(t,e){let r="";e.format&&(r=tMe);let n=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let a=0;a<e.stopNodes.length;a++){let c=e.stopNodes[a];typeof c=="string"?n.push(new is(c)):c instanceof is&&n.push(c)}let s=rMe(t,e),i=new io;return tZ(t,e,r,i,n,s)}o(nk,"toXml");function tZ(t,e,r,n,s,i){let a="",c=!1;if(e.maxNestedTags&&n.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let l=t.toString();return l=rk(l,e),l}return""}for(let l=0;l<t.length;l++){let u=t[l],d=sk(u);if(d===void 0)continue;let p=d===e.textNodeName||d===e.cdataPropName||d===e.commentPropName||d[0]==="?"?d:eZ(d,!1,e,n,i),f=nMe(u[":@"],e);n.push(p,f);let h=iMe(n,s);if(p===e.textNodeName){let I=u[d];h||(I=e.tagValueProcessor(p,I),I=rk(I,e)),c&&(a+=r),a+=I,c=!1,n.pop();continue}else if(p===e.cdataPropName){c&&(a+=r);let I=u[d][0][e.textNodeName],B=kB(I);a+=`<![CDATA[${B}]]>`,c=!1,n.pop();continue}else if(p===e.commentPropName){let I=u[d][0][e.textNodeName],B=_B(I);a+=r+`<!--${B}-->`,c=!0,n.pop();continue}else if(p[0]==="?"){let I=ZX(u[":@"],e,h,n,i);a+=(p==="?xml"?"":r)+`<${p}${I}?>`,c=!0,n.pop();continue}let g=r;g!==""&&(g+=e.indentBy);let y=ZX(u[":@"],e,h,n,i),E=r+`<${p}${y}`,C;h?C=rZ(u[d],e):C=tZ(u[d],e,g,n,s,i),e.unpairedTags.indexOf(p)!==-1?e.suppressUnpairedNode?a+=E+">":a+=E+"/>":(!C||C.length===0)&&e.suppressEmptyNode?a+=E+"/>":C&&C.endsWith(">")?a+=E+`>${C}${r}</${p}>`:(a+=E+">",C&&r!==""&&(C.includes("/>")||C.includes("</"))?a+=r+e.indentBy+C+r:a+=C,a+=`</${p}>`),c=!0,n.pop()}return a}o(tZ,"arrToStr");function nMe(t,e){if(!t||e.ignoreAttributes)return null;let r={},n=!1;for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;let i=s.startsWith(e.attributeNamePrefix)?s.substr(e.attributeNamePrefix.length):s;r[i]=Lc(t[s]),n=!0}return n?r:null}o(nMe,"extractAttributeValues");function rZ(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let r="";for(let n=0;n<t.length;n++){let s=t[n],i=sk(s);if(i===e.textNodeName)r+=s[i];else if(i===e.cdataPropName)r+=s[i][0][e.textNodeName];else if(i===e.commentPropName)r+=s[i][0][e.textNodeName];else{if(i&&i[0]==="?")continue;if(i){let a=sMe(s[":@"],e),c=rZ(s[i],e);!c||c.length===0?r+=`<${i}${a}/>`:r+=`<${i}${a}>${c}</${i}>`}}}return r}o(rZ,"getRawContent");function sMe(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=t[n];s===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${Lc(s)}"`}return r}o(sMe,"attr_to_str_raw");function sk(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let n=e[r];if(Object.prototype.hasOwnProperty.call(t,n)&&n!==":@")return n}}o(sk,"propName");function ZX(t,e,r,n,s){let i="";if(t&&!e.ignoreAttributes)for(let a in t){if(!Object.prototype.hasOwnProperty.call(t,a))continue;let c=a.substr(e.attributeNamePrefix.length),l=r?c:eZ(c,!0,e,n,s),u;r?u=t[a]:(u=e.attributeValueProcessor(a,t[a]),u=rk(u,e)),u===!0&&e.suppressBooleanAttributes?i+=` ${l}`:i+=` ${l}="${Lc(u)}"`}return i}o(ZX,"attr_to_str");function iMe(t,e){if(!e||e.length===0)return!1;for(let r=0;r<e.length;r++)if(t.matches(e[r]))return!0;return!1}o(iMe,"checkStopNode");function rk(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){let n=e.entities[r];t=t.replace(n.regex,n.val)}return t}o(rk,"replaceEntitiesValue");function ik(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(let r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}o(ik,"getIgnoreAttributesFn");var oMe={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:o(function(t,e){return e},"tagValueProcessor"),attributeValueProcessor:o(function(t,e){return e},"attributeValueProcessor"),preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&"},{regex:new RegExp(">","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function wn(t){if(this.options=Object.assign({},oMe,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e=="string"&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.oLine truncated
|
||||
`,this.newLine=`
|
||||
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}o(wn,"Builder");function sMe(t,e){let r=t["?xml"];if(r&&typeof r=="object"){if(e.attributesGroupName&&r[e.attributesGroupName]){let s=r[e.attributesGroupName][e.attributeNamePrefix+"version"];if(s)return s}let n=r[e.attributeNamePrefix+"version"];if(n)return n}return"1.0"}o(sMe,"detectXmlVersionFromObj");function sk(t,e,r,n,s){return!r.sanitizeName||Au(t,{xmlVersion:s})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}o(sk,"resolveTagName");wn.prototype.build=function(t){if(this.options.preserveOrder)return tk(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new io,r=sMe(t,this.options);return this.j2x(t,0,e,r).val}};wn.prototype.j2x=function(t,e,r,n){let s="",i="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let a=this.options.jPath?r.toString():r,c=this.checkStopNode(r);for(let l in t){if(!Object.prototype.hasOwnProperty.call(t,l))continue;let d=l===this.options.textNodeName||l===this.options.cdataPropName||l===this.options.commentPropName||this.options.attributesGroupName&&l===this.options.attributesGroupName||this.isAttribute(l)||l[0]==="?"?l:sk(l,!1,this.options,r,n);if(typeof t[l]>"u")this.isAttribute(l)&&(i+="");else if(t[l]===null)this.isAttribute(l)||d===this.options.cdataPropName||d===this.options.commentPropName?i+="":d[0]==="?"?i+=this.indentate(e)+"<"+d+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+d+"/"+this.tagEndChar;else if(t[l]instanceof Date)i+=this.buildTextValNode(t[l],d,"",e,r);else if(typeof t[l]!="object"){let A=this.isAttribute(l);if(A&&!this.ignoreAttributesFn(A,a)){let p=sk(A,!0,this.options,r,n);s+=this.buildAttrPairStr(p,""+t[l],c)}else if(!A)if(l===this.options.textNodeName){let p=this.options.tagValueProcessor(l,""+t[l]);i+=this.replaceEntitiesValue(p)}else{r.push(d);let p=this.checkStopNode(r);if(r.pop(),p){let f=""+t[l];f===""?i+=this.indentate(e)+"<"+d+this.closeTag(d)+this.tagEndChar:i+=this.indentate(e)+"<"+d+">"+f+"</"+d+this.tagEndChar}else i+=this.buildTextValNode(t[l],d,"",e,r)}}else if(Array.isArray(t[l])){let A=t[l].length,p="",f="";for(let h=0;h<A;h++){let g=t[l][h];if(!(typeof g>"u"))if(g===null)d[0]==="?"?i+=this.indentate(e)+"<"+d+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+d+"/"+this.tagEndChar;else if(typeof g=="object")if(this.options.oneListGroup){r.push(d);let y=this.j2x(g,e+1,r,n);r.pop(),p+=y.val,this.options.attributesGroupName&&g.hasOwnProperty(this.options.attributesGroupName)&&(f+=y.attrStr)}else p+=this.processTextOrObjNode(g,d,e,r,n);else if(this.options.oneListGroup){let y=this.options.tagValueProcessor(d,g);y=this.replaceEntitiesValue(y),p+=y}else{r.push(d);let y=this.checkStopNode(r);if(r.pop(),y){let E=""+g;E===""?p+=this.indentate(e)+"<"+d+this.closeTag(d)+this.tagEndChar:p+=this.indentate(e)+"<"+d+">"+E+"</"+d+this.tagEndChar}else p+=this.buildTextValNode(g,d,"",e,r)}}this.options.oneListGroup&&(p=this.buildObjectNode(p,d,f,e)),i+=p}else if(this.options.attributesGroupName&&l===this.options.attributesGroupName){let A=Object.keys(t[l]),p=A.length;for(let f=0;f<p;f++){let h=sk(A[f],!0,this.options,r,n);s+=this.buildAttrPairStr(h,""+t[l][A[f]],c)}}else i+=this.processTextOrObjNode(t[l],d,e,r,n)}return{attrStr:s,val:i}};wn.prototype.buildAttrPairStr=function(t,e,r){return r||(e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+Lc(e)+'"'};function iMe(t,e,r,n,s){let i=this.extractAttributes(t);if(n.push(e,i),this.checkStopNode(n)){let l=this.buildRawContent(t),u=this.buildAttributesForStopNode(t);return n.pop(),this.buildObjectNode(l,e,u,r)}let c=this.j2x(t,r+1,n,s);return n.pop(),e[0]==="?"?this.buildTextValNode("",e,c.attrStr,r,n):t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,c.attrStr,r,n):this.buildObjectNode(c.val,e,c.attrStr,r)}o(iMe,"processTextOrObjNode");wn.prototype.extractAttributes=function(t){if(!t||typeof t!="object")return null;let e={},r=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){let n=t[this.options.attributesGroupName];for(let s in n){if(!Object.prototype.hasOwnProperty.call(n,s))continue;let i=s.startsWith(this.options.attributeNamePrefix)?s.substring(this.options.attributeNamePrefix.length):s;e[i]=Lc(n[s]),r=!0}}else for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=this.isAttribute(n);s&&(e[s]=Lc(t[n]),r=!0)}return r?e:null};wn.prototype.buildRawContent=function(t){if(typeof t=="string")return t;if(typeof t!="object"||t===null)return String(t);if(t[this.options.textNodeName]!==void 0)return t[this.options.textNodeName];let e="";for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||this.isAttribute(r)||this.options.attributesGroupName&&r===this.o
Line truncated
|
||||
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}o(wn,"Builder");function aMe(t,e){let r=t["?xml"];if(r&&typeof r=="object"){if(e.attributesGroupName&&r[e.attributesGroupName]){let s=r[e.attributesGroupName][e.attributeNamePrefix+"version"];if(s)return s}let n=r[e.attributeNamePrefix+"version"];if(n)return n}return"1.0"}o(aMe,"detectXmlVersionFromObj");function ok(t,e,r,n,s){return!r.sanitizeName||Au(t,{xmlVersion:s})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}o(ok,"resolveTagName");wn.prototype.build=function(t){if(this.options.preserveOrder)return nk(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new io,r=aMe(t,this.options);return this.j2x(t,0,e,r).val}};wn.prototype.j2x=function(t,e,r,n){let s="",i="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let a=this.options.jPath?r.toString():r,c=this.checkStopNode(r);for(let l in t){if(!Object.prototype.hasOwnProperty.call(t,l))continue;let d=l===this.options.textNodeName||l===this.options.cdataPropName||l===this.options.commentPropName||this.options.attributesGroupName&&l===this.options.attributesGroupName||this.isAttribute(l)||l[0]==="?"?l:ok(l,!1,this.options,r,n);if(typeof t[l]>"u")this.isAttribute(l)&&(i+="");else if(t[l]===null)this.isAttribute(l)||d===this.options.cdataPropName||d===this.options.commentPropName?i+="":d[0]==="?"?i+=this.indentate(e)+"<"+d+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+d+"/"+this.tagEndChar;else if(t[l]instanceof Date)i+=this.buildTextValNode(t[l],d,"",e,r);else if(typeof t[l]!="object"){let A=this.isAttribute(l);if(A&&!this.ignoreAttributesFn(A,a)){let p=ok(A,!0,this.options,r,n);s+=this.buildAttrPairStr(p,""+t[l],c)}else if(!A)if(l===this.options.textNodeName){let p=this.options.tagValueProcessor(l,""+t[l]);i+=this.replaceEntitiesValue(p)}else{r.push(d);let p=this.checkStopNode(r);if(r.pop(),p){let f=""+t[l];f===""?i+=this.indentate(e)+"<"+d+this.closeTag(d)+this.tagEndChar:i+=this.indentate(e)+"<"+d+">"+f+"</"+d+this.tagEndChar}else i+=this.buildTextValNode(t[l],d,"",e,r)}}else if(Array.isArray(t[l])){let A=t[l].length,p="",f="";for(let h=0;h<A;h++){let g=t[l][h];if(!(typeof g>"u"))if(g===null)d[0]==="?"?i+=this.indentate(e)+"<"+d+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+d+"/"+this.tagEndChar;else if(typeof g=="object")if(this.options.oneListGroup){r.push(d);let y=this.j2x(g,e+1,r,n);r.pop(),p+=y.val,this.options.attributesGroupName&&g.hasOwnProperty(this.options.attributesGroupName)&&(f+=y.attrStr)}else p+=this.processTextOrObjNode(g,d,e,r,n);else if(this.options.oneListGroup){let y=this.options.tagValueProcessor(d,g);y=this.replaceEntitiesValue(y),p+=y}else{r.push(d);let y=this.checkStopNode(r);if(r.pop(),y){let E=""+g;E===""?p+=this.indentate(e)+"<"+d+this.closeTag(d)+this.tagEndChar:p+=this.indentate(e)+"<"+d+">"+E+"</"+d+this.tagEndChar}else p+=this.buildTextValNode(g,d,"",e,r)}}this.options.oneListGroup&&(p=this.buildObjectNode(p,d,f,e)),i+=p}else if(this.options.attributesGroupName&&l===this.options.attributesGroupName){let A=Object.keys(t[l]),p=A.length;for(let f=0;f<p;f++){let h=ok(A[f],!0,this.options,r,n);s+=this.buildAttrPairStr(h,""+t[l][A[f]],c)}}else i+=this.processTextOrObjNode(t[l],d,e,r,n)}return{attrStr:s,val:i}};wn.prototype.buildAttrPairStr=function(t,e,r){return r||(e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+Lc(e)+'"'};function cMe(t,e,r,n,s){let i=this.extractAttributes(t);if(n.push(e,i),this.checkStopNode(n)){let l=this.buildRawContent(t),u=this.buildAttributesForStopNode(t);return n.pop(),this.buildObjectNode(l,e,u,r)}let c=this.j2x(t,r+1,n,s);return n.pop(),e[0]==="?"?this.buildTextValNode("",e,c.attrStr,r,n):t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,c.attrStr,r,n):this.buildObjectNode(c.val,e,c.attrStr,r)}o(cMe,"processTextOrObjNode");wn.prototype.extractAttributes=function(t){if(!t||typeof t!="object")return null;let e={},r=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){let n=t[this.options.attributesGroupName];for(let s in n){if(!Object.prototype.hasOwnProperty.call(n,s))continue;let i=s.startsWith(this.options.attributeNamePrefix)?s.substring(this.options.attributeNamePrefix.length):s;e[i]=Lc(n[s]),r=!0}}else for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;let s=this.isAttribute(n);s&&(e[s]=Lc(t[n]),r=!0)}return r?e:null};wn.prototype.buildRawContent=function(t){if(typeof t=="string")return t;if(typeof t!="object"||t===null)return String(t);if(t[this.options.textNodeName]!==void 0)return t[this.options.textNodeName];let e="";for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r)||this.isAttribute(r)||this.options.attributesGroupName&&r===this.o
Line truncated
|
||||
`)+`
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(ae.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===ae.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(s=>s.name.toLowerCase().startsWith(ae.PREFIX_FOR_STORAGE));r.sort((s,i)=>VB(s.name.toLowerCase(),i.name.toLowerCase())),r=r.filter((s,i,a)=>!(i>0&&s.name.toLowerCase()===a[i-1].name.toLowerCase()));let n="";return r.forEach(s=>{n+=`${s.name.toLowerCase().trimRight()}:${s.value.trimLeft()}
|
||||
`}),n}getCanonicalizedResourceString(e){let r=qB(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let s=GB(e.url),i={};if(s){let a=[];for(let c in s)if(Object.prototype.hasOwnProperty.call(s,c)){let l=c.toLowerCase();i[l]=s[c],a.push(l)}a.sort();for(let c of a)n+=`
|
||||
${c}:${decodeURIComponent(i[c])}`}return n}};var St=class extends hu{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new Om(e,r,this)}computeHMACSHA256(e){return(0,cZ.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var er=to("storage-common");var _s;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(_s||(_s={}));var Uc={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:_s.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},fMe=new rs("The operation was aborted."),Mm=class extends oo{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=Uc){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Uc.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Uc.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Uc.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Uc.maxRetryDelayInMs):Uc.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Uc.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Uc.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let s=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;i||(s.url=UB(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=Fc(s.url,Qa.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(er.info(`RetryPolicy: =====> Try=${n} ${i?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(s),!this.shouldRetry(i,n,a))return a;r=r||!i&&a.status===404}catch(c){if(er.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(i,n,a,c))throw c}return await this.delay(i,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)return er.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(s){for(let a of i)if(s.name.toUpperCase().includes(a)||s.message.toUpperCase().includes(a)||s.code&&s.code.toString().toUpperCase()===a)return er.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(n||s){let a=n?n.status:s?s.statusCode:0;if(!e&&a===404)return er.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return er.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){let a=n.headers.get(ae.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return s?.code==="PARSE_ERROR"&&s?.message.startsWith('Error "Error: Unclosed root tag')?(er.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let s=0;if(e)switch(this.retryOptions.retryPolicyType){case _s.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case _s.FIXED:s=this.retryOptions.retryDelayInMs;break}else s=Math.random()*1e3;return er.info(`RetryPolicy: Delay for ${s}ms`),HB(s,n,fMe)}};var Lm=class{static{o(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new Mm(e,r,this.retryOptions)}};var hMe="storageBrowserPolicy";function lZ(){return{name:hMe,async sendRequest(t,e){return Fe||((t.method==="GET"||t.method==="HEAD")&&(t.url=Fc(t.url,Qa.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(ae.COOKIE),t.headers.delete(ae.CONTENT_LENGTH)),e(t)}}}o(lZ,"storageBrowserPolicy");var mMe="StorageCorrectContentLengthPolicy";function uZ(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(ae.CONTENT_LENGTH,Buffer.byteLength(e.body))}return o(t,"correctContentLength"),{name:mMe,async sendRequest(e,r){return t(e),r(e)}}}o(uZ,"storageCorrectContentLengthPolicy");var gMe="storageRetryPolicy",VA={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:_s.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},EMe=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],yMe=new rs("The operation was aborted.");function dZ(t={}){let e=t.retryPolicyType??VA.retryPolicyType,r=t.maxTries??VA.maxTries,n=t.retryDelayInMs??VA.retryDelayInMs,s=t.maxRetryDelayInMs??VA.maxRetryDelayInMs,i=t.secondaryHost??VA.secondaryHost,a=t.tryTimeoutInMs??VA.tryTimeoutInMs;function c({isPrimaryRetry:u,attempt:d,response:A,error:p}){if(d>=r)return er.inf
Line truncated
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(ae.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===ae.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(s=>s.name.toLowerCase().startsWith(ae.PREFIX_FOR_STORAGE));r.sort((s,i)=>zB(s.name.toLowerCase(),i.name.toLowerCase())),r=r.filter((s,i,a)=>!(i>0&&s.name.toLowerCase()===a[i-1].name.toLowerCase()));let n="";return r.forEach(s=>{n+=`${s.name.toLowerCase().trimRight()}:${s.value.trimLeft()}
|
||||
`}),n}getCanonicalizedResourceString(e){let r=GB(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let s=HB(e.url),i={};if(s){let a=[];for(let c in s)if(Object.prototype.hasOwnProperty.call(s,c)){let l=c.toLowerCase();i[l]=s[c],a.push(l)}a.sort();for(let c of a)n+=`
|
||||
${c}:${decodeURIComponent(i[c])}`}return n}};var St=class extends hu{static{o(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new Mm(e,r,this)}computeHMACSHA256(e){return(0,uZ.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var er=to("storage-common");var _s;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(_s||(_s={}));var Uc={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:_s.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},gMe=new rs("The operation was aborted."),Lm=class extends oo{static{o(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=Uc){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:Uc.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):Uc.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:Uc.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:Uc.maxRetryDelayInMs):Uc.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:Uc.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:Uc.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let s=e.clone(),i=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;i||(s.url=qB(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=Fc(s.url,Qa.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(er.info(`RetryPolicy: =====> Try=${n} ${i?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(s),!this.shouldRetry(i,n,a))return a;r=r||!i&&a.status===404}catch(c){if(er.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(i,n,a,c))throw c}return await this.delay(i,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)return er.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let i=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(s){for(let a of i)if(s.name.toUpperCase().includes(a)||s.message.toUpperCase().includes(a)||s.code&&s.code.toString().toUpperCase()===a)return er.info(`RetryPolicy: Network error ${a} found, will retry.`),!0}if(n||s){let a=n?n.status:s?s.statusCode:0;if(!e&&a===404)return er.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return er.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){let a=n.headers.get(ae.X_MS_CopySourceErrorCode);if(a!==void 0)switch(a){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return s?.code==="PARSE_ERROR"&&s?.message.startsWith('Error "Error: Unclosed root tag')?(er.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0):!1}async delay(e,r,n){let s=0;if(e)switch(this.retryOptions.retryPolicyType){case _s.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case _s.FIXED:s=this.retryOptions.retryDelayInMs;break}else s=Math.random()*1e3;return er.info(`RetryPolicy: Delay for ${s}ms`),VB(s,n,gMe)}};var Fm=class{static{o(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new Lm(e,r,this.retryOptions)}};var EMe="storageBrowserPolicy";function dZ(){return{name:EMe,async sendRequest(t,e){return Fe||((t.method==="GET"||t.method==="HEAD")&&(t.url=Fc(t.url,Qa.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(ae.COOKIE),t.headers.delete(ae.CONTENT_LENGTH)),e(t)}}}o(dZ,"storageBrowserPolicy");var yMe="StorageCorrectContentLengthPolicy";function AZ(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(ae.CONTENT_LENGTH,Buffer.byteLength(e.body))}return o(t,"correctContentLength"),{name:yMe,async sendRequest(e,r){return t(e),r(e)}}}o(AZ,"storageCorrectContentLengthPolicy");var CMe="storageRetryPolicy",zA={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:_s.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},IMe=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],BMe=new rs("The operation was aborted.");function pZ(t={}){let e=t.retryPolicyType??zA.retryPolicyType,r=t.maxTries??zA.maxTries,n=t.retryDelayInMs??zA.retryDelayInMs,s=t.maxRetryDelayInMs??zA.maxRetryDelayInMs,i=t.secondaryHost??zA.secondaryHost,a=t.tryTimeoutInMs??zA.tryTimeoutInMs;function c({isPrimaryRetry:u,attempt:d,response:A,error:p}){if(d>=r)return er.inf
Line truncated
|
||||
`)+`
|
||||
`+n(i)+s(i),c=(0,AZ.createHmac)("sha256",t.accountKey).update(a,"utf8").digest("base64");i.headers.set(ae.AUTHORIZATION,`SharedKey ${t.accountName}:${c}`)}o(e,"signRequest");function r(i,a){let c=i.headers.get(a);return!c||a===ae.CONTENT_LENGTH&&c==="0"?"":c}o(r,"getHeaderValueToSign");function n(i){let a=[];for(let[l,u]of i.headers)l.toLowerCase().startsWith(ae.PREFIX_FOR_STORAGE)&&a.push({name:l,value:u});a.sort((l,u)=>VB(l.name.toLowerCase(),u.name.toLowerCase())),a=a.filter((l,u,d)=>!(u>0&&l.name.toLowerCase()===d[u-1].name.toLowerCase()));let c="";return a.forEach(l=>{c+=`${l.name.toLowerCase().trimRight()}:${l.value.trimLeft()}
|
||||
`}),c}o(n,"getCanonicalizedHeadersString");function s(i){let a=qB(i.url)||"/",c="";c+=`/${t.accountName}${a}`;let l=GB(i.url),u={};if(l){let d=[];for(let A in l)if(Object.prototype.hasOwnProperty.call(l,A)){let p=A.toLowerCase();u[p]=l[A],d.push(p)}d.sort();for(let A of d)c+=`
|
||||
${A}:${decodeURIComponent(u[A])}`}return c}return o(s,"getCanonicalizedResourceString"),{name:CMe,async sendRequest(i,a){return e(i),a(i)}}}o(lk,"storageSharedKeyCredentialPolicy");var IMe="storageRequestFailureDetailsParserPolicy";function pZ(){return{name:IMe,async sendRequest(t,e){try{return await e(t)}catch(r){throw typeof r=="object"&&r!==null&&r.response&&r.response.parsedBody&&r.response.parsedBody.code==="InvalidHeaderValue"&&r.response.parsedBody.HeaderName==="x-ms-version"&&(r.message=`The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.
|
||||
`),r}}}}o(pZ,"storageRequestFailureDetailsParserPolicy");var fZ=require("node:crypto");var zB=class{static{o(this,"UserDelegationKeyCredential")}accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,fZ.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var JB="12.31.0",$B="2026-02-06";var YB="https://storage.azure.com/.default",Ra={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var gi="",uk="*",BMe=1*1024*1024;var bMe=4*BMe;var hZ="AES256",mZ="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",gZ=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"],EZ=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],yZ="BlobUsesCustomerSpecifiedEncryption",CZ="BlobDoesNotUseCustomerSpecifiedEncryption",IZ=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Ta(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}o(Ta,"isPipelineLike");var Fm=class{static{o(this,"Pipeline")}factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function Lt(t,e={}){t||(t=new ft);let r=new Fm([],e);return r._credential=t,r}o(Lt,"newPipeline");function wMe(t){let e=[SMe,BZ,NMe,xMe,QMe,RMe,vMe];if(t.factories.length){let r=t.factories.filter(n=>!e.some(s=>s(n)));if(r.length){let n=r.some(s=>TMe(s));return{wrappedPolicies:F_(r),afterRetry:n}}}}o(wMe,"processDownlevelPipeline");function dk(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?U_(e):ck(),t._coreHttpClient=n);let s=t._corePipeline;if(!s){let i=`azsdk-js-azure-storage-blob/${JB}`,a=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;s=Im({...r,loggingOptions:{additionalAllowedHeaderNames:gZ,additionalAllowedQueryParameters:EZ,logger:DB.info},userAgentOptions:{userAgentPrefix:a},serializationOptions:{stringifyXML:kB,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:ok,serializerOptions:{xml:{xmlCharKey:"#"}}}}),s.removePolicy({phase:"Retry"}),s.removePolicy({name:h_}),s.addPolicy(uZ()),s.addPolicy(dZ(r.retryOptions),{phase:"Retry"}),s.addPo
Line truncated
|
||||
`),i=e.computeHMACSHA256(s);return{sasQueryParameters:new Bi(t.version,i,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}o(w1e,"generateBlobSASQueryParameters20150405");function S1e(t,e){if(t=wu(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}o(S1e,"generateBlobSASQueryParameters20181109");function N1e(t,e){if(t=wu(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}o(N1e,"generateBlobSASQueryParameters20201206");function x1e(t,e){if(t=wu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ue(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ue(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}o(x1e,"generateBlobSASQueryParametersUDK20181109");function Q1e(t,e){if(t=wu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ue(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ue(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}o(Q1e,"generateBlobSASQueryParametersUDK20200210");function R1e(t,e){if(t=wu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ue(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ue(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}o(R1e,"generateBlobSASQueryParametersUDK20201206");function T1e(t,e){if(t=wu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ue(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ue(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}o(T1e,"generateBlobSASQueryParametersUDK20250705");function bu(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}o(bu,"getCanonicalName");function wu(t){let e=t.version?t.version:$B;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}o(wu,"SASSignatureValuesSanityCheckAndAutofill");var Km=class{static{o(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=OA()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==gi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==gi||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 z.withSpan("BlobLeaseClient-acquireLease",r,async n=>K(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==gi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==gi||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 z.withSpan("BlobLeaseClient-changeLease",r,async n=>{let s=K(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,s})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==gi||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==gi||e.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 z.withSpan("BlobLeaseClient-releaseLease",e,async r=>K(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptions})))}async renewLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==gi||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==gi||e.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 ar
Line truncated
|
||||
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: 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"}};rp.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Qu=class extends Error{static{o(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Qu.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var ag=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var xFe=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},XM=class{static{o(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);S(`Sent ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function See(t,e,r){return xFe(this,void 0,void 0,function*(){var n;let s=new Ma(t),i=s.getBlockBlobClient(),a=new XM((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),b(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let l=yield i.uploadFile(e,c);if(l._response.status>=400)throw new Xb(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw Ve(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{a.stopDisplayTimer()}})}o(See,"uploadCacheArchiveSDK");var xee=w(require("buffer"),1),No=w(require("fs"),1),Qee=w(require("stream"),1),Ree=w(require("util"),1);var Zb=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function ew(t){return t?t>=200&&t<300:!1}o(ew,"isSuccessStatusCode");function QFe(t){return t?t>=500:!0}o(QFe,"isServerErrorStatusCode");function RFe(t){return t?[wt.BadGateway,wt.ServiceUnavailable,wt.GatewayTimeout].includes(t):!1}o(RFe,"isRetryableStatusCode");function TFe(t){return Zb(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(TFe,"sleep");function Nee(t,e,r){return Zb(this,arguments,void 0,function*(n,s,i,a=wI,c=SI,l=void 0){let u="",d=1;for(;d<=a;){let A,p,f=!1;try{A=yield s()}catch(h){l&&(A=l(h)),f=!0,u=h.message}if(A&&(p=i(A),!QFe(p)))return A;if(p&&(f=RFe(p),u=`Cache service responded with ${p}`),b(`${n} - Attempt ${d} of ${a} failed with error: ${u}`),!f){b(`${n} - Error is not retryable`);break}yield TFe(c),d++}throw Error(`${n} failed: ${u}`)})}o(Nee,"retry");function cg(t,e){return Zb(this,arguments,void 0,function*(r,n,s=wI,i=SI){return yield Nee(r,n,a=>a.statusCode,s,i,a=>{if(a instanceof Ki)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}o(cg,"retryTypedResponse");function np(t,e){return Zb(this,arguments,void 0,function*(r,n,s=wI,i=SI){return yield Nee(r,n,a=>a.message.statusCode,s,i)})}o(np,"retryHttpClientResponse");var Ls=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function vFe(t,e){return Ls(this,void 0,void 0,function*(){yield Ree.promisify(Qee.pipeline)(t.message,e)})}o(vFe,"pipeResponseToStream");var tw=class{static{o(this,"DownloadProgress")}constructor(e){this.contentLength=e,this.segmentIndex=0,this.segmentSize=0,this.segmentOffset=0,this.receivedBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize,this.segmentIndex=this.segmentIndex+1,this.segmentSize=e,this.receivedBytes=0,b(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){th
Line truncated
|
||||
Other caches with similar key:`);for(let c of i?.artifactCaches||[])b(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}o(LFe,"printCachesListForDiagnostics");function rL(t,e,r){return Nn(this,void 0,void 0,function*(){let n=new Fee.URL(t),s=_ee(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield vee(t,e,s):s.concurrentBlobDownloads?yield Tee(t,e,s):yield rw(t,e):yield rw(t,e)})}o(rL,"downloadCache");function qee(t,e,r){return Nn(this,void 0,void 0,function*(){let n=tL(),s=xA(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:s,cacheSize:r?.cacheSize};return yield cg("reserveCache",()=>Nn(this,void 0,void 0,function*(){return n.postJson(ug("caches"),i)}))})}o(qee,"reserveCache");function Lee(t,e){return`bytes ${t}-${e}/*`}o(Lee,"getContentRange");function FFe(t,e,r,n,s){return Nn(this,void 0,void 0,function*(){b(`Uploading chunk of size ${s-n+1} bytes at offset ${n} with content range: ${Lee(n,s)}`);let i={"Content-Type":"application/octet-stream","Content-Range":Lee(n,s)},a=yield np(`uploadChunk (start: ${n}, end: ${s})`,()=>Nn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!ew(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}o(FFe,"uploadChunk");function UFe(t,e,r,n){return Nn(this,void 0,void 0,function*(){let s=ji(r),i=ug(`caches/${e.toString()}`),a=sp.openSync(r,"r"),c=ZM(n),l=QP("uploadConcurrency",c.uploadConcurrency),u=QP("uploadChunkSize",c.uploadChunkSize),d=[...new Array(l).keys()];b("Awaiting all uploads");let A=0;try{yield Promise.all(d.map(()=>Nn(this,void 0,void 0,function*(){for(;A<s;){let p=Math.min(s-A,u),f=A,h=A+p-1;A+=u,yield FFe(t,i,()=>sp.createReadStream(r,{fd:a,start:f,end:h,autoClose:!1}).on("error",g=>{throw new Error(`Cache upload failed because file read failed with ${g.message}`)}),f,h)}})))}finally{sp.closeSync(a)}})}o(UFe,"uploadFile");function qFe(t,e,r){return Nn(this,void 0,void 0,function*(){let n={size:r};return yield cg("commitCache",()=>Nn(this,void 0,void 0,function*(){return t.postJson(ug(`caches/${e.toString()}`),n)}))})}o(qFe,"commitCache");function nL(t,e,r,n){return Nn(this,void 0,void 0,function*(){if(ZM(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield See(r,e,n)}else{let i=tL();b("Upload cache"),yield UFe(i,t,e,n),b("Commiting cache");let a=ji(e);S(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield qFe(i,t,a);if(!ew(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);S("Cache saved successfully")}})}o(nL,"saveCache");var Dte=w(Qte(),1),qt=w(Ut(),1),cs=w(Ut(),1),_u=w(Ut(),1),ku=w(Ut(),1),Du=w(Ut(),1);var KL=w(Ut(),1),XL=w(Ut(),1),Pte=w(Ut(),1),_te=w(Ut(),1),kte=w(Ut(),1);var YL=w(Ut(),1),WL=w(Ut(),1),Rte=w(Ut(),1),Tte=w(Ut(),1),vte=w(Ut(),1);var jL=class extends vte.MessageType{static{o(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,Tte.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Rte.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let i=s??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let u=n.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${l}) for ${this.typeName}`);let d=e.skip(l);u!==!1&&(u===!0?WL.UnknownFieldHandler.onRead:u)(this.typeName,i,c,l,d)}}return i}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,YL.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,YL.WireType.Varint).int64(e.permission);let s=n.writeUnknownFields;return s!==!1&&(s==!0?WL.UnknownFieldHandler.onWrite:s)(this.typeName,e,r),r}},Hw=new jL;var ZL=class extends kte.MessageType{static{o(this,"CacheMetadata$Type")}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:o(()=>Hw,"T")}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,_te.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Pte.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let i=s??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:i.repositoryId=e.int64().toString();break;case 2:i.scope.push(Hw.internalBinaryRead(e,e.uint32(),n));break;default:let u=n.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${l}) for ${this.typeName}`);let d=e.skip(l);u!==!1&&(u===!0?XL.UnknownFieldHandler.onRead:u)(this.typeName,i,c,l,d)}}return i}internalBinaryWrite(e,r,n){e.repositoryId!==
Line truncated
|
||||
`));let n=yield f1(r,"create");yield h1(n,t)})}o(g1,"createTar");var Ip=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},Si=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Ou=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},E1="cache write denied:",Cp=class t extends Ou{static{o(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},$w=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function Fte(t){if(!t||t.length===0)throw new Si("Path Validation Error: At least one directory or file path is required")}o(Fte,"checkPaths");function y1(t){if(t.length>512)throw new Si(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Si(`Key Validation Error: ${t} cannot contain commas.`)}o(y1,"checkKey");function C1(){return lg()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}o(C1,"isFeatureAvailable");function Ute(t,e,r,n){return Ip(this,arguments,void 0,function*(s,i,a,c,l=!1){let u=lg();return b(`Cache service version: ${u}`),Fte(s),u==="v2"?yield rqe(s,i,a,c,l):yield tqe(s,i,a,c,l)})}o(Ute,"restoreCache");function tqe(t,e,r,n){return Ip(this,arguments,void 0,function*(s,i,a,c,l=!1){a=a||[];let u=[i,...a];if(b("Resolved Keys:"),b(JSON.stringify(u)),u.length>10)throw new Si("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of u)y1(p);let d=yield cm(),A="";try{let p=yield Uee(u,s,{compressionMethod:d,enableCrossOsArchive:l});if(!p?.archiveLocation)return;if(c?.lookupOnly)return S("Lookup only - skipping download"),p.cacheKey;A=Ng.join(yield om(),vc(d)),b(`Archive Path: ${A}`),yield rL(p.archiveLocation,A,c),ya()&&(yield Sg(A,d));let f=ji(A);return S(`Cache Size: ~${Math.round(f/(1024*1024))} MB (${f} B)`),yield m1(A,d),S("Cache restored successfully"),p.cacheKey}catch(p){let f=p;if(f.name===Si.name)throw p;f instanceof Ki&&typeof f.statusCode=="number"&&f.statusCode>=500?hA(`Failed to restore: ${p.message}`):Ve(`Failed to restore: ${p.message}`)}finally{try{yield am(A)}catch(p){b(`Failed to delete archive: ${p}`)}}})}o(tqe,"restoreCacheV1");function rqe(t,e,r,n){return Ip(this,arguments,void 0,function*(s,i,a,c,l=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let u=[i,...a];if(b("Resolved Keys:"),b(JSON.stringify(u)),u.length>10)throw new Si("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of u)y1(A);let d="";try{let A=p1(),p=yield cm(),f={key:i,restoreKeys:a,version:xA(s,p,l)},h=yield A.GetCacheEntryDownloadURL(f);if(!h.ok){b(`Cache not found for version ${f.version} of keys: ${u.join(", ")}`);return}if(f.key!==h.matchedKey?S(`Cache hit for restore-key: ${h.matchedKey}`):S(`Cache hit for: ${h.matchedKey}`),c?.lookupOnly)return S("Lookup only - skipping download"),h.matchedKey;d=Ng.join(yield om(),vc(p)),b(`Archive path: ${d}`),b(`Starting download of archive to: ${d}`),yield rL(h.signedDownloadUrl,d,c);let y=ji(d);return S(`Cache Size: ~${Math.round(y/(1024*1024))} MB (${y} B)`),ya()&&(yield Sg(d,p)),yield m1(d,p),S("Cache restored successfully"),h.matchedKey}catch(A){let p=A;if(p.name===Si.name)throw A;p instanceof Ki&&typeof p.statusCode=="number"&&p.statusCode>=500?hA(`Failed to restore: ${A.message}`):Ve(`Failed to restore: ${A.message}`)}finally{try{d&&(yield am(d))}catch(A){b(`Failed to delete archive: ${A}`)}}})}o(rqe,"restoreCacheV2");function I1(t,e,r){return Ip(this,arguments,void 0,function*(n,s,i,a=!1){let c=lg();return b(`Cache service version: ${c}`),Fte(n),y1(s),c==="v2"?yield sqe(n,s,i,a):yield nqe(n,s,i,a)})}o(I1,"saveCache");function nqe(t,e,r){return Ip(this,arguments,void 0,function*(n,s,i,a=!1){var c,l,u,d,A,p;let f=yield cm(),h=-1,g=yield xP(n);if(b("Cache Paths:"),b(`${JSON.stringify(g)}`),g.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 y=yield om(),E=Ng.join(y,vc(f));b(`Archive Path: ${E}`);try{yield g1(y,g,f),ya()&&(yield Sg(E,f));let C=10*1024*1024*1024,I=ji(E);if(b(`File Size: ${I}`),I>C&&!eL())throw new Error(`Cache size of ~${Math.round(I/(1024*1024))} MB (${I} B) is over the 10GB limit, not saving cache.`);b("Reserving Cache");let B=yield qee(s,n,{compressionMethod:f,enableCrossOsArchive:a,cacheSize:I});if(!((c=B?.result)===null||c===void 0)&&c.cacheId)h=(l=B?.result)=
Line truncated
|
||||
`,a).length:A,u?(c===null?0:c.length)+l.length:0,u?l.length+A:0);return p<f},"__needMoreData"),parse:o(function(n,s,i,a){let{bom:c,comment_no_infix:l,delimiter_auto:u,encoding:d,from_line:A,ltrim:p,max_record_size:f,raw:h,relax_quotes:g,rtrim:y,skip_empty_lines:E,to:C,to_line:I}=this.options,{comment:B,escape:N,quote:Q,record_delimiter:D}=this.options,{bomSkipped:ue,delimiterDiscovered:xe,delimiterBufPrevious:ke,rawBuffer:qe,escapeIsQuote:Ce}=this.state;if(!xe&&u){let Ge;if(ke===void 0?Ge=n:ke!==void 0&&n===void 0?Ge=ke:Ge=Buffer.concat([ke,n]),n=void 0,s||Ge.length>u.size)this.options.delimiter=[Buffer.from($ie(Ge,this.options.delimiter_auto))],this.state.previousBuf=Ge,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=Ge;return}}let{previousBuf:Xe}=this.state,de;if(Xe===void 0)if(n===void 0){a();return}else de=n;else Xe!==void 0&&n===void 0?de=Xe:de=Buffer.concat([Xe,n]);if(ue===!1)if(c===!1)this.state.bomSkipped=!0;else if(de.length<3){if(s===!1){this.state.previousBuf=de;return}}else{for(let Ge in Mp)if(Mp[Ge].compare(de,0,Mp[Ge].length)===0){let Pi=Mp[Ge].length;this.state.bufBytesStart+=Pi,de=de.slice(Pi);let tc=Op({...this.original_options,encoding:Ge});for(let Bt in tc)this.options[Bt]=tc[Bt];({comment:B,escape:N,quote:Q}=this.options);break}this.state.bomSkipped=!0}let Lr=de.length,J;for(J=0;J<Lr&&!this.__needMoreData(J,Lr,s);J++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),I!==-1&&this.info.lines>I){this.state.stop=!0,a();return}this.state.quoting===!1&&D.length===0&&this.__autoDiscoverRecordDelimiter(de,J)&&(D=this.options.record_delimiter);let Ge=de[J];if(h===!0&&qe.append(Ge),(Ge===N$e||Ge===x$e)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(N!==null&&this.state.quoting===!0&&this.__isEscape(de,J,Ge)&&J+N.length<Lr)if(Ce){if(this.__isQuote(de,J+N.length)){this.state.escaping=!0,J+=N.length-1;continue}}else{this.state.escaping=!0,J+=N.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(de,J))if(this.state.quoting===!0){let Bt=de[J+Q.length],_i=y&&this.__isCharTrimable(de,J+Q.length),Mn=B!==null&&this.__compareBytes(B,de,J+Q.length,Bt),El=this.__isDelimiter(de,J+Q.length,Bt),PE=D.length===0?this.__autoDiscoverRecordDelimiter(de,J+Q.length):this.__isRecordDelimiter(Bt,de,J+Q.length);if(N!==null&&this.__isEscape(de,J,Ge)&&this.__isQuote(de,J+N.length))J+=N.length-1;else if(!Bt||El||PE||Mn||_i){this.state.quoting=!1,this.state.wasQuoting=!0,J+=Q.length-1;continue}else if(g===!1){let eG=this.__error(new be("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(Bt)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(eG!==void 0)return eG}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(Q),J+=Q.length-1}else if(this.state.field.length!==0){if(g===!1){let Bt=this.__infoField(),_i=Object.keys(Mp).map(El=>Mp[El].equals(this.state.field.toString())?El:!1).filter(Boolean)[0],Mn=this.__error(new be("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(Bt.column)} at line ${Bt.lines}, value is ${JSON.stringify(this.state.field.toString(d))}`,_i?`(${_i} bom)`:void 0],this.options,Bt,{field:this.state.field}));if(Mn!==void 0)return Mn}}else{this.state.quoting=!0,J+=Q.length-1;continue}if(this.state.quoting===!1){let Bt=this.__isRecordDelimiter(Ge,de,J);if(Bt!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=A){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),J+=Bt-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,J+=Bt-1;continue}this.info.bytes=this.state.bufBytesStart+J;let El=this.__onField();if(El!==void 0)return El;this.info.bytes=this.state.bufBytesStart+J+Bt;let PE=this.__onRecord(i);if(PE!==void 0)return PE;if(C!==-1&&this.info.records>=C){this.state.stop=!0,a();return}}this.state.commenting=!1,J+=Bt-1;continue}if(this.state.commenting)continue;if(B!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(B,de,J,Ge)!==0){this.state.commenting=!0;continue}let _i=this.__isDelimiter(de,J,Ge);if(_i!==0){this.info.bytes=this.state.bufBytesStart+J;let Mn=this.__onField();if(Mn!==void 0)return Mn;J+=_i-1;continue}}}if(this.state.commenting===!1&&f!==0&&this.state.record_length+this.state.field.length>f)return this.__error(new be("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${f}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let Pi=p===!1||th
Line truncated
|
||||
`+n(i)+s(i),c=(0,fZ.createHmac)("sha256",t.accountKey).update(a,"utf8").digest("base64");i.headers.set(ae.AUTHORIZATION,`SharedKey ${t.accountName}:${c}`)}o(e,"signRequest");function r(i,a){let c=i.headers.get(a);return!c||a===ae.CONTENT_LENGTH&&c==="0"?"":c}o(r,"getHeaderValueToSign");function n(i){let a=[];for(let[l,u]of i.headers)l.toLowerCase().startsWith(ae.PREFIX_FOR_STORAGE)&&a.push({name:l,value:u});a.sort((l,u)=>zB(l.name.toLowerCase(),u.name.toLowerCase())),a=a.filter((l,u,d)=>!(u>0&&l.name.toLowerCase()===d[u-1].name.toLowerCase()));let c="";return a.forEach(l=>{c+=`${l.name.toLowerCase().trimRight()}:${l.value.trimLeft()}
|
||||
`}),c}o(n,"getCanonicalizedHeadersString");function s(i){let a=GB(i.url)||"/",c="";c+=`/${t.accountName}${a}`;let l=HB(i.url),u={};if(l){let d=[];for(let A in l)if(Object.prototype.hasOwnProperty.call(l,A)){let p=A.toLowerCase();u[p]=l[A],d.push(p)}d.sort();for(let A of d)c+=`
|
||||
${A}:${decodeURIComponent(u[A])}`}return c}return o(s,"getCanonicalizedResourceString"),{name:bMe,async sendRequest(i,a){return e(i),a(i)}}}o(dk,"storageSharedKeyCredentialPolicy");var wMe="storageRequestFailureDetailsParserPolicy";function hZ(){return{name:wMe,async sendRequest(t,e){try{return await e(t)}catch(r){throw typeof r=="object"&&r!==null&&r.response&&r.response.parsedBody&&r.response.parsedBody.code==="InvalidHeaderValue"&&r.response.parsedBody.HeaderName==="x-ms-version"&&(r.message=`The provided service version is not enabled on this storage account. Please see https://learn.microsoft.com/rest/api/storageservices/versioning-for-the-azure-storage-services for additional information.
|
||||
`),r}}}}o(hZ,"storageRequestFailureDetailsParserPolicy");var mZ=require("node:crypto");var JB=class{static{o(this,"UserDelegationKeyCredential")}accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,mZ.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var $B="12.31.0",YB="2026-02-06";var WB="https://storage.azure.com/.default",Ra={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var gi="",Ak="*",SMe=1*1024*1024;var NMe=4*SMe;var gZ="AES256",EZ="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",yZ=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"],CZ=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],IZ="BlobUsesCustomerSpecifiedEncryption",BZ="BlobDoesNotUseCustomerSpecifiedEncryption",bZ=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function Ta(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}o(Ta,"isPipelineLike");var Um=class{static{o(this,"Pipeline")}factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function Lt(t,e={}){t||(t=new ft);let r=new Um([],e);return r._credential=t,r}o(Lt,"newPipeline");function xMe(t){let e=[QMe,wZ,RMe,TMe,vMe,PMe,kMe];if(t.factories.length){let r=t.factories.filter(n=>!e.some(s=>s(n)));if(r.length){let n=r.some(s=>_Me(s));return{wrappedPolicies:q_(r),afterRetry:n}}}}o(xMe,"processDownlevelPipeline");function pk(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?G_(e):uk(),t._coreHttpClient=n);let s=t._corePipeline;if(!s){let i=`azsdk-js-azure-storage-blob/${$B}`,a=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${i}`:`${i}`;s=Bm({...r,loggingOptions:{additionalAllowedHeaderNames:yZ,additionalAllowedQueryParameters:CZ,logger:OB.info},userAgentOptions:{userAgentPrefix:a},serializationOptions:{stringifyXML:DB,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:ck,serializerOptions:{xml:{xmlCharKey:"#"}}}}),s.removePolicy({phase:"Retry"}),s.removePolicy({name:g_}),s.addPolicy(AZ()),s.addPolicy(pZ(r.retryOptions),{phase:"Retry"}),s.addPo
Line truncated
|
||||
`),i=e.computeHMACSHA256(s);return{sasQueryParameters:new Bi(t.version,i,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}o(x1e,"generateBlobSASQueryParameters20150405");function Q1e(t,e){if(t=wu(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:i}}o(Q1e,"generateBlobSASQueryParameters20181109");function R1e(t,e){if(t=wu(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:i}}o(R1e,"generateBlobSASQueryParameters20201206");function T1e(t,e){if(t=wu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ue(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ue(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:i}}o(T1e,"generateBlobSASQueryParametersUDK20181109");function v1e(t,e){if(t=wu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ue(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ue(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:i}}o(v1e,"generateBlobSASQueryParametersUDK20200210");function P1e(t,e){if(t=wu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ue(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ue(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:i}}o(P1e,"generateBlobSASQueryParametersUDK20201206");function _1e(t,e){if(t=wu(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let r="c",n=t.snapshotTime;t.blobName&&(r="b",t.snapshotTime?r="bs":t.versionId&&(r="bv",n=t.versionId));let s;t.permissions&&(t.blobName?s=wo.parse(t.permissions.toString()).toString():s=So.parse(t.permissions.toString()).toString());let i=[s||"",t.startsOn?Ue(t.startsOn,!1):"",t.expiresOn?Ue(t.expiresOn,!1):"",bu(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ue(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ue(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Ii(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),a=e.computeHMACSHA256(i);return{sasQueryParameters:new Bi(t.version,a,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:i}}o(_1e,"generateBlobSASQueryParametersUDK20250705");function bu(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}o(bu,"getCanonicalName");function wu(t){let e=t.version?t.version:YB;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}o(wu,"SASSignatureValuesSanityCheckAndAutofill");var Xm=class{static{o(this,"BlobLeaseClient")}_leaseId;_url;_containerOrBlobOperation;_isContainer;get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,r){let n=e.storageClientContext;this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=n.container):(this._isContainer=!1,this._containerOrBlobOperation=n.blob),r||(r=MA()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==gi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==gi||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 z.withSpan("BlobLeaseClient-acquireLease",r,async n=>K(await this._containerOrBlobOperation.acquireLease({abortSignal:r.abortSignal,duration:e,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},proposedLeaseId:this._leaseId,tracingOptions:n.tracingOptions})))}async changeLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==gi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==gi||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 z.withSpan("BlobLeaseClient-changeLease",r,async n=>{let s=K(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:r.abortSignal,modifiedAccessConditions:{...r.conditions,ifTags:r.conditions?.tagConditions},tracingOptions:n.tracingOptions}));return this._leaseId=e,s})}async releaseLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==gi||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==gi||e.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 z.withSpan("BlobLeaseClient-releaseLease",e,async r=>K(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:{...e.conditions,ifTags:e.conditions?.tagConditions},tracingOptions:r.tracingOptions})))}async renewLease(e={}){if(this._isContainer&&(e.conditions?.ifMatch&&e.conditions?.ifMatch!==gi||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==gi||e.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 ar
Line truncated
|
||||
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: 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"}};np.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Qu=class extends Error{static{o(this,"UsageError")}constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`),this.name="UsageError"}};Qu.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var cg=class extends Error{static{o(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var TFe=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},eL=class{static{o(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);S(`Sent ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let r=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))},"displayCallback");this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function xee(t,e,r){return TFe(this,void 0,void 0,function*(){var n;let s=new Ma(t),i=s.getBlockBlobClient(),a=new eL((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),c={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:a.onProgress()};try{a.startDisplayTimer(),b(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let l=yield i.uploadFile(e,c);if(l._response.status>=400)throw new Zb(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw Ve(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{a.stopDisplayTimer()}})}o(xee,"uploadCacheArchiveSDK");var Ree=w(require("buffer"),1),No=w(require("fs"),1),Tee=w(require("stream"),1),vee=w(require("util"),1);var ew=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function tw(t){return t?t>=200&&t<300:!1}o(tw,"isSuccessStatusCode");function vFe(t){return t?t>=500:!0}o(vFe,"isServerErrorStatusCode");function PFe(t){return t?[wt.BadGateway,wt.ServiceUnavailable,wt.GatewayTimeout].includes(t):!1}o(PFe,"isRetryableStatusCode");function _Fe(t){return ew(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(_Fe,"sleep");function Qee(t,e,r){return ew(this,arguments,void 0,function*(n,s,i,a=SI,c=NI,l=void 0){let u="",d=1;for(;d<=a;){let A,p,f=!1;try{A=yield s()}catch(h){l&&(A=l(h)),f=!0,u=h.message}if(A&&(p=i(A),!vFe(p)))return A;if(p&&(f=PFe(p),u=`Cache service responded with ${p}`),b(`${n} - Attempt ${d} of ${a} failed with error: ${u}`),!f){b(`${n} - Error is not retryable`);break}yield _Fe(c),d++}throw Error(`${n} failed: ${u}`)})}o(Qee,"retry");function lg(t,e){return ew(this,arguments,void 0,function*(r,n,s=SI,i=NI){return yield Qee(r,n,a=>a.statusCode,s,i,a=>{if(a instanceof Ki)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}o(lg,"retryTypedResponse");function sp(t,e){return ew(this,arguments,void 0,function*(r,n,s=SI,i=NI){return yield Qee(r,n,a=>a.message.statusCode,s,i)})}o(sp,"retryHttpClientResponse");var Ls=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})};function kFe(t,e){return Ls(this,void 0,void 0,function*(){yield vee.promisify(Tee.pipeline)(t.message,e)})}o(kFe,"pipeResponseToStream");var rw=class{static{o(this,"DownloadProgress")}constructor(e){this.contentLength=e,this.segmentIndex=0,this.segmentSize=0,this.segmentOffset=0,this.receivedBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}nextSegment(e){this.segmentOffset=this.segmentOffset+this.segmentSize,this.segmentIndex=this.segmentIndex+1,this.segmentSize=e,this.receivedBytes=0,b(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){th
Line truncated
|
||||
Other caches with similar key:`);for(let c of i?.artifactCaches||[])b(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}o(qFe,"printCachesListForDiagnostics");function sL(t,e,r){return Nn(this,void 0,void 0,function*(){let n=new qee.URL(t),s=Dee(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield _ee(t,e,s):s.concurrentBlobDownloads?yield Pee(t,e,s):yield nw(t,e):yield nw(t,e)})}o(sL,"downloadCache");function Hee(t,e,r){return Nn(this,void 0,void 0,function*(){let n=nL(),s=QA(e,r?.compressionMethod,r?.enableCrossOsArchive),i={key:t,version:s,cacheSize:r?.cacheSize};return yield lg("reserveCache",()=>Nn(this,void 0,void 0,function*(){return n.postJson(dg("caches"),i)}))})}o(Hee,"reserveCache");function Uee(t,e){return`bytes ${t}-${e}/*`}o(Uee,"getContentRange");function GFe(t,e,r,n,s){return Nn(this,void 0,void 0,function*(){b(`Uploading chunk of size ${s-n+1} bytes at offset ${n} with content range: ${Uee(n,s)}`);let i={"Content-Type":"application/octet-stream","Content-Range":Uee(n,s)},a=yield sp(`uploadChunk (start: ${n}, end: ${s})`,()=>Nn(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),i)}));if(!tw(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}o(GFe,"uploadChunk");function HFe(t,e,r,n){return Nn(this,void 0,void 0,function*(){let s=ji(r),i=dg(`caches/${e.toString()}`),a=ip.openSync(r,"r"),c=tL(n),l=TP("uploadConcurrency",c.uploadConcurrency),u=TP("uploadChunkSize",c.uploadChunkSize),d=[...new Array(l).keys()];b("Awaiting all uploads");let A=0;try{yield Promise.all(d.map(()=>Nn(this,void 0,void 0,function*(){for(;A<s;){let p=Math.min(s-A,u),f=A,h=A+p-1;A+=u,yield GFe(t,i,()=>ip.createReadStream(r,{fd:a,start:f,end:h,autoClose:!1}).on("error",g=>{throw new Error(`Cache upload failed because file read failed with ${g.message}`)}),f,h)}})))}finally{ip.closeSync(a)}})}o(HFe,"uploadFile");function VFe(t,e,r){return Nn(this,void 0,void 0,function*(){let n={size:r};return yield lg("commitCache",()=>Nn(this,void 0,void 0,function*(){return t.postJson(dg(`caches/${e.toString()}`),n)}))})}o(VFe,"commitCache");function iL(t,e,r,n){return Nn(this,void 0,void 0,function*(){if(tL(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield xee(r,e,n)}else{let i=nL();b("Upload cache"),yield HFe(i,t,e,n),b("Commiting cache");let a=ji(e);S(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield VFe(i,t,a);if(!tw(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);S("Cache saved successfully")}})}o(iL,"saveCache");var Mte=w(Tte(),1),qt=w(Ut(),1),cs=w(Ut(),1),_u=w(Ut(),1),ku=w(Ut(),1),Du=w(Ut(),1);var ZL=w(Ut(),1),e1=w(Ut(),1),kte=w(Ut(),1),Dte=w(Ut(),1),Ote=w(Ut(),1);var jL=w(Ut(),1),KL=w(Ut(),1),vte=w(Ut(),1),Pte=w(Ut(),1),_te=w(Ut(),1);var XL=class extends _te.MessageType{static{o(this,"CacheScope$Type")}constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,Pte.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,vte.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let i=s??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:i.scope=e.string();break;case 2:i.permission=e.int64().toString();break;default:let u=n.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${l}) for ${this.typeName}`);let d=e.skip(l);u!==!1&&(u===!0?KL.UnknownFieldHandler.onRead:u)(this.typeName,i,c,l,d)}}return i}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,jL.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,jL.WireType.Varint).int64(e.permission);let s=n.writeUnknownFields;return s!==!1&&(s==!0?KL.UnknownFieldHandler.onWrite:s)(this.typeName,e,r),r}},Vw=new XL;var t1=class extends Ote.MessageType{static{o(this,"CacheMetadata$Type")}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:o(()=>Vw,"T")}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,Dte.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,kte.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let i=s??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:i.repositoryId=e.int64().toString();break;case 2:i.scope.push(Vw.internalBinaryRead(e,e.uint32(),n));break;default:let u=n.readUnknownField;if(u==="throw")throw new globalThis.Error(`Unknown field ${c} (wire type ${l}) for ${this.typeName}`);let d=e.skip(l);u!==!1&&(u===!0?e1.UnknownFieldHandler.onRead:u)(this.typeName,i,c,l,d)}}return i}internalBinaryWrite(e,r,n){e.repositoryId!==
Line truncated
|
||||
`));let n=yield m1(r,"create");yield g1(n,t)})}o(y1,"createTar");var Bp=function(t,e,r,n){function s(i){return i instanceof r?i:new r(function(a){a(i)})}return o(s,"adopt"),new(r||(r=Promise))(function(i,a){function c(d){try{u(n.next(d))}catch(A){a(A)}}o(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(A){a(A)}}o(l,"rejected");function u(d){d.done?i(d.value):s(d.value).then(c,l)}o(u,"step"),u((n=n.apply(t,e||[])).next())})},Si=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Ou=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},C1="cache write denied:",Ip=class t extends Ou{static{o(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},Yw=class t extends Error{static{o(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function qte(t){if(!t||t.length===0)throw new Si("Path Validation Error: At least one directory or file path is required")}o(qte,"checkPaths");function I1(t){if(t.length>512)throw new Si(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new Si(`Key Validation Error: ${t} cannot contain commas.`)}o(I1,"checkKey");function B1(){return ug()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}o(B1,"isFeatureAvailable");function Gte(t,e,r,n){return Bp(this,arguments,void 0,function*(s,i,a,c,l=!1){let u=ug();return b(`Cache service version: ${u}`),qte(s),u==="v2"?yield iqe(s,i,a,c,l):yield sqe(s,i,a,c,l)})}o(Gte,"restoreCache");function sqe(t,e,r,n){return Bp(this,arguments,void 0,function*(s,i,a,c,l=!1){a=a||[];let u=[i,...a];if(b("Resolved Keys:"),b(JSON.stringify(u)),u.length>10)throw new Si("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of u)I1(p);let d=yield lm(),A="";try{let p=yield Gee(u,s,{compressionMethod:d,enableCrossOsArchive:l});if(!p?.archiveLocation)return;if(c?.lookupOnly)return S("Lookup only - skipping download"),p.cacheKey;A=xg.join(yield am(),vc(d)),b(`Archive Path: ${A}`),yield sL(p.archiveLocation,A,c),ya()&&(yield Ng(A,d));let f=ji(A);return S(`Cache Size: ~${Math.round(f/(1024*1024))} MB (${f} B)`),yield E1(A,d),S("Cache restored successfully"),p.cacheKey}catch(p){let f=p;if(f.name===Si.name)throw p;f instanceof Ki&&typeof f.statusCode=="number"&&f.statusCode>=500?mA(`Failed to restore: ${p.message}`):Ve(`Failed to restore: ${p.message}`)}finally{try{yield cm(A)}catch(p){b(`Failed to delete archive: ${p}`)}}})}o(sqe,"restoreCacheV1");function iqe(t,e,r,n){return Bp(this,arguments,void 0,function*(s,i,a,c,l=!1){c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let u=[i,...a];if(b("Resolved Keys:"),b(JSON.stringify(u)),u.length>10)throw new Si("Key Validation Error: Keys are limited to a maximum of 10.");for(let A of u)I1(A);let d="";try{let A=h1(),p=yield lm(),f={key:i,restoreKeys:a,version:QA(s,p,l)},h=yield A.GetCacheEntryDownloadURL(f);if(!h.ok){b(`Cache not found for version ${f.version} of keys: ${u.join(", ")}`);return}if(f.key!==h.matchedKey?S(`Cache hit for restore-key: ${h.matchedKey}`):S(`Cache hit for: ${h.matchedKey}`),c?.lookupOnly)return S("Lookup only - skipping download"),h.matchedKey;d=xg.join(yield am(),vc(p)),b(`Archive path: ${d}`),b(`Starting download of archive to: ${d}`),yield sL(h.signedDownloadUrl,d,c);let y=ji(d);return S(`Cache Size: ~${Math.round(y/(1024*1024))} MB (${y} B)`),ya()&&(yield Ng(d,p)),yield E1(d,p),S("Cache restored successfully"),h.matchedKey}catch(A){let p=A;if(p.name===Si.name)throw A;p instanceof Ki&&typeof p.statusCode=="number"&&p.statusCode>=500?mA(`Failed to restore: ${A.message}`):Ve(`Failed to restore: ${A.message}`)}finally{try{d&&(yield cm(d))}catch(A){b(`Failed to delete archive: ${A}`)}}})}o(iqe,"restoreCacheV2");function b1(t,e,r){return Bp(this,arguments,void 0,function*(n,s,i,a=!1){let c=ug();return b(`Cache service version: ${c}`),qte(n),I1(s),c==="v2"?yield aqe(n,s,i,a):yield oqe(n,s,i,a)})}o(b1,"saveCache");function oqe(t,e,r){return Bp(this,arguments,void 0,function*(n,s,i,a=!1){var c,l,u,d,A,p;let f=yield lm(),h=-1,g=yield RP(n);if(b("Cache Paths:"),b(`${JSON.stringify(g)}`),g.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 y=yield am(),E=xg.join(y,vc(f));b(`Archive Path: ${E}`);try{yield y1(y,g,f),ya()&&(yield Ng(E,f));let C=10*1024*1024*1024,I=ji(E);if(b(`File Size: ${I}`),I>C&&!rL())throw new Error(`Cache size of ~${Math.round(I/(1024*1024))} MB (${I} B) is over the 10GB limit, not saving cache.`);b("Reserving Cache");let B=yield Hee(s,n,{compressionMethod:f,enableCrossOsArchive:a,cacheSize:I});if(!((c=B?.result)===null||c===void 0)&&c.cacheId)h=(l=B?.result)=
Line truncated
|
||||
`,a).length:A,u?(c===null?0:c.length)+l.length:0,u?l.length+A:0);return p<f},"__needMoreData"),parse:o(function(n,s,i,a){let{bom:c,comment_no_infix:l,delimiter_auto:u,encoding:d,from_line:A,ltrim:p,max_record_size:f,raw:h,relax_quotes:g,rtrim:y,skip_empty_lines:E,to:C,to_line:I}=this.options,{comment:B,escape:N,quote:Q,record_delimiter:D}=this.options,{bomSkipped:ue,delimiterDiscovered:xe,delimiterBufPrevious:ke,rawBuffer:qe,escapeIsQuote:Ce}=this.state;if(!xe&&u){let Ge;if(ke===void 0?Ge=n:ke!==void 0&&n===void 0?Ge=ke:Ge=Buffer.concat([ke,n]),n=void 0,s||Ge.length>u.size)this.options.delimiter=[Buffer.from(Wie(Ge,this.options.delimiter_auto))],this.state.previousBuf=Ge,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=Ge;return}}let{previousBuf:Ze}=this.state,de;if(Ze===void 0)if(n===void 0){a();return}else de=n;else Ze!==void 0&&n===void 0?de=Ze:de=Buffer.concat([Ze,n]);if(ue===!1)if(c===!1)this.state.bomSkipped=!0;else if(de.length<3){if(s===!1){this.state.previousBuf=de;return}}else{for(let Ge in Lp)if(Lp[Ge].compare(de,0,Lp[Ge].length)===0){let Pi=Lp[Ge].length;this.state.bufBytesStart+=Pi,de=de.slice(Pi);let tc=Mp({...this.original_options,encoding:Ge});for(let Bt in tc)this.options[Bt]=tc[Bt];({comment:B,escape:N,quote:Q}=this.options);break}this.state.bomSkipped=!0}let Lr=de.length,J;for(J=0;J<Lr&&!this.__needMoreData(J,Lr,s);J++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),I!==-1&&this.info.lines>I){this.state.stop=!0,a();return}this.state.quoting===!1&&D.length===0&&this.__autoDiscoverRecordDelimiter(de,J)&&(D=this.options.record_delimiter);let Ge=de[J];if(h===!0&&qe.append(Ge),(Ge===R$e||Ge===T$e)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(N!==null&&this.state.quoting===!0&&this.__isEscape(de,J,Ge)&&J+N.length<Lr)if(Ce){if(this.__isQuote(de,J+N.length)){this.state.escaping=!0,J+=N.length-1;continue}}else{this.state.escaping=!0,J+=N.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(de,J))if(this.state.quoting===!0){let Bt=de[J+Q.length],_i=y&&this.__isCharTrimable(de,J+Q.length),Mn=B!==null&&this.__compareBytes(B,de,J+Q.length,Bt),El=this.__isDelimiter(de,J+Q.length,Bt),_E=D.length===0?this.__autoDiscoverRecordDelimiter(de,J+Q.length):this.__isRecordDelimiter(Bt,de,J+Q.length);if(N!==null&&this.__isEscape(de,J,Ge)&&this.__isQuote(de,J+N.length))J+=N.length-1;else if(!Bt||El||_E||Mn||_i){this.state.quoting=!1,this.state.wasQuoting=!0,J+=Q.length-1;continue}else if(g===!1){let rG=this.__error(new be("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(Bt)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(rG!==void 0)return rG}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(Q),J+=Q.length-1}else if(this.state.field.length!==0){if(g===!1){let Bt=this.__infoField(),_i=Object.keys(Lp).map(El=>Lp[El].equals(this.state.field.toString())?El:!1).filter(Boolean)[0],Mn=this.__error(new be("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(Bt.column)} at line ${Bt.lines}, value is ${JSON.stringify(this.state.field.toString(d))}`,_i?`(${_i} bom)`:void 0],this.options,Bt,{field:this.state.field}));if(Mn!==void 0)return Mn}}else{this.state.quoting=!0,J+=Q.length-1;continue}if(this.state.quoting===!1){let Bt=this.__isRecordDelimiter(Ge,de,J);if(Bt!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=A){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),J+=Bt-1;continue}if(E===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,J+=Bt-1;continue}this.info.bytes=this.state.bufBytesStart+J;let El=this.__onField();if(El!==void 0)return El;this.info.bytes=this.state.bufBytesStart+J+Bt;let _E=this.__onRecord(i);if(_E!==void 0)return _E;if(C!==-1&&this.info.records>=C){this.state.stop=!0,a();return}}this.state.commenting=!1,J+=Bt-1;continue}if(this.state.commenting)continue;if(B!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(B,de,J,Ge)!==0){this.state.commenting=!0;continue}let _i=this.__isDelimiter(de,J,Ge);if(_i!==0){this.info.bytes=this.state.bufBytesStart+J;let Mn=this.__onField();if(Mn!==void 0)return Mn;J+=_i-1;continue}}}if(this.state.commenting===!1&&f!==0&&this.state.record_length+this.state.field.length>f)return this.__error(new be("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${f}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let Pi=p===!1||th
Line truncated
|
||||
`,i),Buffer.from(`
|
||||
`,i),Buffer.from("\r",i)];e:for(let c=0;c<a.length;c++){let l=a[c].length;for(let u=0;u<l;u++)if(a[c][u]!==n[s+u])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:o(function(n){let{encoding:s,raw:i,skip_records_with_error:a}=this.options,c=typeof n=="string"?new Error(n):n;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(c,i?this.state.rawBuffer.toString(s):void 0)}catch(l){return l}return}else return c},"__error"),__infoDataSet:o(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:o(function(){let{columns:n,raw:s,encoding:i}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:s?this.state.rawBuffer.toString(i):void 0}},"__infoRecord"),__infoField:o(function(){let{columns:n}=this.options,s=Array.isArray(n),i=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:i,column:s===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var ps=o(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=Y0(e),s=o(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),i=o(()=>{},"close"),a=n.parse(t,!0,s,i);if(a!==void 0)throw a;return r},"parse");var Me=class t{static{o(this,"Util")}static getInputList(e,r){return this.getList(Rr(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let n=[];if(e=="")return n;let s=ps(e,{columns:!1,relaxQuotes:!0,comment:r?.comment,comment_no_infix:r?.commentNoInfix,relaxColumnCount:!0,skipEmptyLines:!0,quote:r?.quote});for(let i of s)i.length==1?r?.ignoreComma?n.push(i[0]):n.push(...i[0].split(",")):r?.ignoreComma?n.push(i.join(",")):n.push(...i);return n.filter(i=>i).map(i=>r?.trimWhitespace===!1?i:i.trim())}static getInputNumber(e){let r=Rr(e);if(r)return parseInt(r)}static async asyncForEach(e,r){for(let n=0;n<e.length;n++)await r(e[n],n,e)}static isValidURL(e){let r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}static isValidRef(e){if(t.isValidURL(e))return!0;for(let r of["git://","github.com/","git@"])if(e.startsWith(r))return!0;return!1}static async powershellCommand(e,r){let n=await yr("powershell",!0),s=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=[];if(r)for(let a in r)i.push(`-${a} '${r[a].replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`);return{command:`"${n}"`,args:["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${s}' ${i.join(" ")}`]}}static isDirectory(e){try{return Wie.default.lstatSync(e).isDirectory()}catch{}return!1}static trimPrefix(e,r){return!e||!r||e.indexOf(r)!==0?e:e.substring(r.length)}static trimSuffix(e,r){if(!e||!r)return e;let n=e.lastIndexOf(r);return n===-1||n+r.length!==e.length?e:e.substring(0,n)}static sleep(e){return new Promise(r=>setTimeout(r,e*1e3))}static hash(e){return VF.default.createHash("sha256").update(e).digest("hex")}static parseBool(e){if(e===void 0)return!1;switch(e){case"1":case"t":case"T":case"true":case"TRUE":case"True":return!0;case"0":case"f":case"F":case"false":case"FALSE":case"False":return!1;default:throw new Error(`parseBool syntax error: ${e}`)}}static parseBoolOrDefault(e,r=!1){try{return this.parseBool(e)}catch{return r}}static formatFileSize(e){if(e===0)return"0 Bytes";let r=1024,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,s)).toFixed(2))+" "+n[s]}static generateRandomString(e=10){return VF.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,n){return jie.default.compile(e,r)(n)}static stringToUnicodeEntities(e){return Array.from(e).map(r=>`&#x${r.charCodeAt(0).toString(16)};`).join("")}static countLines(e){return e.split(/\r\n|\r|\n/).length}static isPathRelativeTo(e,r){let n=$g.default.resolve(e);return $g.default.resolve(r).startsWith(n.endsWith($g.default.sep)?n:`${n}${$g.default.sep}`)}static formatDuration(e){if(e===0)return"0s";let r=Math.floor(e/1e9),n=Math.floor(r/3600),s=Math.floor(r%3600/60),i=r%60,a=[];return n&&a.push(`${n}h`),s&&a.push(`${s}m`),(i||a.length===0)&&a.push(`${i}s`),a.join("")}};var ut=class t{static{o(this,"Docker")}static get configDir(){return process.env.DOCKER_CONFIG||Yg.default.join(Kie.default.homedir(),".docker")}static configFile(){let e=Yg.default.join(t.configDir,"config.json");if(zF.default.existsSync(e))return JSON.parse(zF.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await yr("docker",!0).then(e=>(b(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(b(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0}ca
Line truncated
|
||||
`,i),Buffer.from("\r",i)];e:for(let c=0;c<a.length;c++){let l=a[c].length;for(let u=0;u<l;u++)if(a[c][u]!==n[s+u])continue e;return this.options.record_delimiter.push(a[c]),this.state.recordDelimiterMaxLength=a[c].length,a[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:o(function(n){let{encoding:s,raw:i,skip_records_with_error:a}=this.options,c=typeof n=="string"?new Error(n):n;if(a){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(c,i?this.state.rawBuffer.toString(s):void 0)}catch(l){return l}return}else return c},"__error"),__infoDataSet:o(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:o(function(){let{columns:n,raw:s,encoding:i}=this.options;return{...this.__infoDataSet(),bytes_records:this.info.bytes,error:this.state.error,header:n===!0,index:this.state.record.length,raw:s?this.state.rawBuffer.toString(i):void 0}},"__infoRecord"),__infoField:o(function(){let{columns:n}=this.options,s=Array.isArray(n),i=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:i,column:s===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var ps=o(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=W0(e),s=o(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),i=o(()=>{},"close"),a=n.parse(t,!0,s,i);if(a!==void 0)throw a;return r},"parse");var Me=class t{static{o(this,"Util")}static getInputList(e,r){return this.getList(Rr(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let n=[];if(e=="")return n;let s=ps(e,{columns:!1,relaxQuotes:!0,comment:r?.comment,comment_no_infix:r?.commentNoInfix,relaxColumnCount:!0,skipEmptyLines:!0,quote:r?.quote});for(let i of s)i.length==1?r?.ignoreComma?n.push(i[0]):n.push(...i[0].split(",")):r?.ignoreComma?n.push(i.join(",")):n.push(...i);return n.filter(i=>i).map(i=>r?.trimWhitespace===!1?i:i.trim())}static getInputNumber(e){let r=Rr(e);if(r)return parseInt(r)}static async asyncForEach(e,r){for(let n=0;n<e.length;n++)await r(e[n],n,e)}static isValidURL(e){let r;try{r=new URL(e)}catch{return!1}return r.protocol==="http:"||r.protocol==="https:"}static isValidRef(e){if(t.isValidURL(e))return!0;for(let r of["git://","github.com/","git@"])if(e.startsWith(r))return!0;return!1}static async powershellCommand(e,r){let n=await yr("powershell",!0),s=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),i=[];if(r)for(let a in r)i.push(`-${a} '${r[a].replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`);return{command:`"${n}"`,args:["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${s}' ${i.join(" ")}`]}}static isDirectory(e){try{return Kie.default.lstatSync(e).isDirectory()}catch{}return!1}static trimPrefix(e,r){return!e||!r||e.indexOf(r)!==0?e:e.substring(r.length)}static trimSuffix(e,r){if(!e||!r)return e;let n=e.lastIndexOf(r);return n===-1||n+r.length!==e.length?e:e.substring(0,n)}static sleep(e){return new Promise(r=>setTimeout(r,e*1e3))}static hash(e){return JF.default.createHash("sha256").update(e).digest("hex")}static parseBool(e){if(e===void 0)return!1;switch(e){case"1":case"t":case"T":case"true":case"TRUE":case"True":return!0;case"0":case"f":case"F":case"false":case"FALSE":case"False":return!1;default:throw new Error(`parseBool syntax error: ${e}`)}}static parseBoolOrDefault(e,r=!1){try{return this.parseBool(e)}catch{return r}}static formatFileSize(e){if(e===0)return"0 Bytes";let r=1024,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(r));return parseFloat((e/Math.pow(r,s)).toFixed(2))+" "+n[s]}static generateRandomString(e=10){return JF.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,n){return Xie.default.compile(e,r)(n)}static stringToUnicodeEntities(e){return Array.from(e).map(r=>`&#x${r.charCodeAt(0).toString(16)};`).join("")}static countLines(e){return e.split(/\r\n|\r|\n/).length}static isPathRelativeTo(e,r){let n=Yg.default.resolve(e);return Yg.default.resolve(r).startsWith(n.endsWith(Yg.default.sep)?n:`${n}${Yg.default.sep}`)}static formatDuration(e){if(e===0)return"0s";let r=Math.floor(e/1e9),n=Math.floor(r/3600),s=Math.floor(r%3600/60),i=r%60,a=[];return n&&a.push(`${n}h`),s&&a.push(`${s}m`),(i||a.length===0)&&a.push(`${i}s`),a.join("")}};var ut=class t{static{o(this,"Docker")}static get configDir(){return process.env.DOCKER_CONFIG||Wg.default.join(Zie.default.homedir(),".docker")}static configFile(){let e=Wg.default.join(t.configDir,"config.json");if($F.default.existsSync(e))return JSON.parse($F.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await yr("docker",!0).then(e=>(b(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(b(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0}ca
Line truncated
|
||||
`+t.errors.map(e=>` - ${e.message}`).join(`
|
||||
`)}o(yYe,"_buildMessageForResponseErrors");var CYe=class extends Error{static{o(this,"GraphqlResponseError")}constructor(t,e,r){super(yYe(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},IYe=["method","baseUrl","url","headers","request","query","mediaType","operationName"],BYe=["query","method","url"],Doe=/\/api\/v3\/?$/;function bYe(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(BYe.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,s=Object.keys(n).reduce((a,c)=>IYe.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),i=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return Doe.test(i)&&(s.url=i.replace(Doe,"/api/graphql")),t(s).then(a=>{if(a.data.errors){let c={};for(let l of Object.keys(a.headers))c[l]=a.headers[l];throw new CYe(s,c,a.data)}return a.data.data})}o(bYe,"graphql");function rU(t,e){let r=t.defaults(e);return Object.assign(o((s,i)=>bYe(r,s,i),"newApi"),{defaults:rU.bind(null,r),endpoint:r.endpoint})}o(rU,"withDefaults");var pPt=rU(Xg,{headers:{"user-agent":`octokit-graphql.js/${EYe} ${Xc()}`},method:"POST",url:"/graphql"});function Ooe(t){return rU(t,{method:"POST",url:"/graphql"})}o(Ooe,"withCustomRequest");var nU="(?:[a-zA-Z0-9_-]+)",Moe="\\.",Loe=new RegExp(`^${nU}${Moe}${nU}${Moe}${nU}$`),wYe=Loe.test.bind(Loe);async function SYe(t){let e=wYe(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}o(SYe,"auth");function NYe(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}o(NYe,"withAuthorizationPrefix");async function xYe(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=NYe(t),e(s)}o(xYe,"hook");var Foe=o(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(SYe.bind(null,e),{hook:xYe.bind(null,e)})},"createTokenAuth2");var sU="7.0.6";var Uoe=o(()=>{},"noop"),QYe=console.warn.bind(console),RYe=console.error.bind(console);function TYe(t={}){return typeof t.debug!="function"&&(t.debug=Uoe),typeof t.info!="function"&&(t.info=Uoe),typeof t.warn!="function"&&(t.warn=QYe),typeof t.error!="function"&&(t.error=RYe),t}o(TYe,"createLogger");var qoe=`octokit-core.js/${sU} ${Xc()}`,oS=class{static{o(this,"Octokit")}static VERSION=sU;static defaults(e){return class extends this{static{o(this,"OctokitWithDefaults")}constructor(...n){let s=n[0]||{};if(typeof e=="function"){super(e(s));return}super(Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{o(this,"NewOctokit")}static plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new foe.Collection,n={baseUrl:Xg.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${qoe}`:qoe,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=Xg.defaults(n),this.graphql=Ooe(this.request).defaults(n),this.log=TYe(e.log),this.hook=r,e.authStrategy){let{authStrategy:i,...a}=e,c=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},e.auth));r.wrap("request",c.hook),this.auth=c}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let i=Foe(e.auth);r.wrap("request",i.hook),this.auth=i}let s=this.constructor;for(let i=0;i<s.plugins.length;++i)Object.assign(this,s.plugins[i](this,e))}request;graphql;log;hook;auth};var iU="17.0.0";var vYe={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addRepoAccessToSelfHostedRunnerGroupInOrg:["PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createEnvironmentVariable:["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"
Line truncated
|
||||
`)}o(BYe,"_buildMessageForResponseErrors");var bYe=class extends Error{static{o(this,"GraphqlResponseError")}constructor(t,e,r){super(BYe(r)),this.request=t,this.headers=e,this.response=r,this.errors=r.errors,this.data=r.data,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}name="GraphqlResponseError";errors;data},wYe=["method","baseUrl","url","headers","request","query","mediaType","operationName"],SYe=["query","method","url"],Moe=/\/api\/v3\/?$/;function NYe(t,e,r){if(r){if(typeof e=="string"&&"query"in r)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(let a in r)if(SYe.includes(a))return Promise.reject(new Error(`[@octokit/graphql] "${a}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,s=Object.keys(n).reduce((a,c)=>wYe.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),i=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return Moe.test(i)&&(s.url=i.replace(Moe,"/api/graphql")),t(s).then(a=>{if(a.data.errors){let c={};for(let l of Object.keys(a.headers))c[l]=a.headers[l];throw new bYe(s,c,a.data)}return a.data.data})}o(NYe,"graphql");function sU(t,e){let r=t.defaults(e);return Object.assign(o((s,i)=>NYe(r,s,i),"newApi"),{defaults:sU.bind(null,r),endpoint:r.endpoint})}o(sU,"withDefaults");var mPt=sU(Zg,{headers:{"user-agent":`octokit-graphql.js/${IYe} ${Xc()}`},method:"POST",url:"/graphql"});function Loe(t){return sU(t,{method:"POST",url:"/graphql"})}o(Loe,"withCustomRequest");var iU="(?:[a-zA-Z0-9_-]+)",Foe="\\.",Uoe=new RegExp(`^${iU}${Foe}${iU}${Foe}${iU}$`),xYe=Uoe.test.bind(Uoe);async function QYe(t){let e=xYe(t),r=t.startsWith("v1.")||t.startsWith("ghs_"),n=t.startsWith("ghu_");return{type:"token",token:t,tokenType:e?"app":r?"installation":n?"user-to-server":"oauth"}}o(QYe,"auth");function RYe(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}o(RYe,"withAuthorizationPrefix");async function TYe(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=RYe(t),e(s)}o(TYe,"hook");var qoe=o(function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(QYe.bind(null,e),{hook:TYe.bind(null,e)})},"createTokenAuth2");var oU="7.0.6";var Goe=o(()=>{},"noop"),vYe=console.warn.bind(console),PYe=console.error.bind(console);function _Ye(t={}){return typeof t.debug!="function"&&(t.debug=Goe),typeof t.info!="function"&&(t.info=Goe),typeof t.warn!="function"&&(t.warn=vYe),typeof t.error!="function"&&(t.error=PYe),t}o(_Ye,"createLogger");var Hoe=`octokit-core.js/${oU} ${Xc()}`,aS=class{static{o(this,"Octokit")}static VERSION=oU;static defaults(e){return class extends this{static{o(this,"OctokitWithDefaults")}constructor(...n){let s=n[0]||{};if(typeof e=="function"){super(e(s));return}super(Object.assign({},e,s,s.userAgent&&e.userAgent?{userAgent:`${s.userAgent} ${e.userAgent}`}:null))}}}static plugins=[];static plugin(...e){let r=this.plugins;return class extends this{static{o(this,"NewOctokit")}static plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new moe.Collection,n={baseUrl:Zg.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:r.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=e.userAgent?`${e.userAgent} ${Hoe}`:Hoe,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=Zg.defaults(n),this.graphql=Loe(this.request).defaults(n),this.log=_Ye(e.log),this.hook=r,e.authStrategy){let{authStrategy:i,...a}=e,c=i(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:a},e.auth));r.wrap("request",c.hook),this.auth=c}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let i=qoe(e.auth);r.wrap("request",i.hook),this.auth=i}let s=this.constructor;for(let i=0;i<s.plugins.length;++i)Object.assign(this,s.plugins[i](this,e))}request;graphql;log;hook;auth};var aU="17.0.0";var kYe={actions:{addCustomLabelsToSelfHostedRunnerForOrg:["POST /orgs/{org}/actions/runners/{runner_id}/labels"],addCustomLabelsToSelfHostedRunnerForRepo:["POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels"],addRepoAccessToSelfHostedRunnerGroupInOrg:["PUT /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}"],addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],addSelectedRepoToOrgVariable:["PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}"],approveWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createEnvironmentVariable:["POST /repos/{owner}/{repo}/environments/{environment_name}/variables"
Line truncated
|
||||
More info: ${l.url}`);let f=l.range&&l.range.length>0?l.range[0]?.start.line:void 0,h=!1;for(let g of a)if(g.remote||g.path.endsWith(u)&&g.content===d){c.push({title:A,message:p,file:g.path,startLine:f}),h=!0;break}h||b(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${u}: ${A}`)}return c}};var el=class t{static{o(this,"Builder")}buildx;constructor(e){this.buildx=e?.buildx||new _e}async exists(e){let r=await this.buildx.getCommand(["inspect",e]),n=await Y.getExecOutput(r.command,r.args,{ignoreReturnCode:!0,silent:!0}).then(s=>s.stderr.length>0&&s.exitCode!=0?(b(`Builder.exists cmd err: ${s.stderr.trim()}`),!1):s.exitCode==0).catch(s=>(b(`Builder.exists error: ${s}`),!1));return b(`Builder.exists: ${n}`),n}async inspect(e){let r=Object.assign({},process.env,{DEBUG:"1"}),n=["inspect"];e&&n.push(e);let s=await this.buildx.getCommand(n);return await Y.getExecOutput(s.command,s.args,{ignoreReturnCode:!0,silent:!0,env:r}).then(i=>{if(i.stderr.length>0&&i.exitCode!=0)throw new Error(i.stderr.trim());return t.parseInspect(i.stdout)})}static parseInspect(e){let r={nodes:[]},n,s={},i,a,c;for(let l of e.trim().split(`
|
||||
`)){let[u,...d]=l.split(":"),A=u.toLowerCase(),p=d.map(f=>f.trim()).join(":");if(u.length!=0)switch(!0){case A=="name":n=void 0,r.name==null?r.name=p:(i&&s.gcPolicy&&(s.gcPolicy.push(i),i=void 0),s.name&&r.nodes.push(s),s={name:p});break;case A=="driver":n=void 0,r.driver=p;break;case A=="last activity":n=void 0,r.lastActivity=new Date(p);break;case A=="endpoint":n=void 0,s.endpoint=p;break;case A=="driver options":n=void 0,s["driver-opts"]=(p.match(/([a-zA-Z0-9_.]+)="([^"]*)"/g)||[]).map(f=>f.replace(/^(.*)="(.*)"$/g,"$1=$2"));break;case A=="status":n=void 0,s.status=p;break;case A=="buildkit daemon flags":case A=="flags":n=void 0,s["buildkitd-flags"]=p;break;case A=="buildkit version":case A=="buildkit":n=void 0,s.buildkit=p;break;case A=="platforms":{if(n=void 0,!p)break;let f=[];if(p.includes("*"))for(let h of p.split(", "))h.includes("*")&&f.push(h.replace(/\*/g,""));else f=p.split(", ");s.platforms=f.join(",");break}case A=="features":n="features",s.features={};break;case A=="labels":n="label",s.labels={};break;case A=="devices":n="devices",s.devices=s.devices||[];break;case A.startsWith("gc policy rule#"):n="gcpolicy",s.gcPolicy&&i&&(s.gcPolicy.push(i),i=void 0);break;case A.startsWith("file#"):n="file",c=u.split("#")[1],s.files=s.files||{},s.files[c]="";break;default:switch(n&&n!=="devices"&&s.devices&&a&&(s.devices.push(a),a=void 0),n||""){case"features":{s.features=s.features||{},s.features[u.trim()]=!!p;break}case"label":{s.labels=s.labels||{},s.labels[u.trim()]=p;break}case"devices":{switch(A.trim()){case"name":{s.devices&&a&&s.devices.push(a),a={},a.name=p;break}case"on-demand":{a&&p&&(a.onDemand=p=="true");break}case"automatically allowed":{a&&p&&(a.autoAllow=p=="true");break}case"annotations":{a&&(a.annotations=a.annotations||{});break}default:a&&a.annotations&&(a.annotations[u.trim()]=p)}break}case"gcpolicy":{switch(s.gcPolicy=s.gcPolicy||[],i=i||{},A.trim()){case"all":{i.all=p=="true";break}case"filters":{p&&(i.filter=p.split(","));break}case"keep duration":{i.keepDuration=p;break}case"keep bytes":{i.keepBytes=p;break}case"reserved space":{i.reservedSpace=p;break}case"max used space":{i.maxUsedSpace=p;break}case"min free space":{i.minFreeSpace=p;break}}break}case"file":{c&&s.files&&(s.files[c].length>0&&(s.files[c]+=`
|
||||
`),s.files[c]+=l.replace(/^\s>\s?/,""));break}}}}return a&&s.devices&&s.devices.push(a),i&&s.gcPolicy&&s.gcPolicy.push(i),s.name&&r.nodes.push(s),r}};var $u=w(require("fs"),1),mU=w(require("path"),1);var uS=class t{static{o(this,"Build")}buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new _e,this.iidFilename=`build-iidfile-${Me.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${Me.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),n=e?.attrs||{},s=Object.entries(n).filter(([f])=>!r.has(f)),i=Me.parseBoolOrDefault(n["fetch-by-commit"]),a=e?.ref||n.ref||on.ref;a.startsWith("refs/")?a.startsWith("refs/pull/")&&Me.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(a=a.replace(/\/merge$/g,"/head")):a=`refs/heads/${a}`;let c=`${We.serverURL}/${on.repo.owner}/${on.repo.repo}.git`,l=e?.checksum||n.checksum,u=e?.subdir||n.subdir,d=e?.format;if(!d){if(d="fragment",s.length>0)d="query";else if(Me.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(d="query")}catch{}}let A=on.sha||a;a.startsWith("refs/pull/")&&a.endsWith("/head")&&(A=typeof on.payload.pull_request?.head?.sha=="string"?on.payload.pull_request.head.sha:a);let p=l||A;if(d==="query"){let f=[`ref=${i||l?a:p}`],h=i?p:l;h&&f.push(`checksum=${h}`),u&&u!=="."&&f.push(`subdir=${u}`);for(let[g,y]of s)f.push(`${g}=${y}`);return`${c}?${f.join("&")}`}return`${c}#${p}${u&&u!=="."?`:${u}`:""}`}getImageIDFilePath(){return mU.default.join(Oe.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if($u.default.existsSync(e))return $u.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return mU.default.join(Oe.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!$u.default.existsSync(e))return;let r=$u.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,n]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${n}`}static resolveSecretFile(e){let[r,n]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${n}`}static resolveSecretEnv(e){let[r,n]=t.parseSecretKvp(e);return`id=${r},env=${n}`}static resolveSecret(e,r){let[n,s]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!$u.default.existsSync(s))throw new Error(`secret file ${s} not found`);return[n,s]}let i=Oe.tmpName({tmpdir:Oe.tmpDir()});return $u.default.writeFileSync(i,s),[n,i]}static getProvenanceInput(e){let r=Rr(e);if(!r)return r;try{return Kl(e)?`builder-id=${We.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${We.workflowRunURL(!0)}`;let r=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of r)if(n.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return e;return`${e},builder-id=${We.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let n="registry",s="",i="",a=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let c of a){let l=c.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());l[0]==="type"?n=l[1]:l[0]==="repository"?s=l[1]:l[0]==="ghtoken"&&(i=l[1])}return n==="gha"&&(s||(e=`${e},repository=${We.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExporterType("tar",e)}static hasDockerExporter(e,r){return r||t.hasExporterType("docker",e)}static hasExporterType(e,r){let n=ps(r.join(`
|
||||
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let s of n){if(s.length==1&&!s[0].startsWith("type="))return e=="local";for(let[i,a]of s.map(c=>c.split("=").map(l=>l.trim())))if(i=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let n=ps(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let s of n)for(let[i,a]of s.map(c=>c.split("=").map(l=>l.trim())))if(i=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=ps(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),n=[];for(let s of r)for(let i of s)try{let a=Me.parseBool(i);n.push(`disabled=${!a}`)}catch{n.push(i)}return n.join(",")}static hasGitAuthTokenSecret(e,r){for(let n of e){if(r&&n.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(n.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let n=e.indexOf("="),s=e.substring(0,n),i=e.substring(n+1);if(s.length==0||i.length==0)throw new Error(`${e} is not a valid secret`);return r&&Vi(i),[s,i]}};var gU=w(require("fs"),1),Koe=w(require("path"),1);var dS=class t{static{o(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new _e,this.metadataFilename=`bake-metadata-${Me.generateRandomString()}.json`}getMetadataFilePath(){return Koe.default.join(Oe.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!gU.default.existsSync(e))return;let r=gU.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let n in e)"buildx.build.ref"in e[n]&&r.push(e[n]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});let n=["bake"],s,i=[],a=[...e.files||[],e.source];if(a){for(let l of a.map(u=>u?u.trim():""))if(l.length!=0){if(!Me.isValidRef(l)){i.push(l);continue}if(s)throw new Error("Only one remote bake definition can be defined");s=l}}s&&n.push(s);for(let l of i)n.push("--file",l);if(e.overrides)for(let l of e.overrides)n.push("--set",l);if(e.vars)for(let l of e.vars)n.push("--var",l);if(e.allow)for(let l of e.allow)n.push("--allow",l);e.call&&n.push("--call",e.call),e.load&&n.push("--load"),e.noCache&&n.push("--no-cache"),e.provenance&&n.push("--provenance",e.provenance),e.push&&n.push("--push"),e.sbom&&n.push("--sbom",e.sbom);let c=await this.buildx.getCommand([...n,"--print",...e.targets||[]]);return await Y.getExecOutput(c.command,c.args,r).then(l=>{if(l.stderr.length>0&&l.exitCode!=0)throw new Error(`cannot parse bake definitions: ${l.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(l.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let n in r.target){let s=r.target[n];s.attest&&Array.isArray(s.attest)&&(s.attest=s.attest.map(i=>t.parseAttestEntry(i))),s["cache-from"]&&Array.isArray(s["cache-from"])&&(s["cache-from"]=s["cache-from"].map(i=>t.parseCacheEntry(i))),s["cache-to"]&&Array.isArray(s["cache-to"])&&(s["cache-to"]=s["cache-to"].map(i=>t.parseCacheEntry(i))),s.output&&Array.isArray(s.output)&&(s.output=s.output.map(i=>t.parseExportEntry(i))),s.secret&&Array.isArray(s.secret)&&(s.secret=s.secret.map(i=>t.parseSecretEntry(i))),s.ssh&&Array.isArray(s.ssh)&&(s.ssh=s.ssh.map(i=>t.parseSSHEntry(i)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},n=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of n){let[i,a]=s.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(i){case"type":r.type=a;break;case"disabled":r.disabled=Me.parseBool(a);break;default:r[i]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},n=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&!n[0].includes("="))return r.type="registry",r.ref=n[0],r;for(let s of n){let[i,a]=s.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());i==="type"?r.type=a:r[i]=a}return r}static parseExportEntry(e){if(typeof e!="string")return e;let r={type:""},n=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&n[0]===e&&!e.startsWith("type="))return e!=="-"?(r.type="local",r.dest=e,r):(r.type="tar",r.dest=e,r);for(let s of n){let[i,a]=s.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());i==="type"?r.type=a:r[i]=a}return r}static parseSecretEntry(e){if(typeof e!="string")return e;let r={},n=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0],s="";for(let i of n){let[a,c]=i.toString().split(/(?<=^[^=]+?)=/).map(l=>l.trim());switch(a){case"type":s=c;break;case"id":r.id=c;break;case"source":case"src":r.src=c;break;case"env":r.env=c;break}}return s==="env"&&!r.env&&(r.env=r.src,r.src=void 0),r}static parseSSHEntry(e){if(typeof e!="string")return e;let r={},[n,s]=e.split("=",2);return r.id=n,s
Line truncated
|
||||
`),s.files[c]+=l.replace(/^\s>\s?/,""));break}}}}return a&&s.devices&&s.devices.push(a),i&&s.gcPolicy&&s.gcPolicy.push(i),s.name&&r.nodes.push(s),r}};var $u=w(require("fs"),1),EU=w(require("path"),1);var dS=class t{static{o(this,"Build")}buildx;iidFilename;metadataFilename;constructor(e){this.buildx=e?.buildx||new _e,this.iidFilename=`build-iidfile-${Me.generateRandomString()}.txt`,this.metadataFilename=`build-metadata-${Me.generateRandomString()}.json`}async gitContext(e){let r=new Set(["ref","checksum","subdir"]),n=e?.attrs||{},s=Object.entries(n).filter(([f])=>!r.has(f)),i=Me.parseBoolOrDefault(n["fetch-by-commit"]),a=e?.ref||n.ref||on.ref;a.startsWith("refs/")?a.startsWith("refs/pull/")&&Me.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF)&&(a=a.replace(/\/merge$/g,"/head")):a=`refs/heads/${a}`;let c=`${je.serverURL}/${on.repo.owner}/${on.repo.repo}.git`,l=e?.checksum||n.checksum,u=e?.subdir||n.subdir,d=e?.format;if(!d){if(d="fragment",s.length>0)d="query";else if(Me.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT))try{await this.buildx.versionSatisfies(">=0.29.0")&&(d="query")}catch{}}let A=on.sha||a;a.startsWith("refs/pull/")&&a.endsWith("/head")&&(A=typeof on.payload.pull_request?.head?.sha=="string"?on.payload.pull_request.head.sha:a);let p=l||A;if(d==="query"){let f=[`ref=${i||l?a:p}`],h=i?p:l;h&&f.push(`checksum=${h}`),u&&u!=="."&&f.push(`subdir=${u}`);for(let[g,y]of s)f.push(`${g}=${y}`);return`${c}?${f.join("&")}`}return`${c}#${p}${u&&u!=="."?`:${u}`:""}`}getImageIDFilePath(){return EU.default.join(Oe.tmpDir(),this.iidFilename)}resolveImageID(){let e=this.getImageIDFilePath();if($u.default.existsSync(e))return $u.default.readFileSync(e,{encoding:"utf-8"}).trim()}getMetadataFilePath(){return EU.default.join(Oe.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!$u.default.existsSync(e))return;let r=$u.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRef(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.ref"in e)return e["buildx.build.ref"]}resolveProvenance(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.provenance"in e)return e["buildx.build.provenance"]}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}resolveDigest(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"containerimage.digest"in e)return e["containerimage.digest"]}static resolveSecretString(e){let[r,n]=t.resolveSecret(e,{redact:!0});return`id=${r},src=${n}`}static resolveSecretFile(e){let[r,n]=t.resolveSecret(e,{asFile:!0});return`id=${r},src=${n}`}static resolveSecretEnv(e){let[r,n]=t.parseSecretKvp(e);return`id=${r},env=${n}`}static resolveSecret(e,r){let[n,s]=t.parseSecretKvp(e,r?.redact);if(r?.asFile){if(!$u.default.existsSync(s))throw new Error(`secret file ${s} not found`);return[n,s]}let i=Oe.tmpName({tmpdir:Oe.tmpDir()});return $u.default.writeFileSync(i,s),[n,i]}static getProvenanceInput(e){let r=Rr(e);if(!r)return r;try{return Kl(e)?`builder-id=${je.workflowRunURL(!0)}`:"false"}catch{return t.resolveProvenanceAttrs(r)}}static resolveProvenanceAttrs(e){if(!e)return`builder-id=${je.workflowRunURL(!0)}`;let r=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let n of r)if(n.toString().split(/(?<=^[^=]+?)=/).map(i=>i.trim())[0]=="builder-id")return e;return`${e},builder-id=${je.workflowRunURL(!0)}`}static resolveCacheToAttrs(e,r){if(!e)return e;let n="registry",s="",i="",a=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let c of a){let l=c.toString().split(/(?<=^[^=]+?)=/).map(u=>u.trim());l[0]==="type"?n=l[1]:l[0]==="repository"?s=l[1]:l[0]==="ghtoken"&&(i=l[1])}return n==="gha"&&(s||(e=`${e},repository=${je.repository}`),!i&&r&&(e=`${e},ghtoken=${r}`)),e}static hasLocalExporter(e){return t.hasExporterType("local",e)}static hasTarExporter(e){return t.hasExporterType("tar",e)}static hasDockerExporter(e,r){return r||t.hasExporterType("docker",e)}static hasExporterType(e,r){let n=ps(r.join(`
|
||||
`),{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let s of n){if(s.length==1&&!s[0].startsWith("type="))return e=="local";for(let[i,a]of s.map(c=>c.split("=").map(l=>l.trim())))if(i=="type"&&a==e)return!0}return!1}static hasAttestationType(e,r){let n=ps(r,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0});for(let s of n)for(let[i,a]of s.map(c=>c.split("=").map(l=>l.trim())))if(i=="type"&&a==e)return!0;return!1}static resolveAttestationAttrs(e){let r=ps(e,{delimiter:",",trim:!0,columns:!1,relaxColumnCount:!0}),n=[];for(let s of r)for(let i of s)try{let a=Me.parseBool(i);n.push(`disabled=${!a}`)}catch{n.push(i)}return n.join(",")}static hasGitAuthTokenSecret(e,r){for(let n of e){if(r&&n.startsWith(`GIT_AUTH_TOKEN.${r}=`))return!0;if(n.startsWith("GIT_AUTH_TOKEN="))return!0}return!1}static parseSecretKvp(e,r){let n=e.indexOf("="),s=e.substring(0,n),i=e.substring(n+1);if(s.length==0||i.length==0)throw new Error(`${e} is not a valid secret`);return r&&Vi(i),[s,i]}};var yU=w(require("fs"),1),Zoe=w(require("path"),1);var AS=class t{static{o(this,"Bake")}buildx;metadataFilename;constructor(e){this.buildx=e?.buildx||new _e,this.metadataFilename=`bake-metadata-${Me.generateRandomString()}.json`}getMetadataFilePath(){return Zoe.default.join(Oe.tmpDir(),this.metadataFilename)}resolveMetadata(){let e=this.getMetadataFilePath();if(!yU.default.existsSync(e))return;let r=yU.default.readFileSync(e,{encoding:"utf-8"}).trim();if(r!=="null")return JSON.parse(r)}resolveRefs(e){if(!e&&(e=this.resolveMetadata(),!e))return;let r=new Array;for(let n in e)"buildx.build.ref"in e[n]&&r.push(e[n]["buildx.build.ref"]);return r.length>0?r:void 0}resolveWarnings(e){if(!(!e&&(e=this.resolveMetadata(),!e))&&"buildx.build.warnings"in e)return e["buildx.build.warnings"]}async getDefinition(e,r){r=r||{ignoreReturnCode:!0},r.ignoreReturnCode=!0,r.env=Object.assign({},process.env,r.env||{},e.githubToken?{BUILDX_BAKE_GIT_AUTH_TOKEN:e.githubToken}:{});let n=["bake"],s,i=[],a=[...e.files||[],e.source];if(a){for(let l of a.map(u=>u?u.trim():""))if(l.length!=0){if(!Me.isValidRef(l)){i.push(l);continue}if(s)throw new Error("Only one remote bake definition can be defined");s=l}}s&&n.push(s);for(let l of i)n.push("--file",l);if(e.overrides)for(let l of e.overrides)n.push("--set",l);if(e.vars)for(let l of e.vars)n.push("--var",l);if(e.allow)for(let l of e.allow)n.push("--allow",l);e.call&&n.push("--call",e.call),e.load&&n.push("--load"),e.noCache&&n.push("--no-cache"),e.provenance&&n.push("--provenance",e.provenance),e.push&&n.push("--push"),e.sbom&&n.push("--sbom",e.sbom);let c=await this.buildx.getCommand([...n,"--print",...e.targets||[]]);return await Y.getExecOutput(c.command,c.args,r).then(l=>{if(l.stderr.length>0&&l.exitCode!=0)throw new Error(`cannot parse bake definitions: ${l.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return t.parseDefinition(l.stdout.trim())})}static parseDefinition(e){let r=JSON.parse(e);for(let n in r.target){let s=r.target[n];s.attest&&Array.isArray(s.attest)&&(s.attest=s.attest.map(i=>t.parseAttestEntry(i))),s["cache-from"]&&Array.isArray(s["cache-from"])&&(s["cache-from"]=s["cache-from"].map(i=>t.parseCacheEntry(i))),s["cache-to"]&&Array.isArray(s["cache-to"])&&(s["cache-to"]=s["cache-to"].map(i=>t.parseCacheEntry(i))),s.output&&Array.isArray(s.output)&&(s.output=s.output.map(i=>t.parseExportEntry(i))),s.secret&&Array.isArray(s.secret)&&(s.secret=s.secret.map(i=>t.parseSecretEntry(i))),s.ssh&&Array.isArray(s.ssh)&&(s.ssh=s.ssh.map(i=>t.parseSSHEntry(i)))}return r}static parseAttestEntry(e){if(typeof e!="string")return e;let r={type:""},n=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];for(let s of n){let[i,a]=s.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());switch(i){case"type":r.type=a;break;case"disabled":r.disabled=Me.parseBool(a);break;default:r[i]=a}}return r}static parseCacheEntry(e){if(typeof e!="string")return e;let r={type:""},n=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&!n[0].includes("="))return r.type="registry",r.ref=n[0],r;for(let s of n){let[i,a]=s.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());i==="type"?r.type=a:r[i]=a}return r}static parseExportEntry(e){if(typeof e!="string")return e;let r={type:""},n=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0];if(n.length===1&&n[0]===e&&!e.startsWith("type="))return e!=="-"?(r.type="local",r.dest=e,r):(r.type="tar",r.dest=e,r);for(let s of n){let[i,a]=s.toString().split(/(?<=^[^=]+?)=/).map(c=>c.trim());i==="type"?r.type=a:r[i]=a}return r}static parseSecretEntry(e){if(typeof e!="string")return e;let r={},n=ps(e,{relaxColumnCount:!0,skipEmptyLines:!0})[0],s="";for(let i of n){let[a,c]=i.toString().split(/(?<=^[^=]+?)=/).map(l=>l.trim());switch(a){case"type":s=c;break;case"id":r.id=c;break;case"source":case"src":r.src=c;break;case"env":r.env=c;break}}return s==="env"&&!r.env&&(r.env=r.src,r.src=void 0),r}static parseSSHEntry(e){if(typeof e!="string")return e;let r={},[n,s]=e.split("=",2);return r.id=n,s
Line truncated
|
||||
`)[0])}static async isHeadDetached(){return await t.exec(["branch","--show-current"]).then(e=>e.length==0)}static async getDetachedRef(){let e=await t.exec(["show","-s","--pretty=%D"]);b(`detached HEAD ref: ${e}`);let r=e.replace(/^grafted, /,"").trim();if(r==="HEAD")return await t.inferRefFromHead();let n=r.match(/^HEAD, (.*)$/);if(!n||!n[1])throw new Error(`Cannot find detached HEAD ref in "${e}"`);let s=n[1].trim();if(s.startsWith("tag: "))return await t.findDetachedTagRef(s,e);if(s.match(/^pull\/\d+\/(head|merge)$/))return`refs/${s}`;let a=s.match(/^[^/]+\/[^/]+, (.+)$/);if(a)return`refs/heads/${a[1].trim()}`;let c=s.match(/^[^/]+\/(.+)$/);if(c)return`refs/heads/${c[1].trim()}`;throw new Error(`Unsupported detached HEAD ref in "${e}"`)}static async exec(e=[]){return await Y.getExecOutput("git",e,{ignoreReturnCode:!0,silent:!0}).then(r=>{if(r.stderr.length>0&&r.exitCode!=0)throw new Error(r.stderr);return r.stdout.trim()})}static async inferRefFromHead(){let e=await t.findContainingRef("refs/heads/");if(e)return e;let r=await t.findContainingRef("refs/remotes/");if(r){let i=r.match(/^refs\/remotes\/[^/]+\/(.+)$/);return i?`refs/heads/${i[1]}`:r}let n=await t.exec(["tag","--contains","HEAD"]),[s]=n.split(`
|
||||
`).map(i=>i.trim()).filter(i=>i.length>0);if(s)return`refs/tags/${s}`;throw new Error("Cannot infer ref from detached HEAD")}static async findDetachedTagRef(e,r){let s=(await t.exec(["for-each-ref","--format=%(refname)","--points-at","HEAD","refs/tags/"])).split(`
|
||||
`).map(i=>i.trim()).filter(i=>i.length>0).sort((i,a)=>a.length-i.length);for(let i of s){let a=`tag: ${i.slice(10)}`;if(e===a||e.startsWith(`${a}, `))return i}if(s.length===1)return s[0];throw new Error(`Cannot find detached tag ref in "${r}"`)}static async findContainingRef(e){let r=await t.exec(["for-each-ref","--format=%(refname)","--contains","HEAD","--sort=-committerdate",e]),[n]=r.split(`
|
||||
`).map(s=>s.trim()).filter(s=>s.length>0);return n}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var pue=require("crypto"),Yo=w(require("fs"),1),Wo=w(require("path"),1);var yf=w(SU(),1),fue=w(U2(),1),Cf=w(lue(),1);var Vq=w(SU(),1);var due=w(Ni(),1);var uue="application/vnd.oci.empty.v1+json";var $o=class{static{o(this,"Cosign")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await Y.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(b(`Cosign.isAvailable cmd err: ${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(b(`Cosign.isAvailable error: ${r}`),!1));return b(`Cosign.isAvailable: ${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await Y.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 Y.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return b("Cosign.versionSatisfies false: undefined version"),!1;let s=due.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return b(`Cosign.versionSatisfies ${n} statisfies ${e}: ${s}`),s}static parseCommandOutput(e){let r,n,s,i;for(let a of e.split(/\r?\n/)){let c=a.trim();if(!c.startsWith("{")||!c.endsWith("}"))continue;let l;try{l=JSON.parse(c)}catch{continue}if(l&&Array.isArray(l.errors)&&l.errors.length>0&&(i=l.errors),!r&&l&&Array.isArray(l.manifests)&&l.manifests.length>0){let u=l.manifests[0];u?.artifactType===Vq.BUNDLE_V03_MEDIA_TYPE&&typeof u.digest=="string"?r=u.digest:u?.artifactType===uue&&typeof u.digest=="string"&&(n=u.digest)}if(!s&&l&&l.mediaType===Vq.BUNDLE_V03_MEDIA_TYPE&&(s=l),s&&(r||n)){i=void 0;break}}return{bundle:s,signatureManifestDigest:r||n,errors:i}}};var zq=w(require("fs"),1);var GN=class t{static{o(this,"ImageTools")}buildx;constructor(e){this.buildx=e?.buildx||new _e}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(`No descriptor found for ${e.name}`);let n=r.manifests.filter(a=>a.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return n;let s=e.platform,i=new Map;for(let a of r.manifests)a.digest&&i.set(a.digest,a);return n.filter(a=>{let c=a.annotations?.["vnd.docker.reference.digest"];if(!c)return!1;let l=i.get(c);return l?l.platform?.os===s.os&&l.platform?.architecture===s.architecture&&(l.platform?.variant??"")===(s.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],n=Oe.tmpName({tmpdir:Oe.tmpDir(),template:"imagetools-metadata-XXXXXX"}),s=[],i=[];for(let c of e.sources){if(c.startsWith("cwd://")){let l=c.substring(6);l.length>0&&s.push(l);continue}i.push(c)}if(e.tags)for(let c of e.tags)r.push("--tag",c);if(e.platforms)for(let c of e.platforms)r.push("--platform",c);if(e.annotations)for(let c of e.annotations)r.push("--annotation",c);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",n);for(let c of s)r.push("--file",c);for(let c of i)r.push(c);let a=await this.getCreateCommand(r);if(e.skipExec){S(`[command]${a.command} ${a.args.join(" ")}`),S("Skipped create command");return}return await Y.getExecOutput(a.command,a.args,{ignoreReturnCode:!0,silent:e.silent}).then(c=>{if(c.stderr.length>0&&c.exitCode!=0)throw new Error(c.stderr.trim());if(!e.dryRun){if(!zq.default.existsSync(n))return;let l=zq.default.readFileSync(n,{encoding:"utf-8"}).trim();if(l===""||l==="null")return;let u=JSON.parse(l),d=u["containerimage.descriptor"];return d?{digest:u["containerimage.digest"]||d.digest,descriptor:d,imageNames:u["image.name"]?u["image.name"].split(",").map(A=>A.trim()):[]}:void 0}})}async inspect(e,r,n){let s=await this.getInspectCommand([e.name,"--format",r]);if(!e.retryOnManifestUnknown)return await this.execInspect(s.command,s.args,n);let i=e.retryLimit??15,a;for(let c=0;c<i;c++)try{return await this.execInspect(s.command,s.args,n)}ca
Line truncated
|
||||
${a.message}`),await new Promise(u=>setTimeout(u,Math.pow(2,c)*100))}throw a??new Error(`ImageTools inspect command failed for ${e.name}`)}async execInspect(e,r,n){return await Y.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(s=>{if(s.stderr.length>0&&s.exitCode!=0)throw new Error(s.stderr.trim());return n(JSON.parse(s.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown)/i.test(e)||/:\s*not found$/i.test(e)}};var dd="https://search.sigstore.dev";var Aue="slsaprovenance1",ml=class t{static{o(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new $o,this.imageTools=e?.imageTools||new GN}async signAttestationManifests(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign attestation manifests");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n=await this.cosignSigningConfigArgs(e.noTransparencyLog);for(let s of e.imageNames){let i=await this.imageTools.attestationDigests({name:`${s}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let a of i){let c=`${s}@${a}`;await it(`Signing attestation manifest ${c}`,async()=>{let l=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...n];S(`[command]${this.cosign.binPath} ${[...l,c].join(" ")}`);let u=await Y.getExecOutput(this.cosign.binPath,["--verbose",...l,c],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),d=$o.parseCommandOutput(u.stderr.trim());if(u.exitCode!=0)if(d.errors&&d.errors.length>0){let p=d.errors.map(f=>`- [${f.code}] ${f.message} : ${f.detail}`).join(`
|
||||
`).map(s=>s.trim()).filter(s=>s.length>0);return n}static async commitDate(e){return new Date(await t.exec(["show","-s",'--format="%ci"',e]))}};var hue=require("crypto"),Yo=w(require("fs"),1),Wo=w(require("path"),1);var Cf=w(xU(),1),mue=w(G2(),1),If=w(due(),1);var Jq=w(xU(),1);var pue=w(Ni(),1);var Aue="application/vnd.oci.empty.v1+json";var $o=class{static{o(this,"Cosign")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"cosign",this._version="",this._versionOnce=!1}async isAvailable(){let e=await Y.getExecOutput(this.binPath,[],{ignoreReturnCode:!0,silent:!0}).then(r=>r.stderr.length>0&&r.exitCode!=0?(b(`Cosign.isAvailable cmd err: ${r.stderr.trim()}`),!1):r.exitCode==0).catch(r=>(b(`Cosign.isAvailable error: ${r}`),!1));return b(`Cosign.isAvailable: ${e}`),e}async version(){return this._versionOnce?this._version:(this._versionOnce=!0,this._version=await Y.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 Y.exec(this.binPath,["version","--json"],{failOnStdErr:!1})}async versionSatisfies(e,r){let n=r??await this.version();if(!n)return b("Cosign.versionSatisfies false: undefined version"),!1;let s=pue.satisfies(n,e)||/^[0-9a-f]{7}$/.exec(n)!==null;return b(`Cosign.versionSatisfies ${n} statisfies ${e}: ${s}`),s}static parseCommandOutput(e){let r,n,s,i;for(let a of e.split(/\r?\n/)){let c=a.trim();if(!c.startsWith("{")||!c.endsWith("}"))continue;let l;try{l=JSON.parse(c)}catch{continue}if(l&&Array.isArray(l.errors)&&l.errors.length>0&&(i=l.errors),!r&&l&&Array.isArray(l.manifests)&&l.manifests.length>0){let u=l.manifests[0];u?.artifactType===Jq.BUNDLE_V03_MEDIA_TYPE&&typeof u.digest=="string"?r=u.digest:u?.artifactType===Aue&&typeof u.digest=="string"&&(n=u.digest)}if(!s&&l&&l.mediaType===Jq.BUNDLE_V03_MEDIA_TYPE&&(s=l),s&&(r||n)){i=void 0;break}}return{bundle:s,signatureManifestDigest:r||n,errors:i}}};var $q=w(require("fs"),1);var HN=class t{static{o(this,"ImageTools")}buildx;constructor(e){this.buildx=e?.buildx||new _e}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(`No descriptor found for ${e.name}`);let n=r.manifests.filter(a=>a.annotations?.["vnd.docker.reference.type"]==="attestation-manifest");if(!e.platform)return n;let s=e.platform,i=new Map;for(let a of r.manifests)a.digest&&i.set(a.digest,a);return n.filter(a=>{let c=a.annotations?.["vnd.docker.reference.digest"];if(!c)return!1;let l=i.get(c);return l?l.platform?.os===s.os&&l.platform?.architecture===s.architecture&&(l.platform?.variant??"")===(s.variant??""):!1})}async attestationDigests(e){return(await this.attestationDescriptors(e)).map(r=>r.digest)}async create(e){let r=[],n=Oe.tmpName({tmpdir:Oe.tmpDir(),template:"imagetools-metadata-XXXXXX"}),s=[],i=[];for(let c of e.sources){if(c.startsWith("cwd://")){let l=c.substring(6);l.length>0&&s.push(l);continue}i.push(c)}if(e.tags)for(let c of e.tags)r.push("--tag",c);if(e.platforms)for(let c of e.platforms)r.push("--platform",c);if(e.annotations)for(let c of e.annotations)r.push("--annotation",c);e.dryRun?r.push("--dry-run"):r.push("--metadata-file",n);for(let c of s)r.push("--file",c);for(let c of i)r.push(c);let a=await this.getCreateCommand(r);if(e.skipExec){S(`[command]${a.command} ${a.args.join(" ")}`),S("Skipped create command");return}return await Y.getExecOutput(a.command,a.args,{ignoreReturnCode:!0,silent:e.silent}).then(c=>{if(c.stderr.length>0&&c.exitCode!=0)throw new Error(c.stderr.trim());if(!e.dryRun){if(!$q.default.existsSync(n))return;let l=$q.default.readFileSync(n,{encoding:"utf-8"}).trim();if(l===""||l==="null")return;let u=JSON.parse(l),d=u["containerimage.descriptor"];return d?{digest:u["containerimage.digest"]||d.digest,descriptor:d,imageNames:u["image.name"]?u["image.name"].split(",").map(A=>A.trim()):[]}:void 0}})}async inspect(e,r,n){let s=await this.getInspectCommand([e.name,"--format",r]);if(!e.retryOnManifestUnknown)return await this.execInspect(s.command,s.args,n);let i=e.retryLimit??15,a;for(let c=0;c<i;c++)try{return await this.execInspect(s.command,s.args,n)}ca
Line truncated
|
||||
${a.message}`),await new Promise(u=>setTimeout(u,Math.pow(2,c)*100))}throw a??new Error(`ImageTools inspect command failed for ${e.name}`)}async execInspect(e,r,n){return await Y.getExecOutput(e,r,{ignoreReturnCode:!0,silent:!0}).then(s=>{if(s.stderr.length>0&&s.exitCode!=0)throw new Error(s.stderr.trim());return n(JSON.parse(s.stdout))})}static isManifestUnknownError(e){return/(MANIFEST_UNKNOWN|manifest unknown)/i.test(e)||/:\s*not found$/i.test(e)}};var dd="https://search.sigstore.dev";var fue="slsaprovenance1",ml=class t{static{o(this,"Sigstore")}cosign;imageTools;constructor(e){this.cosign=e?.cosign||new $o,this.imageTools=e?.imageTools||new HN}async signAttestationManifests(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign attestation manifests");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n=await this.cosignSigningConfigArgs(e.noTransparencyLog);for(let s of e.imageNames){let i=await this.imageTools.attestationDigests({name:`${s}@${e.imageDigest}`,retryOnManifestUnknown:e.retryOnManifestUnknown,retryLimit:e.retryLimit});for(let a of i){let c=`${s}@${a}`;await it(`Signing attestation manifest ${c}`,async()=>{let l=["sign","--yes","--oidc-provider","github-actions","--registry-referrers-mode","oci-1-1","--new-bundle-format",...n];S(`[command]${this.cosign.binPath} ${[...l,c].join(" ")}`);let u=await Y.getExecOutput(this.cosign.binPath,["--verbose",...l,c],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),d=$o.parseCommandOutput(u.stderr.trim());if(u.exitCode!=0)if(d.errors&&d.errors.length>0){let p=d.errors.map(f=>`- [${f.code}] ${f.message} : ${f.detail}`).join(`
|
||||
`);throw new Error(`Cosign sign command failed with errors:
|
||||
${p}`)}else throw new Error(`Cosign sign command failed with: ${u.stderr.trim().split(/\r?\n/).filter(p=>p.length>0).pop()??"unknown error"}`);let A=t.parseBundle((0,yf.bundleFromJSON)(d.bundle));A.tlogID&&S(`Uploaded to Rekor transparency log: ${dd}?logIndex=${A.tlogID}`),S(`Signature manifest pushed: https://oci.dag.dev/?referrers=${c}`),r[c]={...A,imageName:s}})}}}catch(n){throw new Error(`Signing BuildKit attestation manifests failed: ${n.message}`)}return r}async verifySignedManifests(e,r){let n={};for(let[s,i]of Object.entries(e))await it(`Verifying signature of ${s}`,async()=>{let a=await this.verifyImageAttestation(s,{certificateIdentityRegexp:r.certificateIdentityRegexp,noTransparencyLog:r.noTransparencyLog||!i.tlogID,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});S(`Signature manifest verified: https://oci.dag.dev/?image=${i.imageName}@${a.signatureManifestDigest}`),n[s]=a});return n}async verifyImageAttestations(e,r){let n={},s=await this.imageTools.attestationDigests({name:e,platform:r.platform,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});if(s.length===0)throw new Error(`No attestation manifests found for ${e}`);let i=e.split(":",1)[0];for(let a of s){let c=`${i}@${a}`,l=await this.verifyImageAttestation(c,r);S(`Signature manifest verified: https://oci.dag.dev/?image=${i}@${l.signatureManifestDigest}`),n[c]=l}return n}async verifyImageAttestation(e,r){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed manifests");let n=["verify","--experimental-oci11","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp];if(r.noTransparencyLog&&n.push("--use-signed-timestamps","--insecure-ignore-tlog"),!r.retryOnManifestUnknown){S(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);let a=await Y.getExecOutput(this.cosign.binPath,["--verbose",...n,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})});if(a.exitCode!==0)throw new Error(`Cosign verify command failed with: ${a.stderr.trim().split(/\r?\n/).filter(l=>l.length>0).pop()??"unknown error"}`);let c=$o.parseCommandOutput(a.stderr.trim());return{cosignArgs:n,signatureManifestDigest:c.signatureManifestDigest}}let s=r.retryLimit??15,i;S(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);for(let a=0;a<s;a++){let c=await Y.getExecOutput(this.cosign.binPath,["--verbose",...n,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),l=$o.parseCommandOutput(c.stderr.trim());if(c.exitCode===0)return{cosignArgs:n,signatureManifestDigest:l.signatureManifestDigest};if(l.errors&&l.errors.length>0){let u=l.errors.map(d=>`- [${d.code}] ${d.message} : ${d.detail}`).join(`
|
||||
${p}`)}else throw new Error(`Cosign sign command failed with: ${u.stderr.trim().split(/\r?\n/).filter(p=>p.length>0).pop()??"unknown error"}`);let A=t.parseBundle((0,Cf.bundleFromJSON)(d.bundle));A.tlogID&&S(`Uploaded to Rekor transparency log: ${dd}?logIndex=${A.tlogID}`),S(`Signature manifest pushed: https://oci.dag.dev/?referrers=${c}`),r[c]={...A,imageName:s}})}}}catch(n){throw new Error(`Signing BuildKit attestation manifests failed: ${n.message}`)}return r}async verifySignedManifests(e,r){let n={};for(let[s,i]of Object.entries(e))await it(`Verifying signature of ${s}`,async()=>{let a=await this.verifyImageAttestation(s,{certificateIdentityRegexp:r.certificateIdentityRegexp,noTransparencyLog:r.noTransparencyLog||!i.tlogID,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});S(`Signature manifest verified: https://oci.dag.dev/?image=${i.imageName}@${a.signatureManifestDigest}`),n[s]=a});return n}async verifyImageAttestations(e,r){let n={},s=await this.imageTools.attestationDigests({name:e,platform:r.platform,retryOnManifestUnknown:r.retryOnManifestUnknown,retryLimit:r.retryLimit});if(s.length===0)throw new Error(`No attestation manifests found for ${e}`);let i=e.split(":",1)[0];for(let a of s){let c=`${i}@${a}`,l=await this.verifyImageAttestation(c,r);S(`Signature manifest verified: https://oci.dag.dev/?image=${i}@${l.signatureManifestDigest}`),n[c]=l}return n}async verifyImageAttestation(e,r){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed manifests");let n=["verify","--experimental-oci11","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp];if(r.noTransparencyLog&&n.push("--use-signed-timestamps","--insecure-ignore-tlog"),!r.retryOnManifestUnknown){S(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);let a=await Y.getExecOutput(this.cosign.binPath,["--verbose",...n,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})});if(a.exitCode!==0)throw new Error(`Cosign verify command failed with: ${a.stderr.trim().split(/\r?\n/).filter(l=>l.length>0).pop()??"unknown error"}`);let c=$o.parseCommandOutput(a.stderr.trim());return{cosignArgs:n,signatureManifestDigest:c.signatureManifestDigest}}let s=r.retryLimit??15,i;S(`[command]${this.cosign.binPath} ${[...n,e].join(" ")}`);for(let a=0;a<s;a++){let c=await Y.getExecOutput(this.cosign.binPath,["--verbose",...n,e],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),l=$o.parseCommandOutput(c.stderr.trim());if(c.exitCode===0)return{cosignArgs:n,signatureManifestDigest:l.signatureManifestDigest};if(l.errors&&l.errors.length>0){let u=l.errors.map(d=>`- [${d.code}] ${d.message} : ${d.detail}`).join(`
|
||||
`);if(i=new Error(`Cosign verify command failed with errors:
|
||||
${u}`),l.errors.some(d=>d.code==="MANIFEST_UNKNOWN"))S(`Cosign verify command failed with MANIFEST_UNKNOWN, retrying attempt ${a+1}/${s}...
|
||||
${u}`),await new Promise(d=>setTimeout(d,Math.pow(2,a)*100));else throw i}else throw new Error(`Cosign verify command failed with: ${c.stderr.trim().split(/\r?\n/).filter(u=>u.length>0).pop()??"unknown error"}`)}throw i}async signProvenanceBlobs(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign provenance blobs");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n=await this.cosignSigningConfigArgs(e.noTransparencyLog),s=t.getProvenanceBlobs(e);for(let i of Object.keys(s))await it(`Signing ${i}`,async()=>{let a=s[i],c=Wo.default.join(Wo.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),l=t.getProvenanceSubjects(a);if(l.length===0){Ve(`No subjects found in provenance ${i}, skip signing.`);return}let u=Wo.default.join(Wo.default.dirname(i),l[0].name),d=["attest-blob","--yes","--oidc-provider","github-actions","--new-bundle-format","--statement",i,"--type",Aue,"--bundle",c,...n];S(`[command]${this.cosign.binPath} ${[...d,u].join(" ")}`);let A=await Y.getExecOutput(this.cosign.binPath,["--verbose",...d,u],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),p=$o.parseCommandOutput(A.stderr.trim());if(A.exitCode!=0)if(p.errors&&p.errors.length>0){let h=p.errors.map(g=>`- [${g.code}] ${g.message} : ${g.detail}`).join(`
|
||||
${u}`),await new Promise(d=>setTimeout(d,Math.pow(2,a)*100));else throw i}else throw new Error(`Cosign verify command failed with: ${c.stderr.trim().split(/\r?\n/).filter(u=>u.length>0).pop()??"unknown error"}`)}throw i}async signProvenanceBlobs(e){if(!await this.cosign.isAvailable())throw new Error("Cosign is required to sign provenance blobs");let r={};try{if(!process.env.ACTIONS_ID_TOKEN_REQUEST_URL)throw new Error('missing "id-token" permission. Please add "permissions: id-token: write" to your workflow.');let n=await this.cosignSigningConfigArgs(e.noTransparencyLog),s=t.getProvenanceBlobs(e);for(let i of Object.keys(s))await it(`Signing ${i}`,async()=>{let a=s[i],c=Wo.default.join(Wo.default.dirname(i),`${e.name??"provenance"}.sigstore.json`),l=t.getProvenanceSubjects(a);if(l.length===0){Ve(`No subjects found in provenance ${i}, skip signing.`);return}let u=Wo.default.join(Wo.default.dirname(i),l[0].name),d=["attest-blob","--yes","--oidc-provider","github-actions","--new-bundle-format","--statement",i,"--type",fue,"--bundle",c,...n];S(`[command]${this.cosign.binPath} ${[...d,u].join(" ")}`);let A=await Y.getExecOutput(this.cosign.binPath,["--verbose",...d,u],{ignoreReturnCode:!0,silent:!0,env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),p=$o.parseCommandOutput(A.stderr.trim());if(A.exitCode!=0)if(p.errors&&p.errors.length>0){let h=p.errors.map(g=>`- [${g.code}] ${g.message} : ${g.detail}`).join(`
|
||||
`);throw new Error(`Cosign attest-blob command failed with errors:
|
||||
${h}`)}else throw new Error(`Cosign attest-blob command failed with: ${A.stderr.trim().split(/\r?\n/).filter(h=>h.length>0).pop()??"unknown error"}`);let f=t.parseBundle((0,yf.bundleFromJSON)(JSON.parse(Yo.default.readFileSync(c,{encoding:"utf-8"}))));S("Provenance blob signed for:");for(let h of l){let[g,y]=Object.entries(h.digest)[0]||[];S(` - ${h.name} (${g}:${y})`)}f.tlogID&&S(`Attestation signature uploaded to Rekor transparency log: ${dd}?logIndex=${f.tlogID}`),S(`Sigstore bundle written to: ${c}`),r[i]={...f,bundlePath:c,subjects:l}})}catch(n){throw new Error(`Signing BuildKit provenance blobs failed: ${n.message}`)}return r}async verifySignedArtifacts(e,r){let n={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[s,i]of Object.entries(e)){let a=Wo.default.dirname(s);await it(`Verifying signature bundle ${i.bundlePath}`,async()=>{for(let c of i.subjects){let l=Wo.default.join(a,c.name);S(`Verifying signed artifact ${l}`);let u=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??Aue];(r.noTransparencyLog||!i.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let d=await Y.getExecOutput(this.cosign.binPath,[...u,"--bundle",i.bundlePath,l],{ignoreReturnCode:!0});if(d.stderr.length>0&&d.exitCode!=0)throw new Error(d.stderr);n[l]={bundlePath:i.bundlePath,cosignArgs:u}}})}return n}async verifyArtifact(e,r,n){S("Verifying keyless verification bundle signature");let s=JSON.parse(Yo.default.readFileSync(r,"utf-8")),i=(0,yf.bundleFromJSON)(s);S("Fetching Sigstore TUF trusted root metadata");let a=await fue.getTrustedRoot(),c=(0,Cf.toTrustMaterial)(a);try{S("Verifying artifact signature");let l=(0,Cf.toSignedEntity)(i,Yo.default.readFileSync(e)),u=t.parseCertificate(i),d=i.verificationMaterial.tlogEntries,A=d.length>0?d[0].logIndex:void 0;if(n?.subjectAlternativeName&&n?.subjectAlternativeName instanceof RegExp){let h=u.subjectAltName?.replace(/^uri:/i,"");if(h){if(!h.match(n.subjectAlternativeName))throw new Error(`Signing certificate subjectAlternativeName "${h}" does not match expected pattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let f=new Cf.Verifier(c).verify(l,{subjectAlternativeName:n?.subjectAlternativeName&&typeof n.subjectAlternativeName=="string"?n.subjectAlternativeName:void 0,extensions:n?.issuer?{issuer:n.issuer}:void 0});return b(`Sigstore.verifyArtifact signer: ${JSON.stringify(f)}`),{payload:s,certificate:u.toString(),tlogID:A}}catch(l){throw new Error(`Failed to verify artifact signature: ${l}`)}}static noTransparencyLog(e){return e??We.context.payload.repository?.private??!1}async cosignSigningConfigArgs(e){let r=[],n=t.noTransparencyLog(e);return S(`Upload to transparency log: ${n?"disabled":"enabled"}`),await this.cosign.versionSatisfies(">=3.0.4")?await it("Creating Sigstore protobuf signing config",async()=>{let s=Oe.tmpName({template:"signing-config-XXXXXX.json",tmpdir:Oe.tmpDir()}),i=["signing-config","create","--with-default-services=true",`--out=${s}`];n&&i.push("--no-default-rekor=true"),await Y.exec(this.cosign.binPath,i,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),S(JSON.stringify(JSON.parse(Yo.default.readFileSync(s,{encoding:"utf-8"})),null,2)),r.push(`--signing-config=${s}`)}):(r.push("--use-signing-config"),n&&r.push("--tlog-upload=false")),r}static getProvenanceBlobs(e){let r=Wo.default.join(e.localExportDir,"provenance.json");if(Yo.default.existsSync(r))return{[r]:Yo.default.readFileSync(r)};let n=Yo.default.readdirSync(e.localExportDir,{withFileTypes:!0}),s=n.filter(i=>i.isDirectory());if(s.length>0&&s.length===n.length&&s.every(i=>Yo.default.existsSync(Wo.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let a of s){let c=Wo.default.join(e.localExportDir,a.name,"provenance.json");i[c]=Yo.default.readFileSync(c)}return i}throw new Error(`No valid provenance.json found in ${e.localExportDir}`)}static getProvenanceSubjects(e){return JSON.parse(e.toString()).subject.map(n=>({name:n.name,digest:n.digest}))}static parseBundle(e){let r=t.parseCertificate(e),n=e.verificationMaterial.tlogEntries,s=n.length>0?n[0].logIndex:void 0;return{payload:(0,yf.bundleToJSON)(e),certificate:r.toString(),tlogID:s}}static parseCertificate(e){let r;switch(e.verificationMaterial.content.$case){case"x509CertificateChain":r=e.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes;break;case"certificate":r=e.verificationMaterial.content.certificate.rawBytes;break;default:throw new Error("Bundle must contain an x509 certificate")}return new pue.X509Certificate(r)}};var HN=class t{static{o(this,"Install")}standalone;githubToken;sigstore;constructor(e){this.standalone=e?.standalone,this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.sigstore=e?.sigstore||new ml}as
Line truncated
|
||||
${h}`)}else throw new Error(`Cosign attest-blob command failed with: ${A.stderr.trim().split(/\r?\n/).filter(h=>h.length>0).pop()??"unknown error"}`);let f=t.parseBundle((0,Cf.bundleFromJSON)(JSON.parse(Yo.default.readFileSync(c,{encoding:"utf-8"}))));S("Provenance blob signed for:");for(let h of l){let[g,y]=Object.entries(h.digest)[0]||[];S(` - ${h.name} (${g}:${y})`)}f.tlogID&&S(`Attestation signature uploaded to Rekor transparency log: ${dd}?logIndex=${f.tlogID}`),S(`Sigstore bundle written to: ${c}`),r[i]={...f,bundlePath:c,subjects:l}})}catch(n){throw new Error(`Signing BuildKit provenance blobs failed: ${n.message}`)}return r}async verifySignedArtifacts(e,r){let n={};if(!await this.cosign.isAvailable())throw new Error("Cosign is required to verify signed artifacts");for(let[s,i]of Object.entries(e)){let a=Wo.default.dirname(s);await it(`Verifying signature bundle ${i.bundlePath}`,async()=>{for(let c of i.subjects){let l=Wo.default.join(a,c.name);S(`Verifying signed artifact ${l}`);let u=["verify-blob-attestation","--new-bundle-format","--certificate-oidc-issuer","https://token.actions.githubusercontent.com","--certificate-identity-regexp",r.certificateIdentityRegexp,"--type",r.predicateType??fue];(r.noTransparencyLog||!i.tlogID)&&u.push("--use-signed-timestamps","--insecure-ignore-tlog");let d=await Y.getExecOutput(this.cosign.binPath,[...u,"--bundle",i.bundlePath,l],{ignoreReturnCode:!0});if(d.stderr.length>0&&d.exitCode!=0)throw new Error(d.stderr);n[l]={bundlePath:i.bundlePath,cosignArgs:u}}})}return n}async verifyArtifact(e,r,n){S("Verifying keyless verification bundle signature");let s=JSON.parse(Yo.default.readFileSync(r,"utf-8")),i=(0,Cf.bundleFromJSON)(s);S("Fetching Sigstore TUF trusted root metadata");let a=await mue.getTrustedRoot(),c=(0,If.toTrustMaterial)(a);try{S("Verifying artifact signature");let l=(0,If.toSignedEntity)(i,Yo.default.readFileSync(e)),u=t.parseCertificate(i),d=i.verificationMaterial.tlogEntries,A=d.length>0?d[0].logIndex:void 0;if(n?.subjectAlternativeName&&n?.subjectAlternativeName instanceof RegExp){let h=u.subjectAltName?.replace(/^uri:/i,"");if(h){if(!h.match(n.subjectAlternativeName))throw new Error(`Signing certificate subjectAlternativeName "${h}" does not match expected pattern`)}else throw new Error("Signing certificate does not contain subjectAltName")}let f=new If.Verifier(c).verify(l,{subjectAlternativeName:n?.subjectAlternativeName&&typeof n.subjectAlternativeName=="string"?n.subjectAlternativeName:void 0,extensions:n?.issuer?{issuer:n.issuer}:void 0});return b(`Sigstore.verifyArtifact signer: ${JSON.stringify(f)}`),{payload:s,certificate:u.toString(),tlogID:A}}catch(l){throw new Error(`Failed to verify artifact signature: ${l}`)}}static noTransparencyLog(e){return e??je.context.payload.repository?.private??!1}async cosignSigningConfigArgs(e){let r=[],n=t.noTransparencyLog(e);return S(`Upload to transparency log: ${n?"disabled":"enabled"}`),await this.cosign.versionSatisfies(">=3.0.4")?await it("Creating Sigstore protobuf signing config",async()=>{let s=Oe.tmpName({template:"signing-config-XXXXXX.json",tmpdir:Oe.tmpDir()}),i=["signing-config","create","--with-default-services=true",`--out=${s}`];n&&i.push("--no-default-rekor=true"),await Y.exec(this.cosign.binPath,i,{env:Object.assign({},process.env,{COSIGN_EXPERIMENTAL:"1"})}),S(JSON.stringify(JSON.parse(Yo.default.readFileSync(s,{encoding:"utf-8"})),null,2)),r.push(`--signing-config=${s}`)}):(r.push("--use-signing-config"),n&&r.push("--tlog-upload=false")),r}static getProvenanceBlobs(e){let r=Wo.default.join(e.localExportDir,"provenance.json");if(Yo.default.existsSync(r))return{[r]:Yo.default.readFileSync(r)};let n=Yo.default.readdirSync(e.localExportDir,{withFileTypes:!0}),s=n.filter(i=>i.isDirectory());if(s.length>0&&s.length===n.length&&s.every(i=>Yo.default.existsSync(Wo.default.join(e.localExportDir,i.name,"provenance.json")))){let i={};for(let a of s){let c=Wo.default.join(e.localExportDir,a.name,"provenance.json");i[c]=Yo.default.readFileSync(c)}return i}throw new Error(`No valid provenance.json found in ${e.localExportDir}`)}static getProvenanceSubjects(e){return JSON.parse(e.toString()).subject.map(n=>({name:n.name,digest:n.digest}))}static parseBundle(e){let r=t.parseCertificate(e),n=e.verificationMaterial.tlogEntries,s=n.length>0?n[0].logIndex:void 0;return{payload:(0,Cf.bundleToJSON)(e),certificate:r.toString(),tlogID:s}}static parseCertificate(e){let r;switch(e.verificationMaterial.content.$case){case"x509CertificateChain":r=e.verificationMaterial.content.x509CertificateChain.certificates[0].rawBytes;break;case"certificate":r=e.verificationMaterial.content.certificate.rawBytes;break;default:throw new Error("Bundle must contain an x509 certificate")}return new hue.X509Certificate(r)}};var VN=class t{static{o(this,"Install")}standalone;githubToken;sigstore;constructor(e){this.standalone=e?.standalone,this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.sigstore=e?.sigstore||new ml}as
Line truncated
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG GO_VERSION="1.24"
|
||||
@@ -215,7 +215,7 @@ EOT
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /out /
|
||||
`;var jN=class t{static{o(this,"Install")}githubToken;buildx;sigstore;constructor(e){this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.buildx=e?.buildx||new _e,this.sigstore=e?.sigstore||new ml}async download(e){let r=await t.getDownloadVersion(e.version);b(`Install.download version: ${r.version}`);let n=await t.getRelease(r,this.githubToken);b(`Install.download release tag name: ${n.tag_name}`);let s=await this.vspec(n.tag_name);b(`Install.download vspec: ${s}`);let i=wf.clean(s)||"";if(!wf.valid(i))throw new Error(`Invalid Cosign version "${s}".`);let a=new mr({htcName:"cosign-dl-bin",htcVersion:s,baseCacheDir:bf.default.join(Ti.default.homedir(),".bin"),cacheFile:Ti.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:e.ghaNoCache}),c=await a.find();if(c)return S(`Cosign binary found in ${c}`),c;let l=Yq.format(r.downloadURL,s,this.filename());S(`Downloading ${l}`);let u=await Ss(l,void 0,this.githubToken);b(`Install.download htcDownloadPath: ${u}`),e.verifySignature&&wf.satisfies(s,">=3.0.1")&&await this.verifySignature(u,l);let d=await a.save(u,e.skipState);return S(`Cached to ${d}`),d}async build(e,r,n){let s=await this.vspec(e);b(`Install.build vspec: ${s}`);let i=new mr({htcName:"cosign-build-bin",htcVersion:s,baseCacheDir:bf.default.join(Ti.default.homedir(),".bin"),cacheFile:Ti.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:r}),a=await i.find();if(a)return S(`Cosign binary found in ${a}`),a;let c=bf.default.join(Oe.tmpDir(),"cosign-build-cache"),l=await this.buildCommand(e,c),u=await Y.getExecOutput(l.command,l.args,{ignoreReturnCode:!0,input:Buffer.from(mue)}).then(A=>{if(A.stderr.length>0&&A.exitCode!=0)throw new Error(`build failed with: ${A.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return`${c}/cosign`}),d=await i.save(u,n);return S(`Cached to ${d}`),d}async install(e,r){r=r||Oe.tmpDir();let n=bf.default.join(r,"cosign-bin");xE.default.existsSync(n)||xE.default.mkdirSync(n,{recursive:!0});let s=Ti.default.platform()=="win32"?"cosign.exe":"cosign",i=bf.default.join(n,s);return xE.default.copyFileSync(e,i),S("Fixing perms"),xE.default.chmodSync(i,"0755"),Ji(n),S("Added Cosign to PATH"),S(`Binary path: ${i}`),i}async buildCommand(e,r){let n=await new _e({standalone:!0}).isAvailable(),s=await new _e({standalone:!1}).isAvailable(),i=!1;if(await this.buildx.isStandalone()&&n)b("Install.buildCommand: Buildx standalone found, build with it"),i=!0;else if(!await this.buildx.isStandalone()&&s)b("Install.buildCommand: Buildx plugin found, build with it"),i=!1;else if(n)b("Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it"),i=!0;else if(s)b("Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it"),i=!1;else throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${e}`);let a=["build","--platform","local","--build-arg","BUILDKIT_CONTEXT_KEEP_GIT_DIR=1","--output",`type=local,dest=${r}`];return process.env.GIT_AUTH_TOKEN&&a.push("--secret","id=GIT_AUTH_TOKEN"),a.push("-f-",e),await new _e({standalone:i}).getCommand(a)}async verifySignature(e,r){let n=`${r}.sigstore.json`;S(`Downloading keyless verification bundle at ${n}`);let s=await Ss(n,void 0,this.githubToken);b(`Install.verifySignature bundlePath: ${s}`);let i=await this.sigstore.verifyArtifact(e,s,{subjectAlternativeName:"keyless@projectsigstore.iam.gserviceaccount.com",issuer:"https://accounts.google.com"});S(`Cosign binary signature verified! ${i.tlogID?`${dd}?logIndex=${i.tlogID}`:""}`)}filename(){let e;switch(Ti.default.arch()){case"x64":{e="amd64";break}case"ppc64":{e="ppc64le";break}default:{e=Ti.default.arch();break}}let r=Ti.default.platform()=="win32"?"windows":Ti.default.platform(),n=Ti.default.platform()=="win32"?".exe":"";return Yq.format("cosign-%s-%s%s",r,e,n)}async vspec(e){if(!Me.isValidRef(e)){let u=e.replace(/^v+|v+$/g,"");return S(`Use ${u} version spec cache key for ${e}`),u}let[r,n]=e.split("#");n.length==0&&(n="master");let s;n.match(/^[0-9a-fA-F]{40}$/)?s=n:s=await qp.remoteSha(r,n,process.env.GIT_AUTH_TOKEN);let[i,a]=r.substring(19).split("/"),c=`${i}/${Me.trimSuffix(a,".git")}/${s}`,l=Me.hash(c);return S(`Use ${l} version spec cache key for ${c}`),l}static async getDownloadVersion(e){return{version:e,downloadURL:"https://github.com/sigstore/cosign/releases/download/v%s/%s",contentOpts:{owner:"docker",repo:"actions-toolkit",ref:"main",path:".github/cosign-releases.json"}}}static async getRelease(e,r){let s=await new We({token:r}).releases("Cosign",e.contentOpts);if(!s[e.version])throw new Error(`Cannot find Cosign release ${e.version} in releases JSON`);return s[e.version]}};var gue=w(Ni(),1);var KN=class{static{o(this,"Regctl")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"regctl",this._version="",this._versionOnce=!1}async blobGet(e){return await Y.getExecOutput(this.binPath,["blob","get",e.repository,e.digest],{ignoreReturnCode:!0,silen
Line truncated
|
||||
`;var KN=class t{static{o(this,"Install")}githubToken;buildx;sigstore;constructor(e){this.githubToken=e?.githubToken||process.env.GITHUB_TOKEN,this.buildx=e?.buildx||new _e,this.sigstore=e?.sigstore||new ml}async download(e){let r=await t.getDownloadVersion(e.version);b(`Install.download version: ${r.version}`);let n=await t.getRelease(r,this.githubToken);b(`Install.download release tag name: ${n.tag_name}`);let s=await this.vspec(n.tag_name);b(`Install.download vspec: ${s}`);let i=Sf.clean(s)||"";if(!Sf.valid(i))throw new Error(`Invalid Cosign version "${s}".`);let a=new mr({htcName:"cosign-dl-bin",htcVersion:s,baseCacheDir:wf.default.join(Ti.default.homedir(),".bin"),cacheFile:Ti.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:e.ghaNoCache}),c=await a.find();if(c)return S(`Cosign binary found in ${c}`),c;let l=jq.format(r.downloadURL,s,this.filename());S(`Downloading ${l}`);let u=await Ss(l,void 0,this.githubToken);b(`Install.download htcDownloadPath: ${u}`),e.verifySignature&&Sf.satisfies(s,">=3.0.1")&&await this.verifySignature(u,l);let d=await a.save(u,e.skipState);return S(`Cached to ${d}`),d}async build(e,r,n){let s=await this.vspec(e);b(`Install.build vspec: ${s}`);let i=new mr({htcName:"cosign-build-bin",htcVersion:s,baseCacheDir:wf.default.join(Ti.default.homedir(),".bin"),cacheFile:Ti.default.platform()=="win32"?"cosign.exe":"cosign",ghaNoCache:r}),a=await i.find();if(a)return S(`Cosign binary found in ${a}`),a;let c=wf.default.join(Oe.tmpDir(),"cosign-build-cache"),l=await this.buildCommand(e,c),u=await Y.getExecOutput(l.command,l.args,{ignoreReturnCode:!0,input:Buffer.from(Eue)}).then(A=>{if(A.stderr.length>0&&A.exitCode!=0)throw new Error(`build failed with: ${A.stderr.match(/(.*)\s*$/)?.[0]?.trim()??"unknown error"}`);return`${c}/cosign`}),d=await i.save(u,n);return S(`Cached to ${d}`),d}async install(e,r){r=r||Oe.tmpDir();let n=wf.default.join(r,"cosign-bin");QE.default.existsSync(n)||QE.default.mkdirSync(n,{recursive:!0});let s=Ti.default.platform()=="win32"?"cosign.exe":"cosign",i=wf.default.join(n,s);return QE.default.copyFileSync(e,i),S("Fixing perms"),QE.default.chmodSync(i,"0755"),Ji(n),S("Added Cosign to PATH"),S(`Binary path: ${i}`),i}async buildCommand(e,r){let n=await new _e({standalone:!0}).isAvailable(),s=await new _e({standalone:!1}).isAvailable(),i=!1;if(await this.buildx.isStandalone()&&n)b("Install.buildCommand: Buildx standalone found, build with it"),i=!0;else if(!await this.buildx.isStandalone()&&s)b("Install.buildCommand: Buildx plugin found, build with it"),i=!1;else if(n)b("Install.buildCommand: Buildx plugin not found, but standalone found so trying to build with it"),i=!0;else if(s)b("Install.buildCommand: Buildx standalone not found, but plugin found so trying to build with it"),i=!1;else throw new Error(`Neither buildx standalone or plugin have been found to build from ref ${e}`);let a=["build","--platform","local","--build-arg","BUILDKIT_CONTEXT_KEEP_GIT_DIR=1","--output",`type=local,dest=${r}`];return process.env.GIT_AUTH_TOKEN&&a.push("--secret","id=GIT_AUTH_TOKEN"),a.push("-f-",e),await new _e({standalone:i}).getCommand(a)}async verifySignature(e,r){let n=`${r}.sigstore.json`;S(`Downloading keyless verification bundle at ${n}`);let s=await Ss(n,void 0,this.githubToken);b(`Install.verifySignature bundlePath: ${s}`);let i=await this.sigstore.verifyArtifact(e,s,{subjectAlternativeName:"keyless@projectsigstore.iam.gserviceaccount.com",issuer:"https://accounts.google.com"});S(`Cosign binary signature verified! ${i.tlogID?`${dd}?logIndex=${i.tlogID}`:""}`)}filename(){let e;switch(Ti.default.arch()){case"x64":{e="amd64";break}case"ppc64":{e="ppc64le";break}default:{e=Ti.default.arch();break}}let r=Ti.default.platform()=="win32"?"windows":Ti.default.platform(),n=Ti.default.platform()=="win32"?".exe":"";return jq.format("cosign-%s-%s%s",r,e,n)}async vspec(e){if(!Me.isValidRef(e)){let u=e.replace(/^v+|v+$/g,"");return S(`Use ${u} version spec cache key for ${e}`),u}let[r,n]=e.split("#");n.length==0&&(n="master");let s;n.match(/^[0-9a-fA-F]{40}$/)?s=n:s=await Gp.remoteSha(r,n,process.env.GIT_AUTH_TOKEN);let[i,a]=r.substring(19).split("/"),c=`${i}/${Me.trimSuffix(a,".git")}/${s}`,l=Me.hash(c);return S(`Use ${l} version spec cache key for ${c}`),l}static async getDownloadVersion(e){return{version:e,downloadURL:"https://github.com/sigstore/cosign/releases/download/v%s/%s",contentOpts:{owner:"docker",repo:"actions-toolkit",ref:"main",path:".github/cosign-releases.json"}}}static async getRelease(e,r){let s=await new je({token:r}).releases("Cosign",e.contentOpts);if(!s[e.version])throw new Error(`Cannot find Cosign release ${e.version} in releases JSON`);return s[e.version]}};var yue=w(Ni(),1);var XN=class{static{o(this,"Regctl")}binPath;_version;_versionOnce;constructor(e){this.binPath=e?.binPath||"regctl",this._version="",this._versionOnce=!1}async blobGet(e){return await Y.getExecOutput(this.binPath,["blob","get",e.repository,e.digest],{ignoreReturnCode:!0,silen
Line truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
undici/lib/web/fetch/body.js:
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../node_modules/tunnel/lib/tunnel.js", "../node_modules/tunnel/index.js", "../node_modules/undici/lib/core/symbols.js", "../node_modules/undici/lib/core/errors.js", "../node_modules/undici/lib/core/constants.js", "../node_modules/undici/lib/core/tree.js", "../node_modules/undici/lib/core/util.js", "../node_modules/undici/lib/core/diagnostics.js", "../node_modules/undici/lib/core/request.js", "../node_modules/undici/lib/dispatcher/dispatcher.js", "../node_modules/undici/lib/dispatcher/dispatcher-base.js", "../node_modules/undici/lib/util/timers.js", "../node_modules/undici/lib/core/connect.js", "../node_modules/undici/lib/llhttp/utils.js", "../node_modules/undici/lib/llhttp/constants.js", "../node_modules/undici/lib/llhttp/llhttp-wasm.js", "../node_modules/undici/lib/llhttp/llhttp_simd-wasm.js", "../node_modules/undici/lib/web/fetch/constants.js", "../node_modules/undici/lib/web/fetch/global.js", "../node_modules/undici/lib/web/fetch/data-url.js", "../node_modules/undici/lib/web/fetch/webidl.js", "../node_modules/undici/lib/web/fetch/util.js", "../node_modules/undici/lib/web/fetch/symbols.js", "../node_modules/undici/lib/web/fetch/file.js", "../node_modules/undici/lib/web/fetch/formdata.js", "../node_modules/undici/lib/web/fetch/formdata-parser.js", "../node_modules/undici/lib/web/fetch/body.js", "../node_modules/undici/lib/dispatcher/client-h1.js", "../node_modules/undici/lib/dispatcher/client-h2.js", "../node_modules/undici/lib/handler/redirect-handler.js", "../node_modules/undici/lib/interceptor/redirect-interceptor.js", "../node_modules/undici/lib/dispatcher/client.js", "../node_modules/undici/lib/dispatcher/fixed-queue.js", "../node_modules/undici/lib/dispatcher/pool-stats.js", "../node_modules/undici/lib/dispatcher/pool-base.js", "../node_modules/undici/lib/dispatcher/pool.js", "../node_modules/undici/lib/dispatcher/balanced-pool.js", "../node_modules/undici/lib/dispatcher/agent.js", "../node_modules/undici/lib/dispatcher/proxy-agent.js", "../node_modules/undici/lib/dispatcher/env-http-proxy-agent.js", "../node_modules/undici/lib/handler/retry-handler.js", "../node_modules/undici/lib/dispatcher/retry-agent.js", "../node_modules/undici/lib/api/readable.js", "../node_modules/undici/lib/api/util.js", "../node_modules/undici/lib/api/api-request.js", "../node_modules/undici/lib/api/abort-signal.js", "../node_modules/undici/lib/api/api-stream.js", "../node_modules/undici/lib/api/api-pipeline.js", "../node_modules/undici/lib/api/api-upgrade.js", "../node_modules/undici/lib/api/api-connect.js", "../node_modules/undici/lib/api/index.js", "../node_modules/undici/lib/mock/mock-errors.js", "../node_modules/undici/lib/mock/mock-symbols.js", "../node_modules/undici/lib/mock/mock-utils.js", "../node_modules/undici/lib/mock/mock-interceptor.js", "../node_modules/undici/lib/mock/mock-client.js", "../node_modules/undici/lib/mock/mock-pool.js", "../node_modules/undici/lib/mock/pluralizer.js", "../node_modules/undici/lib/mock/pending-interceptors-formatter.js", "../node_modules/undici/lib/mock/mock-agent.js", "../node_modules/undici/lib/global.js", "../node_modules/undici/lib/handler/decorator-handler.js", "../node_modules/undici/lib/interceptor/redirect.js", "../node_modules/undici/lib/interceptor/retry.js", "../node_modules/undici/lib/interceptor/dump.js", "../node_modules/undici/lib/interceptor/dns.js", "../node_modules/undici/lib/web/fetch/headers.js", "../node_modules/undici/lib/web/fetch/response.js", "../node_modules/undici/lib/web/fetch/dispatcher-weakref.js", "../node_modules/undici/lib/web/fetch/request.js", "../node_modules/undici/lib/web/fetch/index.js", "../node_modules/undici/lib/web/fileapi/symbols.js", "../node_modules/undici/lib/web/fileapi/progressevent.js", "../node_modules/undici/lib/web/fileapi/encoding.js", "../node_modules/undici/lib/web/fileapi/util.js", "../node_modules/undici/lib/web/fileapi/filereader.js", "../node_modules/undici/lib/web/cache/symbols.js", "../node_modules/undici/lib/web/cache/util.js", "../node_modules/undici/lib/web/cache/cache.js", "../node_modules/undici/lib/web/cache/cachestorage.js", "../node_modules/undici/lib/web/cookies/constants.js", "../node_modules/undici/lib/web/cookies/util.js", "../node_modules/undici/lib/web/cookies/parse.js", "../node_modules/undici/lib/web/cookies/index.js", "../node_modules/undici/lib/web/websocket/events.js", "../node_modules/undici/lib/web/websocket/constants.js", "../node_modules/undici/lib/web/websocket/symbols.js", "../node_modules/undici/lib/web/websocket/util.js", "../node_modules/undici/lib/web/websocket/frame.js", "../node_modules/undici/lib/web/websocket/connection.js", "../node_modules/undici/lib/web/websocket/permessage-deflate.js", "../node_modules/undici/lib/web/websocket/receiver.js", "../node_modules/undici/lib/web/websocket/sender.js", "../node_modules/undici/lib/web/websocket/websocket.js", "../node_modules/undici/lib/web/eventsource/util.js", "../node_modules/undici/lib/web/eventsource/eventsource-stream.js",Line truncated
|
||||
"sourcesContent": ["'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('Line truncated
|
||||
"mappings": "ipBAAA,IAAAA,GAAAC,EAAAC,IAAA,cAEA,IAAIC,IAAM,QAAQ,KAAK,EACnBC,IAAM,QAAQ,KAAK,EACnBC,GAAO,QAAQ,MAAM,EACrBC,GAAQ,QAAQ,OAAO,EACvBC,IAAS,QAAQ,QAAQ,EACzBC,IAAS,QAAQ,QAAQ,EACzBC,IAAO,QAAQ,MAAM,EAGzBP,GAAQ,aAAeQ,IACvBR,GAAQ,cAAgBS,IACxBT,GAAQ,cAAgBU,IACxBV,GAAQ,eAAiBW,IAGzB,SAASH,IAAaI,EAAS,CAC7B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUV,GAAK,QACdU,CACT,CAJSE,EAAAP,IAAA,gBAMT,SAASC,IAAcG,EAAS,CAC9B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUV,GAAK,QACrBU,EAAM,aAAeG,GACrBH,EAAM,YAAc,IACbA,CACT,CANSE,EAAAN,IAAA,iBAQT,SAASC,IAAcE,EAAS,CAC9B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUT,GAAM,QACfS,CACT,CAJSE,EAAAL,IAAA,iBAMT,SAASC,IAAeC,EAAS,CAC/B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUT,GAAM,QACtBS,EAAM,aAAeG,GACrBH,EAAM,YAAc,IACbA,CACT,CANSE,EAAAJ,IAAA,kBAST,SAASG,GAAeF,EAAS,CAC/B,IAAIK,EAAO,KACXA,EAAK,QAAUL,GAAW,CAAC,EAC3BK,EAAK,aAAeA,EAAK,QAAQ,OAAS,CAAC,EAC3CA,EAAK,WAAaA,EAAK,QAAQ,YAAcd,GAAK,MAAM,kBACxDc,EAAK,SAAW,CAAC,EACjBA,EAAK,QAAU,CAAC,EAEhBA,EAAK,GAAG,OAAQF,EAAA,SAAgBG,EAAQC,EAAMC,EAAMC,EAAc,CAEhE,QADIT,EAAUU,GAAUH,EAAMC,EAAMC,CAAY,EACvCE,EAAI,EAAGC,EAAMP,EAAK,SAAS,OAAQM,EAAIC,EAAK,EAAED,EAAG,CACxD,IAAIE,EAAUR,EAAK,SAASM,CAAC,EAC7B,GAAIE,EAAQ,OAASb,EAAQ,MAAQa,EAAQ,OAASb,EAAQ,KAAM,CAGlEK,EAAK,SAAS,OAAOM,EAAG,CAAC,EACzBE,EAAQ,QAAQ,SAASP,CAAM,EAC/B,MACF,CACF,CACAA,EAAO,QAAQ,EACfD,EAAK,aAAaC,CAAM,CAC1B,EAdgB,SAcf,CACH,CAvBSH,EAAAD,GAAA,kBAwBTP,IAAK,SAASO,GAAgBT,IAAO,YAAY,EAEjDS,GAAe,UAAU,WAAaC,EAAA,SAAoBW,EAAKP,EAAMC,EAAMC,EAAc,CACvF,IAAIJ,EAAO,KACPL,EAAUe,GAAa,CAAC,QAASD,CAAG,EAAGT,EAAK,QAASK,GAAUH,EAAMC,EAAMC,CAAY,CAAC,EAE5F,GAAIJ,EAAK,QAAQ,QAAU,KAAK,WAAY,CAE1CA,EAAK,SAAS,KAAKL,CAAO,EAC1B,MACF,CAGAK,EAAK,aAAaL,EAAS,SAASM,EAAQ,CAC1CA,EAAO,GAAG,OAAQU,CAAM,EACxBV,EAAO,GAAG,QAASW,CAAe,EAClCX,EAAO,GAAG,cAAeW,CAAe,EACxCH,EAAI,SAASR,CAAM,EAEnB,SAASU,GAAS,CAChBX,EAAK,KAAK,OAAQC,EAAQN,CAAO,CACnC,CAFSG,EAAAa,EAAA,UAIT,SAASC,EAAgBC,EAAK,CAC5Bb,EAAK,aAAaC,CAAM,EACxBA,EAAO,eAAe,OAAQU,CAAM,EACpCV,EAAO,eAAe,QAASW,CAAe,EAC9CX,EAAO,eAAe,cAAeW,CAAe,CACtD,CALSd,EAAAc,EAAA,kBAMX,CAAC,CACH,EA5BsC,cA8BtCf,GAAe,UAAU,aAAeC,EAAA,SAAsBH,EAASmB,EAAI,CACzE,IAAId,EAAO,KACPe,EAAc,CAAC,EACnBf,EAAK,QAAQ,KAAKe,CAAW,EAE7B,IAAIC,EAAiBN,GAAa,CAAC,EAAGV,EAAK,aAAc,CACvD,OAAQ,UACR,KAAML,EAAQ,KAAO,IAAMA,EAAQ,KACnC,MAAO,GACP,QAAS,CACP,KAAMA,EAAQ,KAAO,IAAMA,EAAQ,IACrC,CACF,CAAC,EACGA,EAAQ,eACVqB,EAAe,aAAerB,EAAQ,cAEpCqB,EAAe,YACjBA,EAAe,QAAUA,EAAe,SAAW,CAAC,EACpDA,EAAe,QAAQ,qBAAqB,EAAI,SAC5C,IAAI,OAAOA,EAAe,SAAS,EAAE,SAAS,QAAQ,GAG5DC,GAAM,wBAAwB,EAC9B,IAAIC,EAAalB,EAAK,QAAQgB,CAAc,EAC5CE,EAAW,4BAA8B,GACzCA,EAAW,KAAK,WAAYC,CAAU,EACtCD,EAAW,KAAK,UAAWE,CAAS,EACpCF,EAAW,KAAK,UAAWG,CAAS,EACpCH,EAAW,KAAK,QAASI,CAAO,EAChCJ,EAAW,IAAI,EAEf,SAASC,EAAWI,EAAK,CAEvBA,EAAI,QAAU,EAChB,CAHSzB,EAAAqB,EAAA,cAKT,SAASC,EAAUG,EAAKtB,EAAQuB,EAAM,CAEpC,QAAQ,SAAS,UAAW,CAC1BH,EAAUE,EAAKtB,EAAQuB,CAAI,CAC7B,CAAC,CACH,CALS1B,EAAAsB,EAAA,aAOT,SAASC,EAAUE,EAAKtB,EAAQuB,EAAM,CAIpC,GAHAN,EAAW,mBAAmB,EAC9BjB,EAAO,mBAAmB,EAEtBsB,EAAI,aAAe,IAAK,CAC1BN,GAAM,2DACJM,EAAI,UAAU,EAChBtB,EAAO,QAAQ,EACf,IAAIwB,EAAQ,IAAI,MAAM,yDACJF,EAAI,UAAU,EAChCE,EAAM,KAAO,aACb9B,EAAQ,QAAQ,KAAK,QAAS8B,CAAK,EACnCzB,EAAK,aAAae,CAAW,EAC7B,MACF,CACA,GAAIS,EAAK,OAAS,EAAG,CACnBP,GAAM,sCAAsC,EAC5ChB,EAAO,QAAQ,EACf,IAAIwB,EAAQ,IAAI,MAAM,sCAAsC,EAC5DA,EAAM,KAAO,aACb9B,EAAQ,QAAQ,KAAK,QAAS8B,CAAK,EACnCzB,EAAK,aAAae,CAAW,EAC7B,MACF,CACA,OAAAE,GAAM,sCAAsC,EAC5CjB,EAAK,QAAQA,EAAK,QAAQ,QAAQe,CAAW,CAAC,EAAId,EAC3Ca,EAAGb,CAAM,CAClB,CA3BSH,EAAAuB,EAAA,aA6BT,SAASC,EAAQI,EAAO,CACtBR,EAAW,mBAAmB,EAE9BD,GAAM;AAAA,EACAS,EAAM,QAASA,EAAM,KAAK,EAChC,IAAID,EAAQ,IAAI,MAAM,oDACWC,EAAM,OAAO,EAC9CD,EAAM,KAAO,aACb9B,EAAQ,QAAQ,KAAK,QAAS8B,CAAK,EACnCzB,EAAK,aAAae,CAAW,CAC/B,CAVSjB,EAAAwB,EAAA,UAWX,EAnFwC,gBAqFxCzB,GAAe,UAAU,aAAeC,EAAA,SAAsBG,EAAQ,CACpE,IAAI0B,EAAM,KAAK,QAAQ,QAAQ1B,CAAM,EACrC,GAAI0B,IAAQ,GAGZ,MAAK,QAAQ,OAAOA,EAAK,CAAC,EAE1B,IAAInB,EAAU,KAAK,SAAS,MAAM,EAC9BA,GAGF,KAAK,aAAaA,EAAS,SAASP,EAAQ,CAC1CO,EAAQ,QAAQ,SAASP,CAAM,CACjC,CAAC,EAEL,EAfwC,gBAiBxC,SAASF,GAAmBJ,EAASmB,EAAI,CACvC,IAAId,EAAO,KACXH,GAAe,UAAU,aAAa,KAAKG,EAAML,EAAS,SAASM,EAAQ,CACzE,IAAI2B,EAAajC,EAAQ,QAAQ,UAAU,MAAM,EAC7CkC,EAAanB,GAAa,CAAC,EAAGV,EAAK,QAAS,CAC9C,OAAQC,EACR,WAAY2B,EAAaA,EAAW,QAAQ,OAAQ,EAAE,EAAIjC,EAAQ,IACpE,CAAC,EAGGmC,EAAe7C,IAAI,QAAQ,EAAG4C,CAAU,EAC5C7B,EAAK,QAAQA,EAAK,QAAQ,QAAQC,CAAM,CAAC,EAAI6B,EAC7ChB,EAAGgB,CAAY,CACjB,CAAC,CACH,CAdShC,EAAAC,GAAA,sBAiBT,SAASM,GAAUH,EAAMC,EAAMC,EAAc,CAC3C,OAAI,OAAOF,GAAS,SACX,CACL,KAAMA,EACN,KAAMC,EACN,aAAcC,CAChB,EAEKF,CACT,CATSJ,EAAAO,GAAA,aAWT,SAASK,GAAaqB,EAAQ,CAC5B,QAASzB,EAAI,EAAGC,EAAM,UAAU,OAAQD,EAAIC,EAAK,EAAED,EAAG,CACpD,IAAI0B,EAAY,UAAU1B,CAAC,EAC3B,GAAI,OAAO0B,GAAc,SAEvB,QADIC,EAAO,OAAO,KAAKD,CAAS,EACvBE,EAAI,EAAGC,EAASF,EAAK,OAAQC,EAAIC,EAAQ,EAAED,EAAG,CACrD,IAAIE,EAAIH,EAAKC,CAAC,EACVF,EAAUI,CAAC,IAAM,SACnBL,EAAOK,CAAC,EAAIJ,EAAUI,CAAC,EAE3B,CAEJ,CACA,OAAOL,CACT,CAdSjC,EAAAY,GAAA,gBAiBT,IAAIO,GACA,QAAQ,IAAI,YAAc,aAAa,KAAK,QAAQ,IAAI,UAAU,EACpEA,GAAQnB,EAAA,UAAW,CACjB,IAAIuC,EAAO,MAAM,UAAU,MAAM,KAAK,SAAS,EAC3C,OAAOA,EAAK,CAAC,GAAM,SACrBA,EAAK,CAAC,EAAI,WALine truncated
|
||||
"names": ["require_tunnel", "__commonJSMin", "exports", "net", "tls", "http", "https", "events", "assert", "util", "httpOverHttp", "httpsOverHttp", "httpOverHttps", "httpsOverHttps", "options", "agent", "TunnelingAgent", "__name", "createSecureSocket", "self", "socket", "host", "port", "localAddress", "toOptions", "i", "len", "pending", "req", "mergeOptions", "onFree", "onCloseOrRemove", "err", "cb", "placeholder", "connectOptions", "debug", "connectReq", "onResponse", "onUpgrade", "onConnect", "onError", "res", "head", "error", "cause", "pos", "hostHeader", "tlsOptions", "secureSocket", "target", "overrides", "keys", "j", "keyLen", "k", "args", "require_tunnel", "__commonJSMin", "exports", "module", "require_symbols", "__commonJSMin", "exports", "module", "require_errors", "__commonJSMin", "exports", "module", "kUndiciError", "UndiciError", "__name", "message", "instance", "kConnectTimeoutError", "ConnectTimeoutError", "kHeadersTimeoutError", "HeadersTimeoutError", "kHeadersOverflowError", "HeadersOverflowError", "kBodyTimeoutError", "BodyTimeoutError", "kResponseStatusCodeError", "ResponseStatusCodeError", "statusCode", "headers", "body", "kInvalidArgumentError", "InvalidArgumentError", "kInvalidReturnValueError", "InvalidReturnValueError", "kAbortError", "AbortError", "kRequestAbortedError", "RequestAbortedError", "kInformationalError", "InformationalError", "kRequestContentLengthMismatchError", "RequestContentLengthMismatchError", "kResponseContentLengthMismatchError", "ResponseContentLengthMismatchError", "kClientDestroyedError", "ClientDestroyedError", "kClientClosedError", "ClientClosedError", "kSocketError", "SocketError", "socket", "kNotSupportedError", "NotSupportedError", "kBalancedPoolMissingUpstreamError", "BalancedPoolMissingUpstreamError", "kHTTPParserError", "HTTPParserError", "code", "data", "kResponseExceededMaxSizeError", "ResponseExceededMaxSizeError", "kRequestRetryError", "RequestRetryError", "kResponseError", "ResponseError", "kSecureProxyConnectionError", "SecureProxyConnectionError", "cause", "options", "kMessageSizeExceededError", "MessageSizeExceededError", "require_constants", "__commonJSMin", "exports", "module", "headerNameLowerCasedRecord", "wellknownHeaderNames", "i", "key", "lowerCasedKey", "require_tree", "__commonJSMin", "exports", "module", "wellknownHeaderNames", "headerNameLowerCasedRecord", "TstNode", "_TstNode", "__name", "key", "value", "index", "length", "node", "code", "keylength", "TernarySearchTree", "tree", "i", "require_util", "__commonJSMin", "exports", "module", "assert", "kDestroyed", "kBodyUsed", "kListeners", "kBody", "IncomingMessage", "stream", "net", "Blob", "nodeUtil", "stringify", "EE", "InvalidArgumentError", "headerNameLowerCasedRecord", "tree", "nodeMajor", "nodeMinor", "v", "BodyAsyncIterable", "__name", "body", "wrapRequestBody", "isStream", "bodyLength", "isIterable", "nop", "obj", "isBlobLike", "object", "sTag", "buildURL", "url", "queryParams", "stringified", "isValidPort", "port", "value", "isHttpOrHttpsPrefixed", "parseURL", "origin", "path", "parseOrigin", "getHostname", "host", "idx", "getServerName", "servername", "deepClone", "isAsyncIterable", "state", "isBuffer", "isDestroyed", "destroy", "err", "KEEPALIVE_TIMEOUT_EXPR", "parseKeepAliveTimeout", "val", "m", "headerNameToString", "bufferToLowerCasedHeaderName", "parseHeaders", "headers", "i", "key", "headersValue", "x", "parseRawHeaders", "len", "ret", "hasContentLength", "contentDispositionIdx", "kLen", "n", "buffer", "validateHandler", "handler", "method", "upgrade", "isDisturbed", "isErrored", "isReadable", "getSocketInfo", "socket", "ReadableStreamFrom", "iterable", "iterator", "controller", "done", "buf", "reason", "isFormDataLike", "addAbortListener", "signal", "listener", "hasToWellFormed", "hasIsWellFormed", "toUSVString", "isUSVString", "isTokenCharCode", "c", "isValidHTTPToken", "characters", "headerCharRegex", "isValidHeaderValue", "parseRangeHeader", "range", "addListener", "name", "removeAllListeners", "errorRequest", "client", "request", "kEnumerableProperty", "normalizedMethodRecordsBase", "normalizedMethodRecords", "require_diagnostics", "__commonJSMin", "exports", "module", "diagnosticsChannel", "util", "undiciDebugLog", "fetchDebuglog", "websocketDebuglog", "isClientSet", "channels", "debuglog", "evt", "version", "protocol", "port", "host", "error", "method", "path", "origin", "statusCode", "address", "websocket", "code", "reason", "err", "require_request", "__commonJSMin", "exports", "module", "InvalidArgumentError", "NotSupportedError", "assert", "isValidHTTPToken", "isValidHeaderValue", "isStream", "destroy", "isBuffer", "isFormDataLike", "isIterable", "isBlobLike", "buildURL", "validateHandler", "getServerName", "normalizedMethodRecords", "channels", "headerNameLowerCasedRecord", "invalidPathRegex", "kHandler", "Request", "__name", "origin", "path", "method", "body", "headers", "query", "idempotent", "blocking", "upgrade", "headersTimeout", "bodyTimeout", "resetLine truncated
|
||||
"sourcesContent": ["'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('Line truncated
|
||||
"mappings": "ipBAAA,IAAAA,GAAAC,EAAAC,IAAA,cAEA,IAAIC,IAAM,QAAQ,KAAK,EACnBC,IAAM,QAAQ,KAAK,EACnBC,GAAO,QAAQ,MAAM,EACrBC,GAAQ,QAAQ,OAAO,EACvBC,IAAS,QAAQ,QAAQ,EACzBC,IAAS,QAAQ,QAAQ,EACzBC,IAAO,QAAQ,MAAM,EAGzBP,GAAQ,aAAeQ,IACvBR,GAAQ,cAAgBS,IACxBT,GAAQ,cAAgBU,IACxBV,GAAQ,eAAiBW,IAGzB,SAASH,IAAaI,EAAS,CAC7B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUV,GAAK,QACdU,CACT,CAJSE,EAAAP,IAAA,gBAMT,SAASC,IAAcG,EAAS,CAC9B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUV,GAAK,QACrBU,EAAM,aAAeG,GACrBH,EAAM,YAAc,IACbA,CACT,CANSE,EAAAN,IAAA,iBAQT,SAASC,IAAcE,EAAS,CAC9B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUT,GAAM,QACfS,CACT,CAJSE,EAAAL,IAAA,iBAMT,SAASC,IAAeC,EAAS,CAC/B,IAAIC,EAAQ,IAAIC,GAAeF,CAAO,EACtC,OAAAC,EAAM,QAAUT,GAAM,QACtBS,EAAM,aAAeG,GACrBH,EAAM,YAAc,IACbA,CACT,CANSE,EAAAJ,IAAA,kBAST,SAASG,GAAeF,EAAS,CAC/B,IAAIK,EAAO,KACXA,EAAK,QAAUL,GAAW,CAAC,EAC3BK,EAAK,aAAeA,EAAK,QAAQ,OAAS,CAAC,EAC3CA,EAAK,WAAaA,EAAK,QAAQ,YAAcd,GAAK,MAAM,kBACxDc,EAAK,SAAW,CAAC,EACjBA,EAAK,QAAU,CAAC,EAEhBA,EAAK,GAAG,OAAQF,EAAA,SAAgBG,EAAQC,EAAMC,EAAMC,EAAc,CAEhE,QADIT,EAAUU,GAAUH,EAAMC,EAAMC,CAAY,EACvCE,EAAI,EAAGC,EAAMP,EAAK,SAAS,OAAQM,EAAIC,EAAK,EAAED,EAAG,CACxD,IAAIE,EAAUR,EAAK,SAASM,CAAC,EAC7B,GAAIE,EAAQ,OAASb,EAAQ,MAAQa,EAAQ,OAASb,EAAQ,KAAM,CAGlEK,EAAK,SAAS,OAAOM,EAAG,CAAC,EACzBE,EAAQ,QAAQ,SAASP,CAAM,EAC/B,MACF,CACF,CACAA,EAAO,QAAQ,EACfD,EAAK,aAAaC,CAAM,CAC1B,EAdgB,SAcf,CACH,CAvBSH,EAAAD,GAAA,kBAwBTP,IAAK,SAASO,GAAgBT,IAAO,YAAY,EAEjDS,GAAe,UAAU,WAAaC,EAAA,SAAoBW,EAAKP,EAAMC,EAAMC,EAAc,CACvF,IAAIJ,EAAO,KACPL,EAAUe,GAAa,CAAC,QAASD,CAAG,EAAGT,EAAK,QAASK,GAAUH,EAAMC,EAAMC,CAAY,CAAC,EAE5F,GAAIJ,EAAK,QAAQ,QAAU,KAAK,WAAY,CAE1CA,EAAK,SAAS,KAAKL,CAAO,EAC1B,MACF,CAGAK,EAAK,aAAaL,EAAS,SAASM,EAAQ,CAC1CA,EAAO,GAAG,OAAQU,CAAM,EACxBV,EAAO,GAAG,QAASW,CAAe,EAClCX,EAAO,GAAG,cAAeW,CAAe,EACxCH,EAAI,SAASR,CAAM,EAEnB,SAASU,GAAS,CAChBX,EAAK,KAAK,OAAQC,EAAQN,CAAO,CACnC,CAFSG,EAAAa,EAAA,UAIT,SAASC,EAAgBC,EAAK,CAC5Bb,EAAK,aAAaC,CAAM,EACxBA,EAAO,eAAe,OAAQU,CAAM,EACpCV,EAAO,eAAe,QAASW,CAAe,EAC9CX,EAAO,eAAe,cAAeW,CAAe,CACtD,CALSd,EAAAc,EAAA,kBAMX,CAAC,CACH,EA5BsC,cA8BtCf,GAAe,UAAU,aAAeC,EAAA,SAAsBH,EAASmB,EAAI,CACzE,IAAId,EAAO,KACPe,EAAc,CAAC,EACnBf,EAAK,QAAQ,KAAKe,CAAW,EAE7B,IAAIC,EAAiBN,GAAa,CAAC,EAAGV,EAAK,aAAc,CACvD,OAAQ,UACR,KAAML,EAAQ,KAAO,IAAMA,EAAQ,KACnC,MAAO,GACP,QAAS,CACP,KAAMA,EAAQ,KAAO,IAAMA,EAAQ,IACrC,CACF,CAAC,EACGA,EAAQ,eACVqB,EAAe,aAAerB,EAAQ,cAEpCqB,EAAe,YACjBA,EAAe,QAAUA,EAAe,SAAW,CAAC,EACpDA,EAAe,QAAQ,qBAAqB,EAAI,SAC5C,IAAI,OAAOA,EAAe,SAAS,EAAE,SAAS,QAAQ,GAG5DC,GAAM,wBAAwB,EAC9B,IAAIC,EAAalB,EAAK,QAAQgB,CAAc,EAC5CE,EAAW,4BAA8B,GACzCA,EAAW,KAAK,WAAYC,CAAU,EACtCD,EAAW,KAAK,UAAWE,CAAS,EACpCF,EAAW,KAAK,UAAWG,CAAS,EACpCH,EAAW,KAAK,QAASI,CAAO,EAChCJ,EAAW,IAAI,EAEf,SAASC,EAAWI,EAAK,CAEvBA,EAAI,QAAU,EAChB,CAHSzB,EAAAqB,EAAA,cAKT,SAASC,EAAUG,EAAKtB,EAAQuB,EAAM,CAEpC,QAAQ,SAAS,UAAW,CAC1BH,EAAUE,EAAKtB,EAAQuB,CAAI,CAC7B,CAAC,CACH,CALS1B,EAAAsB,EAAA,aAOT,SAASC,EAAUE,EAAKtB,EAAQuB,EAAM,CAIpC,GAHAN,EAAW,mBAAmB,EAC9BjB,EAAO,mBAAmB,EAEtBsB,EAAI,aAAe,IAAK,CAC1BN,GAAM,2DACJM,EAAI,UAAU,EAChBtB,EAAO,QAAQ,EACf,IAAIwB,EAAQ,IAAI,MAAM,yDACJF,EAAI,UAAU,EAChCE,EAAM,KAAO,aACb9B,EAAQ,QAAQ,KAAK,QAAS8B,CAAK,EACnCzB,EAAK,aAAae,CAAW,EAC7B,MACF,CACA,GAAIS,EAAK,OAAS,EAAG,CACnBP,GAAM,sCAAsC,EAC5ChB,EAAO,QAAQ,EACf,IAAIwB,EAAQ,IAAI,MAAM,sCAAsC,EAC5DA,EAAM,KAAO,aACb9B,EAAQ,QAAQ,KAAK,QAAS8B,CAAK,EACnCzB,EAAK,aAAae,CAAW,EAC7B,MACF,CACA,OAAAE,GAAM,sCAAsC,EAC5CjB,EAAK,QAAQA,EAAK,QAAQ,QAAQe,CAAW,CAAC,EAAId,EAC3Ca,EAAGb,CAAM,CAClB,CA3BSH,EAAAuB,EAAA,aA6BT,SAASC,EAAQI,EAAO,CACtBR,EAAW,mBAAmB,EAE9BD,GAAM;AAAA,EACAS,EAAM,QAASA,EAAM,KAAK,EAChC,IAAID,EAAQ,IAAI,MAAM,oDACWC,EAAM,OAAO,EAC9CD,EAAM,KAAO,aACb9B,EAAQ,QAAQ,KAAK,QAAS8B,CAAK,EACnCzB,EAAK,aAAae,CAAW,CAC/B,CAVSjB,EAAAwB,EAAA,UAWX,EAnFwC,gBAqFxCzB,GAAe,UAAU,aAAeC,EAAA,SAAsBG,EAAQ,CACpE,IAAI0B,EAAM,KAAK,QAAQ,QAAQ1B,CAAM,EACrC,GAAI0B,IAAQ,GAGZ,MAAK,QAAQ,OAAOA,EAAK,CAAC,EAE1B,IAAInB,EAAU,KAAK,SAAS,MAAM,EAC9BA,GAGF,KAAK,aAAaA,EAAS,SAASP,EAAQ,CAC1CO,EAAQ,QAAQ,SAASP,CAAM,CACjC,CAAC,EAEL,EAfwC,gBAiBxC,SAASF,GAAmBJ,EAASmB,EAAI,CACvC,IAAId,EAAO,KACXH,GAAe,UAAU,aAAa,KAAKG,EAAML,EAAS,SAASM,EAAQ,CACzE,IAAI2B,EAAajC,EAAQ,QAAQ,UAAU,MAAM,EAC7CkC,EAAanB,GAAa,CAAC,EAAGV,EAAK,QAAS,CAC9C,OAAQC,EACR,WAAY2B,EAAaA,EAAW,QAAQ,OAAQ,EAAE,EAAIjC,EAAQ,IACpE,CAAC,EAGGmC,EAAe7C,IAAI,QAAQ,EAAG4C,CAAU,EAC5C7B,EAAK,QAAQA,EAAK,QAAQ,QAAQC,CAAM,CAAC,EAAI6B,EAC7ChB,EAAGgB,CAAY,CACjB,CAAC,CACH,CAdShC,EAAAC,GAAA,sBAiBT,SAASM,GAAUH,EAAMC,EAAMC,EAAc,CAC3C,OAAI,OAAOF,GAAS,SACX,CACL,KAAMA,EACN,KAAMC,EACN,aAAcC,CAChB,EAEKF,CACT,CATSJ,EAAAO,GAAA,aAWT,SAASK,GAAaqB,EAAQ,CAC5B,QAASzB,EAAI,EAAGC,EAAM,UAAU,OAAQD,EAAIC,EAAK,EAAED,EAAG,CACpD,IAAI0B,EAAY,UAAU1B,CAAC,EAC3B,GAAI,OAAO0B,GAAc,SAEvB,QADIC,EAAO,OAAO,KAAKD,CAAS,EACvBE,EAAI,EAAGC,EAASF,EAAK,OAAQC,EAAIC,EAAQ,EAAED,EAAG,CACrD,IAAIE,EAAIH,EAAKC,CAAC,EACVF,EAAUI,CAAC,IAAM,SACnBL,EAAOK,CAAC,EAAIJ,EAAUI,CAAC,EAE3B,CAEJ,CACA,OAAOL,CACT,CAdSjC,EAAAY,GAAA,gBAiBT,IAAIO,GACA,QAAQ,IAAI,YAAc,aAAa,KAAK,QAAQ,IAAI,UAAU,EACpEA,GAAQnB,EAAA,UAAW,CACjB,IAAIuC,EAAO,MAAM,UAAU,MAAM,KAAK,SAAS,EAC3C,OAAOA,EAAK,CAAC,GAAM,SACrBA,EAAK,CAAC,EAAI,WALine truncated
|
||||
"names": ["require_tunnel", "__commonJSMin", "exports", "net", "tls", "http", "https", "events", "assert", "util", "httpOverHttp", "httpsOverHttp", "httpOverHttps", "httpsOverHttps", "options", "agent", "TunnelingAgent", "__name", "createSecureSocket", "self", "socket", "host", "port", "localAddress", "toOptions", "i", "len", "pending", "req", "mergeOptions", "onFree", "onCloseOrRemove", "err", "cb", "placeholder", "connectOptions", "debug", "connectReq", "onResponse", "onUpgrade", "onConnect", "onError", "res", "head", "error", "cause", "pos", "hostHeader", "tlsOptions", "secureSocket", "target", "overrides", "keys", "j", "keyLen", "k", "args", "require_tunnel", "__commonJSMin", "exports", "module", "require_symbols", "__commonJSMin", "exports", "module", "require_errors", "__commonJSMin", "exports", "module", "kUndiciError", "UndiciError", "__name", "message", "instance", "kConnectTimeoutError", "ConnectTimeoutError", "kHeadersTimeoutError", "HeadersTimeoutError", "kHeadersOverflowError", "HeadersOverflowError", "kBodyTimeoutError", "BodyTimeoutError", "kResponseStatusCodeError", "ResponseStatusCodeError", "statusCode", "headers", "body", "kInvalidArgumentError", "InvalidArgumentError", "kInvalidReturnValueError", "InvalidReturnValueError", "kAbortError", "AbortError", "kRequestAbortedError", "RequestAbortedError", "kInformationalError", "InformationalError", "kRequestContentLengthMismatchError", "RequestContentLengthMismatchError", "kResponseContentLengthMismatchError", "ResponseContentLengthMismatchError", "kClientDestroyedError", "ClientDestroyedError", "kClientClosedError", "ClientClosedError", "kSocketError", "SocketError", "socket", "kNotSupportedError", "NotSupportedError", "kBalancedPoolMissingUpstreamError", "BalancedPoolMissingUpstreamError", "kHTTPParserError", "HTTPParserError", "code", "data", "kResponseExceededMaxSizeError", "ResponseExceededMaxSizeError", "kRequestRetryError", "RequestRetryError", "kResponseError", "ResponseError", "kSecureProxyConnectionError", "SecureProxyConnectionError", "cause", "options", "kMessageSizeExceededError", "MessageSizeExceededError", "require_constants", "__commonJSMin", "exports", "module", "headerNameLowerCasedRecord", "wellknownHeaderNames", "i", "key", "lowerCasedKey", "require_tree", "__commonJSMin", "exports", "module", "wellknownHeaderNames", "headerNameLowerCasedRecord", "TstNode", "_TstNode", "__name", "key", "value", "index", "length", "node", "code", "keylength", "TernarySearchTree", "tree", "i", "require_util", "__commonJSMin", "exports", "module", "assert", "kDestroyed", "kBodyUsed", "kListeners", "kBody", "IncomingMessage", "stream", "net", "Blob", "nodeUtil", "stringify", "EE", "InvalidArgumentError", "headerNameLowerCasedRecord", "tree", "nodeMajor", "nodeMinor", "v", "BodyAsyncIterable", "__name", "body", "wrapRequestBody", "isStream", "bodyLength", "isIterable", "nop", "obj", "isBlobLike", "object", "sTag", "buildURL", "url", "queryParams", "stringified", "isValidPort", "port", "value", "isHttpOrHttpsPrefixed", "parseURL", "origin", "path", "parseOrigin", "getHostname", "host", "idx", "getServerName", "servername", "deepClone", "isAsyncIterable", "state", "isBuffer", "isDestroyed", "destroy", "err", "KEEPALIVE_TIMEOUT_EXPR", "parseKeepAliveTimeout", "val", "m", "headerNameToString", "bufferToLowerCasedHeaderName", "parseHeaders", "headers", "i", "key", "headersValue", "x", "parseRawHeaders", "len", "ret", "hasContentLength", "contentDispositionIdx", "kLen", "n", "buffer", "validateHandler", "handler", "method", "upgrade", "isDisturbed", "isErrored", "isReadable", "getSocketInfo", "socket", "ReadableStreamFrom", "iterable", "iterator", "controller", "done", "buf", "reason", "isFormDataLike", "addAbortListener", "signal", "listener", "hasToWellFormed", "hasIsWellFormed", "toUSVString", "isUSVString", "isTokenCharCode", "c", "isValidHTTPToken", "characters", "headerCharRegex", "isValidHeaderValue", "parseRangeHeader", "range", "addListener", "name", "removeAllListeners", "errorRequest", "client", "request", "kEnumerableProperty", "normalizedMethodRecordsBase", "normalizedMethodRecords", "require_diagnostics", "__commonJSMin", "exports", "module", "diagnosticsChannel", "util", "undiciDebugLog", "fetchDebuglog", "websocketDebuglog", "isClientSet", "channels", "debuglog", "evt", "version", "protocol", "port", "host", "error", "method", "path", "origin", "statusCode", "address", "websocket", "code", "reason", "err", "require_request", "__commonJSMin", "exports", "module", "InvalidArgumentError", "NotSupportedError", "assert", "isValidHTTPToken", "isValidHeaderValue", "isStream", "destroy", "isBuffer", "isFormDataLike", "isIterable", "isBlobLike", "buildURL", "validateHandler", "getServerName", "normalizedMethodRecords", "channels", "headerNameLowerCasedRecord", "invalidPathRegex", "kHandler", "Request", "__name", "origin", "path", "method", "body", "headers", "query", "idempotent", "blocking", "upgrade", "headersTimeout", "bodyTimeout", "resetLine truncated
|
||||
}
|
||||
+1
-1
@@ -3601,7 +3601,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
|
||||
The following npm package may be included in this product:
|
||||
|
||||
- undici@6.27.0
|
||||
- undici@6.28.0
|
||||
|
||||
This package contains the following license:
|
||||
|
||||
|
||||
Reference in new issue
Block a user