|
|
|
@@ -1,118 +1,140 @@
|
|
|
|
|
var NTe=Object.create;var ab=Object.defineProperty;var TTe=Object.getOwnPropertyDescriptor;var PTe=Object.getOwnPropertyNames;var QTe=Object.getPrototypeOf,_Te=Object.prototype.hasOwnProperty;var _=(t,e)=>()=>(t&&(e=t(t=0)),e);var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),hn=(t,e)=>{for(var r in e)ab(t,r,{get:e[r],enumerable:!0})},m3=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of PTe(e))!_Te.call(t,s)&&s!==r&&ab(t,s,{get:()=>e[s],enumerable:!(n=TTe(e,s))||n.enumerable});return t};var S=(t,e,r)=>(r=t!=null?NTe(QTe(t)):{},m3(e||!t||!t.__esModule?ab(r,"default",{value:t,enumerable:!0}):r,t)),Ze=t=>m3(ab({},"__esModule",{value:!0}),t);var x3=C(LA=>{"use strict";var kTt=require("net"),FTe=require("tls"),Qv=require("http"),C3=require("https"),MTe=require("events"),LTt=require("assert"),UTe=require("util");LA.httpOverHttp=qTe;LA.httpsOverHttp=$Te;LA.httpOverHttps=GTe;LA.httpsOverHttps=HTe;function qTe(t){var e=new Ec(t);return e.request=Qv.request,e}function $Te(t){var e=new Ec(t);return e.request=Qv.request,e.createSocket=I3,e.defaultPort=443,e}function GTe(t){var e=new Ec(t);return e.request=C3.request,e}function HTe(t){var e=new Ec(t);return e.request=C3.request,e.createSocket=I3,e.defaultPort=443,e}function Ec(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||Qv.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(n,s,o,i){for(var a=b3(s,o,i),c=0,l=e.requests.length;c<l;++c){var u=e.requests[c];if(u.host===a.host&&u.port===a.port){e.requests.splice(c,1),u.request.onSocket(n);return}}n.destroy(),e.removeSocket(n)})}UTe.inherits(Ec,MTe.EventEmitter);Ec.prototype.addRequest=function(e,r,n,s){var o=this,i=_v({request:e},o.options,b3(r,n,s));if(o.sockets.length>=this.maxSockets){o.requests.push(i);return}o.createSocket(i,function(a){a.on("free",c),a.on("close",l),a.on("agentRemove",l),e.onSocket(a);function c(){o.emit("free",a,i)}function l(u){o.removeSocket(a),a.removeListener("free",c),a.removeListener("close",l),a.removeListener("agentRemove",l)}})};Ec.prototype.createSocket=function(e,r){var n=this,s={};n.sockets.push(s);var o=_v({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(o.localAddress=e.localAddress),o.proxyAuth&&(o.headers=o.headers||{},o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")),Dl("making CONNECT request");var i=n.request(o);i.useChunkedEncodingByDefault=!1,i.once("response",a),i.once("upgrade",c),i.once("connect",l),i.once("error",u),i.end();function a(d){d.upgrade=!0}function c(d,p,A){process.nextTick(function(){l(d,p,A)})}function l(d,p,A){if(i.removeAllListeners(),p.removeAllListeners(),d.statusCode!==200){Dl("tunneling socket could not be established, statusCode=%d",d.statusCode),p.destroy();var g=new Error("tunneling socket could not be established, statusCode="+d.statusCode);g.code="ECONNRESET",e.request.emit("error",g),n.removeSocket(s);return}if(A.length>0){Dl("got illegal response body from proxy"),p.destroy();var g=new Error("got illegal response body from proxy");g.code="ECONNRESET",e.request.emit("error",g),n.removeSocket(s);return}return Dl("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=p,r(p)}function u(d){i.removeAllListeners(),Dl(`tunneling socket could not be established, cause=%s
|
|
|
|
|
`,d.message,d.stack);var p=new Error("tunneling socket could not be established, cause="+d.message);p.code="ECONNRESET",e.request.emit("error",p),n.removeSocket(s)}};Ec.prototype.removeSocket=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)})}};function I3(t,e){var r=this;Ec.prototype.createSocket.call(r,t,function(n){var s=t.request.getHeader("host"),o=_v({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):t.host}),i=FTe.connect(0,o);r.sockets[r.sockets.indexOf(n)]=i,e(i)})}function b3(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function _v(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),o=0,i=s.length;o<i;++o){var a=s[o];n[a]!==void 0&&(t[a]=n[a])}}return t}var Dl;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Dl=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)}:Dl=function(){};LA.debug=Dl});var vv=C((FTt,w3)=>{w3.exports=x3()});var Yt=C((MTt,B3)=>{B3.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 ft=C((UTt,J3)=>{"use strict";var S3=Symbol.for("undici.error.UND_ERR"),jt=class extends Error{constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[S3]===!0}[S3]=!0},R3=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),Dv=class extends jt{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[R3]===!0}[R3]=!0},N3=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),kv=class extends jt{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[N3]===!0}[N3]=!0},T3=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),Lv=class extends jt{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[T3]===!0}[T3]=!0},P3=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),Ov=class extends jt{constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&e[P3]===!0}[P3]=!0},Q3=Symbol.for("undici.error.UND_ERR_RESPONSE_STATUS_CODE"),Fv=class extends jt{constructor(e,r,n,s){super(e),this.name="ResponseStatusCodeError",this.message=e||"Response Status Code Error",this.code="UND_ERR_RESPONSE_STATUS_CODE",this.body=s,this.st
Line truncated
|
|
|
|
|
`)||t.includes("\r")||t.includes("\0"))===!1}function i_e(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),s="";if(n.length>0)for(let o=n.length;o!==0;o--){let i=n[o-1].trim();if(HQe.has(i)){s=i;break}}s!==""&&(t.referrerPolicy=s)}function a_e(){return"allowed"}function c_e(){return"success"}function l_e(){return"success"}function u_e(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}function d_e(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&&TD(t.origin)&&!TD(ah(t))&&(e=null);break;case"same-origin":Qb(t,ah(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}function VA(t,e){return t}function p_e(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:VA(t.domainLookupStartTime,r),domainLookupEndTime:VA(t.domainLookupEndTime,r),connectionStartTime:VA(t.connectionStartTime,r),connectionEndTime:VA(t.connectionEndTime,r),secureConnectionStartTime:VA(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}function A_e(t){return VA(WQe.now(),t)}function m_e(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}}function uK(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function f_e(t){return{referrerPolicy:t.referrerPolicy}}function g_e(t){let e=t.referrerPolicy;wd(e);let r=null;if(t.referrer==="client"){let a=sK();if(!a||a.origin==="null")return"no-referrer";r=new URL(a)}else t.referrer instanceof URL&&(r=t.referrer);let n=ND(r),s=ND(r,!0);n.toString().length>4096&&(n=s);let o=Qb(t,n),i=ih(n)&&!ih(t.url);switch(e){case"origin":return s??ND(r,!0);case"unsafe-url":return n;case"same-origin":return o?s:"no-referrer";case"origin-when-cross-origin":return o?n:s;case"strict-origin-when-cross-origin":{let a=ah(t);return Qb(n,a)?n:ih(n)&&!ih(a)?"no-referrer":s}default:return i?"no-referrer":s}}function ND(t,e){return wd(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)}function ih(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"))}}function h_e(t,e){if(Pb===void 0)return!0;let r=dK(e);if(r==="no metadata"||r.length===0)return!0;let n=E_e(r),s=C_e(r,n);for(let o of s){let i=o.algo,a=o.hash,c=Pb.createHash(i).update(t).digest("base64");if(c[c.length-1]==="="&&(c[c.length-2]==="="?c=c.slice(0,-2):c=c.slice(0,-1)),I_e(c,a))return!0}return!1}var y_e=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function dK(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let s=y_e.exec(n);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let o=s.groups.algo.toLowerCase();iK.includes(o)&&e.push(s.groups)}return r===!0?"no metadata":e}function E_e(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}function C_e(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}function I_e(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}function b_e(t){}function Qb(t,e){return t.origin===e.origin&&t.origin==="null"||t.protocol===e.protocol&&t.hostname===e.hostname&&t.port===e.port}function x_e(){let t,e;return{promise:new Promise((n,s)=>{t=n,e=s}),resolve:t,reject:e}}function w_e(t){return t.controller.state==="aborted"}function B_e(t){return t.controller.state==="aborted"||t.controller.state==="terminated"}function S_e(t){return XQe[t.toLowerCase()]??t}function R_e(t){let e=JSON.stringify(t);if(e===void 0)throw new TypeError("Value is not JSON serializable");return wd(typeof e=="string"),e}var N_e=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function pK(t,e,r=0,n=1){class s{#e;#t;
Line truncated
|
|
|
|
|
`);function sve(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}function ove(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}function ive(t,e){vb(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=[],o={position:0};for(;t[o.position]===13&&t[o.position+1]===10;)o.position+=2;let i=t.length;for(;t[i-1]===10&&t[i-2]===13;)i-=2;for(i!==t.length&&(t=t.subarray(0,i));;){if(t.subarray(o.position,o.position+n.length).equals(n))o.position+=n.length;else return"failure";if(o.position===t.length-2&&Db(t,rve,o)||o.position===t.length-4&&Db(t,nve,o))return s;if(t[o.position]!==13||t[o.position+1]!==10)return"failure";o.position+=2;let a=ave(t,o);if(a==="failure")return"failure";let{name:c,filename:l,contentType:u,encoding:d}=a;o.position+=2;let p;{let g=t.indexOf(n.subarray(2),o.position);if(g===-1)return"failure";p=t.subarray(o.position,g-4),o.position+=p.length,d==="base64"&&(p=Buffer.from(p.toString(),"base64"))}if(t[o.position]!==13||t[o.position+1]!==10)return"failure";o.position+=2;let A;l!==null?(u??="text/plain",sve(u)||(u=""),A=new eve([p],l,{type:u})):A=W_e(Buffer.from(p)),vb(wK(c)),vb(typeof A=="string"&&wK(A)||K_e(A)),s.push(X_e(c,A,l))}}function ave(t,e){let r=null,n=null,s=null,o=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:s,encoding:o};let i=jA(a=>a!==10&&a!==13&&a!==58,t,e);if(i=LD(i,!0,!0,a=>a===9||a===32),!J_e.test(i.toString())||t[e.position]!==58)return"failure";switch(e.position++,jA(a=>a===32||a===9,t,e),j_e(i)){case"content-disposition":{if(r=n=null,!Db(t,tve,e)||(e.position+=17,r=RK(t,e),r===null))return"failure";if(Db(t,SK,e)){let a=e.position+SK.length;if(t[a]===42&&(e.position+=1,a+=1),t[a]!==61||t[a+1]!==34||(e.position+=12,n=RK(t,e),n===null))return"failure"}break}case"content-type":{let a=jA(c=>c!==10&&c!==13,t,e);a=LD(a,!1,!0,c=>c===9||c===32),s=BK(a);break}case"content-transfer-encoding":{let a=jA(c=>c!==10&&c!==13,t,e);a=LD(a,!1,!0,c=>c===9||c===32),o=BK(a);break}default:jA(a=>a!==10&&a!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}function RK(t,e){vb(t[e.position-1]===34);let r=jA(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)}function jA(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}function LD(t,e,r,n){let s=0,o=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;o>0&&n(t[o]);)o--;return s===0&&o===t.length-1?t:t.subarray(s,o+1)}function Db(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}NK.exports={multipartFormDataParser:ive,validateBoundary:ove}});var KA=C((dPt,MK)=>{"use strict";var uh=tt(),{ReadableStreamFrom:cve,isBlobLike:PK,isReadableStreamLike:lve,readableStreamClose:uve,createDeferredPromise:dve,fullyReadBody:pve,extractMimeType:Ave,utf8DecodeBytes:vK}=Gs(),{FormData:QK}=lh(),{kState:JA}=kl(),{webidl:mve}=yn(),{Blob:fve}=require("node:buffer"),OD=require("node:assert"),{isErrored:DK,isDisturbed:gve}=require("node:stream"),{isArrayBuffer:hve}=require("node:util/types"),{serializeAMimeType:yve}=bs(),{multipartFormDataParser:Eve}=TK(),FD;try{let t=require("node:crypto");FD=e=>t.randomInt(0,e)}catch{FD=t=>Math.floor(Math.random(t))}var kb=new TextEncoder;function Cve(){}var kK=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,LK;kK&&(LK=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!gve(e)&&!DK(e)&&e.cancel("Response object has been garbage collected").catch(Cve)}));function OK(t,e=!1){let r=null;t instanceof ReadableStream?r=t:PK(t)?r=t.stream():r=new ReadableStream({async pull(c){let l=typeof s=="string"?kb.encode(s):s;l.byteLength&&c.enqueue(l),queueMicrotask(()=>uve(c))},start(){},type:"bytes"}),OD(lve(r));let n=null,s=null,o=null,i=null;if(typeof t=="string")s=t,i="text/plain;charset=UTF-8";else if(t instanceof URLSearchParams)s=t.toString(),i="application/x-www-form-urlencoded;charset=UTF-8";else if(hve(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(uh.isFormDataLike(t)){let c=`----formdata-undici-0${`${FD(1e11)}`.padStart(11,"0")}`,l=`--${c}\r
|
|
|
|
|
Content-Disposition: form-data`;let u=I=>I.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),d=I=>I.replace(/\r?\n|\r/g,`\r
|
|
|
|
|
`),p=[],A=new Uint8Array([13,10]);o=0;let g=!1;for(let[I,x]of t)if(typeof x=="string"){let b=kb.encode(l+`; name="${u(d(I))}"\r
|
|
|
|
|
var pGe=Object.create;var ky=Object.defineProperty;var mGe=Object.getOwnPropertyDescriptor;var fGe=Object.getOwnPropertyNames;var AGe=Object.getPrototypeOf,hGe=Object.prototype.hasOwnProperty;var i=(t,e)=>ky(t,"name",{value:e,configurable:!0});var g=(t,e)=>()=>(t&&(e=t(t=0)),e);var I=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Dr=(t,e)=>{for(var r in e)ky(t,r,{get:e[r],enumerable:!0})},j9=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of fGe(e))!hGe.call(t,s)&&s!==r&&ky(t,s,{get:()=>e[s],enumerable:!(n=mGe(e,s))||n.enumerable});return t};var R=(t,e,r)=>(r=t!=null?pGe(AGe(t)):{},j9(e||!t||!t.__esModule?ky(r,"default",{value:t,enumerable:!0}):r,t)),ee=t=>j9(ky({},"__esModule",{value:!0}),t);var oK=I(Lf=>{"use strict";var fHt=require("net"),wGe=require("tls"),gM=require("http"),rK=require("https"),SGe=require("events"),AHt=require("assert"),xGe=require("util");Lf.httpOverHttp=bGe;Lf.httpsOverHttp=BGe;Lf.httpOverHttps=RGe;Lf.httpsOverHttps=NGe;function bGe(t){var e=new ul(t);return e.request=gM.request,e}i(bGe,"httpOverHttp");function BGe(t){var e=new ul(t);return e.request=gM.request,e.createSocket=nK,e.defaultPort=443,e}i(BGe,"httpsOverHttp");function RGe(t){var e=new ul(t);return e.request=rK.request,e}i(RGe,"httpOverHttps");function NGe(t){var e=new ul(t);return e.request=rK.request,e.createSocket=nK,e.defaultPort=443,e}i(NGe,"httpsOverHttps");function ul(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||gM.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",i(function(n,s,o,a){for(var c=sK(s,o,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"))}i(ul,"TunnelingAgent");xGe.inherits(ul,SGe.EventEmitter);ul.prototype.addRequest=i(function(e,r,n,s){var o=this,a=yM({request:e},o.options,sK(r,n,s));if(o.sockets.length>=this.maxSockets){o.requests.push(a);return}o.createSocket(a,function(c){c.on("free",l),c.on("close",u),c.on("agentRemove",u),e.onSocket(c);function l(){o.emit("free",c,a)}i(l,"onFree");function u(d){o.removeSocket(c),c.removeListener("free",l),c.removeListener("close",u),c.removeListener("agentRemove",u)}i(u,"onCloseOrRemove")})},"addRequest");ul.prototype.createSocket=i(function(e,r){var n=this,s={};n.sockets.push(s);var o=yM({},n.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(o.localAddress=e.localAddress),o.proxyAuth&&(o.headers=o.headers||{},o.headers["Proxy-Authorization"]="Basic "+new Buffer(o.proxyAuth).toString("base64")),yu("making CONNECT request");var a=n.request(o);a.useChunkedEncodingByDefault=!1,a.once("response",c),a.once("upgrade",l),a.once("connect",u),a.once("error",d),a.end();function c(p){p.upgrade=!0}i(c,"onResponse");function l(p,m,f){process.nextTick(function(){u(p,m,f)})}i(l,"onUpgrade");function u(p,m,f){if(a.removeAllListeners(),m.removeAllListeners(),p.statusCode!==200){yu("tunneling socket could not be established, statusCode=%d",p.statusCode),m.destroy();var A=new Error("tunneling socket could not be established, statusCode="+p.statusCode);A.code="ECONNRESET",e.request.emit("error",A),n.removeSocket(s);return}if(f.length>0){yu("got illegal response body from proxy"),m.destroy();var A=new Error("got illegal response body from proxy");A.code="ECONNRESET",e.request.emit("error",A),n.removeSocket(s);return}return yu("tunneling connection has established"),n.sockets[n.sockets.indexOf(s)]=m,r(m)}i(u,"onConnect");function d(p){a.removeAllListeners(),yu(`tunneling socket could not be established, cause=%s
|
|
|
|
|
`,p.message,p.stack);var m=new Error("tunneling socket could not be established, cause="+p.message);m.code="ECONNRESET",e.request.emit("error",m),n.removeSocket(s)}i(d,"onError")},"createSocket");ul.prototype.removeSocket=i(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 nK(t,e){var r=this;ul.prototype.createSocket.call(r,t,function(n){var s=t.request.getHeader("host"),o=yM({},r.options,{socket:n,servername:s?s.replace(/:.*$/,""):t.host}),a=wGe.connect(0,o);r.sockets[r.sockets.indexOf(n)]=a,e(a)})}i(nK,"createSecureSocket");function sK(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}i(sK,"toOptions");function yM(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),o=0,a=s.length;o<a;++o){var c=s[o];n[c]!==void 0&&(t[c]=n[c])}}return t}i(yM,"mergeOptions");var yu;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?yu=i(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"):yu=i(function(){},"debug");Lf.debug=yu});var Of=I((yHt,iK)=>{iK.exports=oK()});var Lt=I((EHt,aK)=>{aK.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 rt=I((CHt,QK)=>{"use strict";var cK=Symbol.for("undici.error.UND_ERR"),Ot=class extends Error{static{i(this,"UndiciError")}constructor(e){super(e),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&e[cK]===!0}[cK]=!0},lK=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT"),EM=class extends Ot{static{i(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[lK]===!0}[lK]=!0},uK=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT"),CM=class extends Ot{static{i(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[uK]===!0}[uK]=!0},dK=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW"),IM=class extends Ot{static{i(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[dK]===!0}[dK]=!0},pK=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT"),wM=class extends Ot{static{i(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}i(zX,"isValidHeaderValue");function $$e(t,e){let{headersList:r}=e,n=(r.get("referrer-policy",!0)??"").split(","),s="";if(n.length>0)for(let o=n.length;o!==0;o--){let a=n[o-1].trim();if(N$e.has(a)){s=a;break}}s!==""&&(t.referrerPolicy=s)}i($$e,"setRequestReferrerPolicyOnRedirect");function z$e(){return"allowed"}i(z$e,"crossOriginResourcePolicyCheck");function V$e(){return"success"}i(V$e,"corsCheck");function W$e(){return"success"}i(W$e,"TAOCheck");function Y$e(t){let e=null;e=t.mode,t.headersList.set("sec-fetch-mode",e,!0)}i(Y$e,"appendFetchMetadata");function J$e(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&&AF(t.origin)&&!AF($y(t))&&(e=null);break;case"same-origin":sb(t,$y(t))||(e=null);break;default:}t.headersList.append("origin",e,!0)}}}i(J$e,"appendRequestOriginHeader");function Wf(t,e){return t}i(Wf,"coarsenTime");function j$e(t,e,r){return!t?.startTime||t.startTime<e?{domainLookupStartTime:e,domainLookupEndTime:e,connectionStartTime:e,connectionEndTime:e,secureConnectionStartTime:e,ALPNNegotiatedProtocol:t?.ALPNNegotiatedProtocol}:{domainLookupStartTime:Wf(t.domainLookupStartTime,r),domainLookupEndTime:Wf(t.domainLookupEndTime,r),connectionStartTime:Wf(t.connectionStartTime,r),connectionEndTime:Wf(t.connectionEndTime,r),secureConnectionStartTime:Wf(t.secureConnectionStartTime,r),ALPNNegotiatedProtocol:t.ALPNNegotiatedProtocol}}i(j$e,"clampAndCoarsenConnectionTimingInfo");function K$e(t){return Wf(_$e.now(),t)}i(K$e,"coarsenedSharedCurrentTime");function X$e(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}}i(X$e,"createOpaqueTimingInfo");function VX(){return{referrerPolicy:"strict-origin-when-cross-origin"}}i(VX,"makePolicyContainer");function Z$e(t){return{referrerPolicy:t.referrerPolicy}}i(Z$e,"clonePolicyContainer");function eze(t){let e=t.referrerPolicy;gp(e);let r=null;if(t.referrer==="client"){let c=UX();if(!c||c.origin==="null")return"no-referrer";r=new URL(c)}else t.referrer instanceof URL&&(r=t.referrer);let n=fF(r),s=fF(r,!0);n.toString().length>4096&&(n=s);let o=sb(t,n),a=Hy(n)&&!Hy(t.url);switch(e){case"origin":return s??fF(r,!0);case"unsafe-url":return n;case"same-origin":return o?s:"no-referrer";case"origin-when-cross-origin":return o?n:s;case"strict-origin-when-cross-origin":{let c=$y(t);return sb(n,c)?n:Hy(n)&&!Hy(c)?"no-referrer":s}default:return a?"no-referrer":s}}i(eze,"determineRequestsReferrer");function fF(t,e){return gp(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)}i(fF,"stripURLForReferrer");function Hy(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"))}}i(Hy,"isURLPotentiallyTrustworthy");function tze(t,e){if(nb===void 0)return!0;let r=WX(e);if(r==="no metadata"||r.length===0)return!0;let n=nze(r),s=sze(r,n);for(let o of s){let a=o.algo,c=o.hash,l=nb.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)),oze(l,c))return!0}return!1}i(tze,"bytesMatch");var rze=/(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;function WX(t){let e=[],r=!0;for(let n of t.split(" ")){r=!1;let s=rze.exec(n);if(s===null||s.groups===void 0||s.groups.algo===void 0)continue;let o=s.groups.algo.toLowerCase();GX.includes(o)&&e.push(s.groups)}return r===!0?"no metadata":e}i(WX,"parseMetadata");function nze(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}i(nze,"getStrongestMetadata");function sze(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}i(sze,"filterMetadataListByAlgorithm");function oze(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}i(oze,"compareBase64Mixed");function ize(t){}i(ize,"tryUpgradeReque
Line truncated
|
|
|
|
|
`);function Gze(t){for(let e=0;e<t.length;++e)if((t.charCodeAt(e)&-128)!==0)return!1;return!0}i(Gze,"isAsciiString");function Hze(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}i(Hze,"validateBoundary");function $ze(t,e){ib(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=[],o={position:0};for(;t[o.position]===13&&t[o.position+1]===10;)o.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(o.position,o.position+n.length).equals(n))o.position+=n.length;else return"failure";if(o.position===t.length-2&&ab(t,Uze,o)||o.position===t.length-4&&ab(t,qze,o))return s;if(t[o.position]!==13||t[o.position+1]!==10)return"failure";o.position+=2;let c=zze(t,o);if(c==="failure")return"failure";let{name:l,filename:u,contentType:d,encoding:p}=c;o.position+=2;let m;{let A=t.indexOf(n.subarray(2),o.position);if(A===-1)return"failure";m=t.subarray(o.position,A-4),o.position+=m.length,p==="base64"&&(m=Buffer.from(m.toString(),"base64"))}if(t[o.position]!==13||t[o.position+1]!==10)return"failure";o.position+=2;let f;u!==null?(d??="text/plain",Gze(d)||(d=""),f=new Mze([m],u,{type:d})):f=_ze(Buffer.from(m)),ib(i7(l)),ib(typeof f=="string"&&i7(f)||kze(f)),s.push(Lze(l,f,u))}}i($ze,"multipartFormDataParser");function zze(t,e){let r=null,n=null,s=null,o=null;for(;;){if(t[e.position]===13&&t[e.position+1]===10)return r===null?"failure":{name:r,filename:n,contentType:s,encoding:o};let a=Jf(c=>c!==10&&c!==13&&c!==58,t,e);if(a=wF(a,!0,!0,c=>c===9||c===32),!Dze.test(a.toString())||t[e.position]!==58)return"failure";switch(e.position++,Jf(c=>c===32||c===9,t,e),Qze(a)){case"content-disposition":{if(r=n=null,!ab(t,Fze,e)||(e.position+=17,r=l7(t,e),r===null))return"failure";if(ab(t,c7,e)){let c=e.position+c7.length;if(t[c]===42&&(e.position+=1,c+=1),t[c]!==61||t[c+1]!==34||(e.position+=12,n=l7(t,e),n===null))return"failure"}break}case"content-type":{let c=Jf(l=>l!==10&&l!==13,t,e);c=wF(c,!1,!0,l=>l===9||l===32),s=a7(c);break}case"content-transfer-encoding":{let c=Jf(l=>l!==10&&l!==13,t,e);c=wF(c,!1,!0,l=>l===9||l===32),o=a7(c);break}default:Jf(c=>c!==10&&c!==13,t,e)}if(t[e.position]!==13&&t[e.position+1]!==10)return"failure";e.position+=2}}i(zze,"parseMultipartFormDataHeaders");function l7(t,e){ib(t[e.position-1]===34);let r=Jf(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)}i(l7,"parseMultipartFormDataName");function Jf(t,e,r){let n=r.position;for(;n<e.length&&t(e[n]);)++n;return e.subarray(r.position,r.position=n)}i(Jf,"collectASequenceOfBytes");function wF(t,e,r,n){let s=0,o=t.length-1;if(e)for(;s<t.length&&n(t[s]);)s++;if(r)for(;o>0&&n(t[o]);)o--;return s===0&&o===t.length-1?t:t.subarray(s,o+1)}i(wF,"removeChars");function ab(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}i(ab,"bufferStartsWith");u7.exports={multipartFormDataParser:$ze,validateBoundary:Hze}});var Xf=I((i$t,I7)=>{"use strict";var Wy=He(),{ReadableStreamFrom:Vze,isBlobLike:p7,isReadableStreamLike:Wze,readableStreamClose:Yze,createDeferredPromise:Jze,fullyReadBody:jze,extractMimeType:Kze,utf8DecodeBytes:A7}=zs(),{FormData:m7}=Vy(),{kState:Kf}=Eu(),{webidl:Xze}=sn(),{Blob:Zze}=require("node:buffer"),SF=require("node:assert"),{isErrored:h7,isDisturbed:e3e}=require("node:stream"),{isArrayBuffer:t3e}=require("node:util/types"),{serializeAMimeType:r3e}=ms(),{multipartFormDataParser:n3e}=d7(),xF;try{let t=require("node:crypto");xF=i(e=>t.randomInt(0,e),"random")}catch{xF=i(t=>Math.floor(Math.random(t)),"random")}var cb=new TextEncoder;function s3e(){}i(s3e,"noop");var g7=globalThis.FinalizationRegistry&&process.version.indexOf("v18")!==0,y7;g7&&(y7=new FinalizationRegistry(t=>{let e=t.deref();e&&!e.locked&&!e3e(e)&&!h7(e)&&e.cancel("Response object has been garbage collected").catch(s3e)}));function E7(t,e=!1){let r=null;t instanceof ReadableStream?r=t:p7(t)?r=t.stream():r=new ReadableStream({async pull(l){let u=typeof s=="string"?cb.encode(s):s;u.byteLength&&l.enqueue(u),queueMicrotask(()=>Yze(l))},start(){},type:"bytes"}),SF(Wze(r));let n=null,s=null,o=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(t3e(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(Wy.isFormDataLike(t)){let l=`----formdata-undici-0${`${xF(1e11)}`.padStart(11,"0")}`,u=`--${l}\r
|
|
|
|
|
Content-Disposition: form-data`;let d=i(E=>E.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),"escape"),p=i(E=>E.replace(/\r?\n|\r/g,`\r
|
|
|
|
|
`),"normalizeLinefeeds"),m=[],f=new Uint8Array([13,10]);o=0;let A=!1;for(let[E,C]of t)if(typeof C=="string"){let w=cb.encode(u+`; name="${d(p(E))}"\r
|
|
|
|
|
\r
|
|
|
|
|
${d(x)}\r
|
|
|
|
|
`);p.push(b),o+=b.byteLength}else{let b=kb.encode(`${l}; name="${u(d(I))}"`+(x.name?`; filename="${u(x.name)}"`:"")+`\r
|
|
|
|
|
Content-Type: ${x.type||"application/octet-stream"}\r
|
|
|
|
|
${p(C)}\r
|
|
|
|
|
`);m.push(w),o+=w.byteLength}else{let w=cb.encode(`${u}; name="${d(p(E))}"`+(C.name?`; filename="${d(C.name)}"`:"")+`\r
|
|
|
|
|
Content-Type: ${C.type||"application/octet-stream"}\r
|
|
|
|
|
\r
|
|
|
|
|
`);p.push(b,x,A),typeof x.size=="number"?o+=b.byteLength+x.size+A.byteLength:g=!0}let E=kb.encode(`--${c}--\r
|
|
|
|
|
`);p.push(E),o+=E.byteLength,g&&(o=null),s=t,n=async function*(){for(let I of p)I.stream?yield*I.stream():yield I},i=`multipart/form-data; boundary=${c}`}else if(PK(t))s=t,o=t.size,t.type&&(i=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(uh.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:cve(t)}if((typeof s=="string"||uh.isBuffer(s))&&(o=Buffer.byteLength(s)),n!=null){let c;r=new ReadableStream({async start(){c=n(t)[Symbol.asyncIterator]()},async pull(l){let{value:u,done:d}=await c.next();if(d)queueMicrotask(()=>{l.close(),l.byobRequest?.respond(0)});else if(!DK(r)){let p=new Uint8Array(u);p.byteLength&&l.enqueue(p)}return l.desiredSize>0},async cancel(l){await c.return()},type:"bytes"})}return[{stream:r,source:s,length:o},i]}function Ive(t,e=!1){return t instanceof ReadableStream&&(OD(!uh.isDisturbed(t),"The body has already been consumed."),OD(!t.locked,"The stream is locked.")),OK(t,e)}function bve(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}function xve(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}function wve(t){return{blob(){return WA(this,r=>{let n=_K(this);return n===null?n="":n&&(n=yve(n)),new fve([r],{type:n})},t)},arrayBuffer(){return WA(this,r=>new Uint8Array(r).buffer,t)},text(){return WA(this,vK,t)},json(){return WA(this,Sve,t)},formData(){return WA(this,r=>{let n=_K(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=Eve(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let o=new QK;return o[JA]=s,o}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),o=new QK;for(let[i,a]of s)o.append(i,a);return o}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return WA(this,r=>new Uint8Array(r),t)}}}function Bve(t){Object.assign(t.prototype,wve(t))}async function WA(t,e,r){if(mve.brandCheck(t,r),FK(t))throw new TypeError("Body is unusable: Body has already been read");xve(t[JA]);let n=dve(),s=i=>n.reject(i),o=i=>{try{n.resolve(e(i))}catch(a){s(a)}};return t[JA].body==null?(o(Buffer.allocUnsafe(0)),n.promise):(await pve(t[JA].body,o,s),n.promise)}function FK(t){let e=t[JA].body;return e!=null&&(e.stream.locked||uh.isDisturbed(e.stream))}function Sve(t){return JSON.parse(vK(t))}function _K(t){let e=t[JA].headersList,r=Ave(e);return r==="failure"?null:r}MK.exports={extractBody:OK,safelyExtractBody:Ive,cloneBody:bve,mixinBody:Bve,streamRegistry:LK,hasFinalizationRegistry:kK,bodyUnusable:FK}});var JK=C((pPt,WK)=>{"use strict";var Be=require("node:assert"),Me=tt(),{channels:UK}=FA(),MD=CD(),{RequestContentLengthMismatchError:Bd,ResponseContentLengthMismatchError:Rve,RequestAbortedError:VK,HeadersTimeoutError:Nve,HeadersOverflowError:Tve,SocketError:qb,InformationalError:XA,BodyTimeoutError:Pve,HTTPParserError:Qve,ResponseExceededMaxSizeError:_ve}=ft(),{kUrl:YK,kReset:xs,kClient:GD,kParser:mr,kBlocking:Ah,kRunning:Sn,kPending:vve,kSize:qK,kWriting:Ol,kQueue:Ei,kNoRef:dh,kKeepAliveDefaultTimeout:Dve,kHostHeader:kve,kPendingIdx:Lve,kRunningIdx:Ro,kError:No,kPipelining:Mb,kSocket:ZA,kKeepAliveTimeoutValue:$b,kMaxHeadersSize:UD,kKeepAliveMaxTimeout:Ove,kKeepAliveTimeoutThreshold:Fve,kHeadersTimeout:Mve,kBodyTimeout:Uve,kStrictContentLength:HD,kMaxRequests:$K,kCounter:qve,kMaxResponseSize:$ve,kOnError:Gve,kResume:Ll,kHTTPContext:jK}=Yt(),aa=L4(),Hve=Buffer.alloc(0),Lb=Buffer[Symbol.species],Ob=Me.addListener,zve=Me.removeAllListeners,qD;async function Vve(){let t=process.env.JEST_WORKER_ID?xD():void 0,e;try{e=await WebAssembly.compile(M4())}catch{e=await WebAssembly.compile(t||xD())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:(r,n,s)=>0,wasm_on_status:(r,n,s)=>{Be($r.ptr===r);let o=n-la+ca.byteOffset;return $r.onStatus(new Lb(ca.buffer,o,s))||0},wasm_on_message_begin:r=>(Be($r.ptr===r),$r.onMessageBegin()||0),wasm_on_header_field:(r,n,s)=>{Be($r.ptr===r);let o=n-la+ca.byteOffset;return $r.onHeaderField(new Lb(ca.buffer,o,s))||0},wasm_on_header_value:(r,n,s)=>{Be($r.ptr===r);let o=n-la+ca.byteOffset;return $r.onHeaderValue(new Lb(ca.buffer,o,s))||0},wasm_on_headers_complete:(r,n,s,o)=>(Be($r.ptr===r),$r.onHeadersComplete(n,!!s,!!o)||0),wasm_on_body:(r,n,s)=>{Be($r.ptr===r);let o=n-la+ca.byteOffset;return $r.onBody(new Lb(ca.buffer,o,s))||0},wasm_on_message_complete:r=>(Be($r.ptr===r),$r.onMessageComplete()||0)}})}var $D=null,zD=Vve();zD.catch();var $r=null,ca=null,Fb=0,la=null,Yve=0,ph=1,em=2|ph,Ub=4|ph,VD=8|Yve,YD=class{constructor(e,r,{exports:n}){Be(Number.isFinite(e[UD])&&e[UD]>0),this.llhttp=n,this.ptr=this.llhttp.llhttp_alloc(aa.TYPE.RESPONSE),this.client=e,this.socket=r,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=null,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.
Line truncated
|
|
|
|
|
`;if(typeof s=="string"?E+=`host: ${s}\r
|
|
|
|
|
`:E+=t[kve],o?E+=`connection: upgrade\r
|
|
|
|
|
`);m.push(w,C,f),typeof C.size=="number"?o+=w.byteLength+C.size+f.byteLength:A=!0}let h=cb.encode(`--${l}--\r
|
|
|
|
|
`);m.push(h),o+=h.byteLength,A&&(o=null),s=t,n=i(async function*(){for(let E of m)E.stream?yield*E.stream():yield E},"action"),a=`multipart/form-data; boundary=${l}`}else if(p7(t))s=t,o=t.size,t.type&&(a=t.type);else if(typeof t[Symbol.asyncIterator]=="function"){if(e)throw new TypeError("keepalive");if(Wy.isDisturbed(t)||t.locked)throw new TypeError("Response body object should not be disturbed or locked");r=t instanceof ReadableStream?t:Vze(t)}if((typeof s=="string"||Wy.isBuffer(s))&&(o=Buffer.byteLength(s)),n!=null){let l;r=new ReadableStream({async start(){l=n(t)[Symbol.asyncIterator]()},async pull(u){let{value:d,done:p}=await l.next();if(p)queueMicrotask(()=>{u.close(),u.byobRequest?.respond(0)});else if(!h7(r)){let m=new Uint8Array(d);m.byteLength&&u.enqueue(m)}return u.desiredSize>0},async cancel(u){await l.return()},type:"bytes"})}return[{stream:r,source:s,length:o},a]}i(E7,"extractBody");function o3e(t,e=!1){return t instanceof ReadableStream&&(SF(!Wy.isDisturbed(t),"The body has already been consumed."),SF(!t.locked,"The stream is locked.")),E7(t,e)}i(o3e,"safelyExtractBody");function i3e(t,e){let[r,n]=e.stream.tee();return e.stream=r,{stream:n,length:e.length,source:e.source}}i(i3e,"cloneBody");function a3e(t){if(t.aborted)throw new DOMException("The operation was aborted.","AbortError")}i(a3e,"throwIfAborted");function c3e(t){return{blob(){return jf(this,r=>{let n=f7(this);return n===null?n="":n&&(n=r3e(n)),new Zze([r],{type:n})},t)},arrayBuffer(){return jf(this,r=>new Uint8Array(r).buffer,t)},text(){return jf(this,A7,t)},json(){return jf(this,u3e,t)},formData(){return jf(this,r=>{let n=f7(this);if(n!==null)switch(n.essence){case"multipart/form-data":{let s=n3e(r,n);if(s==="failure")throw new TypeError("Failed to parse body as FormData.");let o=new m7;return o[Kf]=s,o}case"application/x-www-form-urlencoded":{let s=new URLSearchParams(r.toString()),o=new m7;for(let[a,c]of s)o.append(a,c);return o}}throw new TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},t)},bytes(){return jf(this,r=>new Uint8Array(r),t)}}}i(c3e,"bodyMixinMethods");function l3e(t){Object.assign(t.prototype,c3e(t))}i(l3e,"mixinBody");async function jf(t,e,r){if(Xze.brandCheck(t,r),C7(t))throw new TypeError("Body is unusable: Body has already been read");a3e(t[Kf]);let n=Jze(),s=i(a=>n.reject(a),"errorSteps"),o=i(a=>{try{n.resolve(e(a))}catch(c){s(c)}},"successSteps");return t[Kf].body==null?(o(Buffer.allocUnsafe(0)),n.promise):(await jze(t[Kf].body,o,s),n.promise)}i(jf,"consumeBody");function C7(t){let e=t[Kf].body;return e!=null&&(e.stream.locked||Wy.isDisturbed(e.stream))}i(C7,"bodyUnusable");function u3e(t){return JSON.parse(A7(t))}i(u3e,"parseJSONFromBytes");function f7(t){let e=t[Kf].headersList,r=Kze(e);return r==="failure"?null:r}i(f7,"bodyMimeType");I7.exports={extractBody:E7,safelyExtractBody:o3e,cloneBody:i3e,mixinBody:l3e,streamRegistry:y7,hasFinalizationRegistry:g7,bodyUnusable:C7}});var O7=I((c$t,L7)=>{"use strict";var pe=require("node:assert"),Ee=He(),{channels:w7}=Ff(),bF=iF(),{RequestContentLengthMismatchError:yp,ResponseContentLengthMismatchError:S7,RequestAbortedError:P7,HeadersTimeoutError:d3e,HeadersOverflowError:p3e,SocketError:Zf,InformationalError:eA,BodyTimeoutError:m3e,HTTPParserError:f3e,ResponseExceededMaxSizeError:A3e}=rt(),{kUrl:Q7,kReset:fs,kClient:pb,kParser:Nt,kBlocking:jy,kRunning:Br,kPending:_7,kSize:x7,kWriting:Cu,kQueue:Si,kNoRef:Yy,kKeepAliveDefaultTimeout:h3e,kHostHeader:g3e,kPendingIdx:y3e,kRunningIdx:Po,kError:Un,kPipelining:mb,kSocket:Cp,kKeepAliveTimeoutValue:Ab,kMaxHeadersSize:BF,kKeepAliveMaxTimeout:E3e,kKeepAliveTimeoutThreshold:C3e,kHeadersTimeout:I3e,kBodyTimeout:w3e,kStrictContentLength:TF,kMaxRequests:b7,kCounter:S3e,kMaxResponseSize:x3e,kOnError:B7,kResume:hl,kHTTPContext:D7}=Lt(),Vs=yX(),R7=Buffer.alloc(0),lb=Buffer[Symbol.species],ub=Ee.addListener,b3e=Ee.removeAllListeners,Ip=Symbol("kIdleSocketValidation"),Ep=Symbol("kIdleSocketValidationTimeout"),_F=Symbol("kSocketUsed"),RF;async function B3e(){let t=process.env.JEST_WORKER_ID?lF():void 0,e;try{e=await WebAssembly.compile(IX())}catch{e=await WebAssembly.compile(t||lF())}return await WebAssembly.instantiate(e,{env:{wasm_on_url:i((r,n,s)=>0,"wasm_on_url"),wasm_on_status:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onStatus(new lb(Ba.buffer,o,s))||0},"wasm_on_status"),wasm_on_message_begin:i(r=>(pe(tr.ptr===r),tr.onMessageBegin()||0),"wasm_on_message_begin"),wasm_on_header_field:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onHeaderField(new lb(Ba.buffer,o,s))||0},"wasm_on_header_field"),wasm_on_header_value:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onHeaderValue(new lb(Ba.buffer,o,s))||0},"wasm_on_header_value"),wasm_on_headers_complete:i((r,n,s,o)=>(pe(tr.ptr===r),tr.onHeadersComplete(n,!!s,!!o)||0),"wasm_on_headers_complete"),wasm_on_body:i((r,n,s)=>{pe(tr.ptr===r);let o=n-Ra+Ba.byteOffset;return tr.onBody(new lb(Ba.bu
Line truncated
|
|
|
|
|
`;if(typeof s=="string"?h+=`host: ${s}\r
|
|
|
|
|
`:h+=t[g3e],o?h+=`connection: upgrade\r
|
|
|
|
|
upgrade: ${o}\r
|
|
|
|
|
`:t[Mb]&&!A[xs]?E+=`connection: keep-alive\r
|
|
|
|
|
`:E+=`connection: close\r
|
|
|
|
|
`,Array.isArray(l))for(let I=0;I<l.length;I+=2){let x=l[I+0],b=l[I+1];if(Array.isArray(b))for(let P=0;P<b.length;P++)E+=`${x}: ${b[P]}\r
|
|
|
|
|
`;else E+=`${x}: ${b}\r
|
|
|
|
|
`}return UK.sendHeaders.hasSubscribers&&UK.sendHeaders.publish({request:e,headers:E,socket:A}),!c||p===0?HK(g,null,t,e,A,u,E,d):Me.isBuffer(c)?HK(g,c,t,e,A,u,E,d):Me.isBlobLike(c)?typeof c.stream=="function"?zK(g,c.stream(),t,e,A,u,E,d):Zve(g,c,t,e,A,u,E,d):Me.isStream(c)?Xve(g,c,t,e,A,u,E,d):Me.isIterable(c)?zK(g,c,t,e,A,u,E,d):Be(!1),!0}function Xve(t,e,r,n,s,o,i,a){Be(o!==0||r[Sn]===0,"stream body cannot be pipelined");let c=!1,l=new Gb({abort:t,socket:s,request:n,contentLength:o,client:r,expectsPayload:a,header:i}),u=function(g){if(!c)try{!l.write(g)&&this.pause&&this.pause()}catch(E){Me.destroy(this,E)}},d=function(){c||e.resume&&e.resume()},p=function(){if(queueMicrotask(()=>{e.removeListener("error",A)}),!c){let g=new VK;queueMicrotask(()=>A(g))}},A=function(g){if(!c){if(c=!0,Be(s.destroyed||s[Ol]&&r[Sn]<=1),s.off("drain",d).off("error",A),e.removeListener("data",u).removeListener("end",A).removeListener("close",p),!g)try{l.end()}catch(E){g=E}l.destroy(g),g&&(g.code!=="UND_ERR_INFO"||g.message!=="reset")?Me.destroy(e,g):Me.destroy(e)}};e.on("data",u).on("end",A).on("error",A).on("close",p),e.resume&&e.resume(),s.on("drain",d).on("error",A),e.errorEmitted??e.errored?setImmediate(()=>A(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>A(null)),(e.closeEmitted??e.closed)&&setImmediate(p)}function HK(t,e,r,n,s,o,i,a){try{e?Me.isBuffer(e)&&(Be(o===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${i}content-length: ${o}\r
|
|
|
|
|
`:t[mb]&&!f[fs]?h+=`connection: keep-alive\r
|
|
|
|
|
`:h+=`connection: close\r
|
|
|
|
|
`,Array.isArray(u))for(let E=0;E<u.length;E+=2){let C=u[E+0],w=u[E+1];if(Array.isArray(w))for(let x=0;x<w.length;x++)h+=`${C}: ${w[x]}\r
|
|
|
|
|
`;else h+=`${C}: ${w}\r
|
|
|
|
|
`}return w7.sendHeaders.hasSubscribers&&w7.sendHeaders.publish({request:e,headers:h,socket:f}),!l||m===0?T7(A,null,t,e,f,d,h,p):Ee.isBuffer(l)?T7(A,l,t,e,f,d,h,p):Ee.isBlobLike(l)?typeof l.stream=="function"?v7(A,l.stream(),t,e,f,d,h,p):D3e(A,l,t,e,f,d,h,p):Ee.isStream(l)?_3e(A,l,t,e,f,d,h,p):Ee.isIterable(l)?v7(A,l,t,e,f,d,h,p):pe(!1),!0}i(Q3e,"writeH1");function _3e(t,e,r,n,s,o,a,c){pe(o!==0||r[Br]===0,"stream body cannot be pipelined");let l=!1,u=new hb({abort:t,socket:s,request:n,contentLength:o,client:r,expectsPayload:c,header:a}),d=i(function(A){if(!l)try{!u.write(A)&&this.pause&&this.pause()}catch(h){Ee.destroy(this,h)}},"onData"),p=i(function(){l||e.resume&&e.resume()},"onDrain"),m=i(function(){if(queueMicrotask(()=>{e.removeListener("error",f)}),!l){let A=new P7;queueMicrotask(()=>f(A))}},"onClose"),f=i(function(A){if(!l){if(l=!0,pe(s.destroyed||s[Cu]&&r[Br]<=1),s.off("drain",p).off("error",f),e.removeListener("data",d).removeListener("end",f).removeListener("close",m),!A)try{u.end()}catch(h){A=h}u.destroy(A),A&&(A.code!=="UND_ERR_INFO"||A.message!=="reset")?Ee.destroy(e,A):Ee.destroy(e)}},"onFinished");e.on("data",d).on("end",f).on("error",f).on("close",m),e.resume&&e.resume(),s.on("drain",p).on("error",f),e.errorEmitted??e.errored?setImmediate(()=>f(e.errored)):(e.endEmitted??e.readableEnded)&&setImmediate(()=>f(null)),(e.closeEmitted??e.closed)&&setImmediate(m)}i(_3e,"writeStream");function T7(t,e,r,n,s,o,a,c){try{e?Ee.isBuffer(e)&&(pe(o===e.byteLength,"buffer body must have content length"),s.cork(),s.write(`${a}content-length: ${o}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),s.write(e),s.uncork(),n.onBodySent(e),!a&&n.reset!==!1&&(s[xs]=!0)):o===0?s.write(`${i}content-length: 0\r
|
|
|
|
|
`,"latin1"),s.write(e),s.uncork(),n.onBodySent(e),!c&&n.reset!==!1&&(s[fs]=!0)):o===0?s.write(`${a}content-length: 0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"):(Be(o===null,"no body must not have content length"),s.write(`${i}\r
|
|
|
|
|
`,"latin1")),n.onRequestSent(),r[Ll]()}catch(c){t(c)}}async function Zve(t,e,r,n,s,o,i,a){Be(o===e.size,"blob body must have content length");try{if(o!=null&&o!==e.size)throw new Bd;let c=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${i}content-length: ${o}\r
|
|
|
|
|
`,"latin1"):(pe(o===null,"no body must not have content length"),s.write(`${a}\r
|
|
|
|
|
`,"latin1")),n.onRequestSent(),r[hl]()}catch(l){t(l)}}i(T7,"writeBuffer");async function D3e(t,e,r,n,s,o,a,c){pe(o===e.size,"blob body must have content length");try{if(o!=null&&o!==e.size)throw new yp;let l=Buffer.from(await e.arrayBuffer());s.cork(),s.write(`${a}content-length: ${o}\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),s.write(c),s.uncork(),n.onBodySent(c),n.onRequestSent(),!a&&n.reset!==!1&&(s[xs]=!0),r[Ll]()}catch(c){t(c)}}async function zK(t,e,r,n,s,o,i,a){Be(o!==0||r[Sn]===0,"iterator body cannot be pipelined");let c=null;function l(){if(c){let p=c;c=null,p()}}let u=()=>new Promise((p,A)=>{Be(c===null),s[No]?A(s[No]):c=p});s.on("close",l).on("drain",l);let d=new Gb({abort:t,socket:s,request:n,contentLength:o,client:r,expectsPayload:a,header:i});try{for await(let p of e){if(s[No])throw s[No];d.write(p)||await u()}d.end()}catch(p){d.destroy(p)}finally{s.off("close",l).off("drain",l)}}var Gb=class{constructor({abort:e,socket:r,request:n,contentLength:s,client:o,expectsPayload:i,header:a}){this.socket=r,this.request=n,this.contentLength=s,this.client=o,this.bytesWritten=0,this.expectsPayload=i,this.header=a,this.abort=e,r[Ol]=!0}write(e){let{socket:r,request:n,contentLength:s,client:o,bytesWritten:i,expectsPayload:a,header:c}=this;if(r[No])throw r[No];if(r.destroyed)return!1;let l=Buffer.byteLength(e);if(!l)return!0;if(s!==null&&i+l>s){if(o[HD])throw new Bd;process.emitWarning(new Bd)}r.cork(),i===0&&(!a&&n.reset!==!1&&(r[xs]=!0),s===null?r.write(`${c}transfer-encoding: chunked\r
|
|
|
|
|
`,"latin1"):r.write(`${c}content-length: ${s}\r
|
|
|
|
|
`,"latin1"),s.write(l),s.uncork(),n.onBodySent(l),n.onRequestSent(),!c&&n.reset!==!1&&(s[fs]=!0),r[hl]()}catch(l){t(l)}}i(D3e,"writeBlob");async function v7(t,e,r,n,s,o,a,c){pe(o!==0||r[Br]===0,"iterator body cannot be pipelined");let l=null;function u(){if(l){let m=l;l=null,m()}}i(u,"onDrain");let d=i(()=>new Promise((m,f)=>{pe(l===null),s[Un]?f(s[Un]):l=m}),"waitForDrain");s.on("close",u).on("drain",u);let p=new hb({abort:t,socket:s,request:n,contentLength:o,client:r,expectsPayload:c,header:a});try{for await(let m of e){if(s[Un])throw s[Un];p.write(m)||await d()}p.end()}catch(m){p.destroy(m)}finally{s.off("close",u).off("drain",u)}}i(v7,"writeIterable");var hb=class{static{i(this,"AsyncWriter")}constructor({abort:e,socket:r,request:n,contentLength:s,client:o,expectsPayload:a,header:c}){this.socket=r,this.request=n,this.contentLength=s,this.client=o,this.bytesWritten=0,this.expectsPayload=a,this.header=c,this.abort=e,r[Cu]=!0}write(e){let{socket:r,request:n,contentLength:s,client:o,bytesWritten:a,expectsPayload:c,header:l}=this;if(r[Un])throw r[Un];if(r.destroyed)return!1;let u=Buffer.byteLength(e);if(!u)return!0;if(s!==null&&a+u>s){if(o[TF])throw new yp;process.emitWarning(new yp)}r.cork(),a===0&&(!c&&n.reset!==!1&&(r[fs]=!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
|
|
|
|
|
${l.toString(16)}\r
|
|
|
|
|
`,"latin1"),this.bytesWritten+=l;let u=r.write(e);return r.uncork(),n.onBodySent(e),u||r[mr].timeout&&r[mr].timeoutType===em&&r[mr].timeout.refresh&&r[mr].timeout.refresh(),u}end(){let{socket:e,contentLength:r,client:n,bytesWritten:s,expectsPayload:o,header:i,request:a}=this;if(a.onRequestSent(),e[Ol]=!1,e[No])throw e[No];if(!e.destroyed){if(s===0?o?e.write(`${i}content-length: 0\r
|
|
|
|
|
${u.toString(16)}\r
|
|
|
|
|
`,"latin1"),this.bytesWritten+=u;let d=r.write(e);return r.uncork(),n.onBodySent(e),d||r[Nt].timeout&&r[Nt].timeoutType===tA&&r[Nt].timeout.refresh&&r[Nt].timeout.refresh(),d}end(){let{socket:e,contentLength:r,client:n,bytesWritten:s,expectsPayload:o,header:a,request:c}=this;if(c.onRequestSent(),e[Cu]=!1,e[Un])throw e[Un];if(!e.destroyed){if(s===0?o?e.write(`${a}content-length: 0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"):e.write(`${i}\r
|
|
|
|
|
`,"latin1"):e.write(`${a}\r
|
|
|
|
|
`,"latin1"):r===null&&e.write(`\r
|
|
|
|
|
0\r
|
|
|
|
|
\r
|
|
|
|
|
`,"latin1"),r!==null&&s!==r){if(n[HD])throw new Bd;process.emitWarning(new Bd)}e[mr].timeout&&e[mr].timeoutType===em&&e[mr].timeout.refresh&&e[mr].timeout.refresh(),n[Ll]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[Ol]=!1,e&&(Be(n[Sn]<=1,"pipeline should only contain this request"),s(e))}};WK.exports=jve});var s8=C((APt,n8)=>{"use strict";var To=require("node:assert"),{pipeline:eDe}=require("node:stream"),at=tt(),{RequestContentLengthMismatchError:jD,RequestAbortedError:KK,SocketError:mh,InformationalError:WD}=ft(),{kUrl:Hb,kReset:Vb,kClient:tm,kRunning:Yb,kPending:tDe,kQueue:Fl,kPendingIdx:JD,kRunningIdx:Ci,kError:bi,kSocket:an,kStrictContentLength:rDe,kOnError:KD,kMaxConcurrentStreams:r8,kHTTP2Session:Ii,kResume:Ml,kSize:nDe,kHTTPContext:sDe}=Yt(),Bc=Symbol("open streams"),XK,ZK=!1,zb;try{zb=require("node:http2")}catch{zb={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:oDe,HTTP2_HEADER_METHOD:iDe,HTTP2_HEADER_PATH:aDe,HTTP2_HEADER_SCHEME:cDe,HTTP2_HEADER_CONTENT_LENGTH:lDe,HTTP2_HEADER_EXPECT:uDe,HTTP2_HEADER_STATUS:dDe}}=zb;function pDe(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}async function ADe(t,e){t[an]=e,ZK||(ZK=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=zb.connect(t[Hb],{createConnection:()=>e,peerMaxConcurrentStreams:t[r8]});r[Bc]=0,r[tm]=t,r[an]=e,at.addListener(r,"error",fDe),at.addListener(r,"frameError",gDe),at.addListener(r,"end",hDe),at.addListener(r,"goaway",yDe),at.addListener(r,"close",function(){let{[tm]:s}=this,{[an]:o}=s,i=this[an][bi]||this[bi]||new mh("closed",at.getSocketInfo(o));if(s[Ii]=null,s.destroyed){To(s[tDe]===0);let a=s[Fl].splice(s[Ci]);for(let c=0;c<a.length;c++){let l=a[c];at.errorRequest(s,l,i)}}}),r.unref(),t[Ii]=r,e[Ii]=r,at.addListener(e,"error",function(s){To(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[bi]=s,this[tm][KD](s)}),at.addListener(e,"end",function(){at.destroy(this,new mh("other side closed",at.getSocketInfo(this)))}),at.addListener(e,"close",function(){let s=this[bi]||new mh("closed",at.getSocketInfo(this));t[an]=null,this[Ii]!=null&&this[Ii].destroy(s),t[JD]=t[Ci],To(t[Yb]===0),t.emit("disconnect",t[Hb],[t],s),t[Ml]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return CDe(t,...s)},resume(){mDe(t)},destroy(s,o){n?queueMicrotask(o):e.destroy(s).on("close",o)},get destroyed(){return e.destroyed},busy(){return!1}}}function mDe(t){let e=t[an];e?.destroyed===!1&&(t[nDe]===0&&t[r8]===0?(e.unref(),t[Ii].unref()):(e.ref(),t[Ii].ref()))}function fDe(t){To(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[an][bi]=t,this[tm][KD](t)}function gDe(t,e,r){if(r===0){let n=new WD(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[an][bi]=n,this[tm][KD](n)}}function hDe(){let t=new mh("other side closed",at.getSocketInfo(this[an]));this.destroy(t),at.destroy(this[an],t)}function yDe(t){let e=this[bi]||new mh(`HTTP/2: "GOAWAY" frame received with code ${t}`,at.getSocketInfo(this)),r=this[tm];if(r[an]=null,r[sDe]=null,this[Ii]!=null&&(this[Ii].destroy(e),this[Ii]=null),at.destroy(this[an],e),r[Ci]<r[Fl].length){let n=r[Fl][r[Ci]];r[Fl][r[Ci]++]=null,at.errorRequest(r,n,e),r[JD]=r[Ci]}To(r[Yb]===0),r.emit("disconnect",r[Hb],[r],e),r[Ml]()}function EDe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}function CDe(t,e){let r=t[Ii],{method:n,path:s,host:o,upgrade:i,expectContinue:a,signal:c,headers:l}=e,{body:u}=e;if(i)return at.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let d={};for(let v=0;v<l.length;v+=2){let F=l[v+0],q=l[v+1];if(Array.isArray(q))for(let X=0;X<q.length;X++)d[F]?d[F]+=`,${q[X]}`:d[F]=q[X];else d[F]=q}let p,{hostname:A,port:g}=t[Hb];d[oDe]=o||`${A}${g?`:${g}`:""}`,d[iDe]=n;let E=v=>{e.aborted||e.completed||(v=v||new KK,at.errorRequest(t,e,v),p!=null&&at.destroy(p,v),at.destroy(u,v),t[Fl][t[Ci]++]=null,t[Ml]())};try{e.onConnect(E)}catch(v){at.errorRequest(t,e,v)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),p=r.request(d,{endStream:!1,signal:c}),p.id&&!p.pending?(e.onUpgrade(null,null,p),++r[Bc],t[Fl][t[Ci]++]=null):p.once("ready",()=>{e.onUpgrade(null,null,p),++r[Bc],t[Fl][t[Ci]++]=null}),p.once("close",()=>{r[Bc]-=1,r[Bc]===0&&r.unref()}),!0;d[aDe]=s,d[cDe]="https";let I=n==="PUT"||n==="POST"||n==="PATCH";u&&typeof u.read=="function"&&u.read(0);let x=at.bodyLength(u);if(at.isFormDataLike(u)){XK??=KA().extractBody;let[v,F]=XK(u);d["content-type"]=F,u=v.stream,x=v.length}if(x==null&&(x=e.contentLength),(x===0||!I)&&(x=null),EDe(n)&&x>0&&e.contentLength!=null&&e.contentLength!==x){if(t[rDe])return at.errorRequest(t,e,new jD),!1;process.emitWarning(new jD)}x!=null&&(To(u,"no body must not have content length"),d[lDe]=`${x}`),r.ref();let b=n==="GET"||n==="HEAD"||u===null;return a?(d[uDe]="100-continue",p=r.request(d,{endStream:b,signal:c}),p.once("
Line truncated
|
|
|
|
|
`,this[VDe]=c??3e5,this[zDe]=s??3e5,this[YDe]=b??!0,this[jDe]=v,this[tk]=q,this[ql]=null,this[ZDe]=V>-1?V:-1,this[tke]=ee??100,this[Br]=null,this[xi]=[],this[Rc]=0,this[wi]=0,this[yh]=ae=>nk(this,ae),this[eke]=ae=>g8(this,ae)}get pipelining(){return this[Kb]}set pipelining(e){this[Kb]=e,this[yh](!0)}get[Ih](){return this[xi].length-this[wi]}get[Ch](){return this[wi]-this[Rc]}get[Eh](){return this[xi].length-this[Rc]}get[FDe](){return!!this[Br]&&!this[nm]&&!this[Br].destroyed}get[ek](){return!!(this[Br]?.busy(null)||this[Eh]>=(f8(this)||1)||this[Ih]>0)}[ODe](e){h8(this),this.once("connect",e)}[XDe](e,r){let n=e.origin||this[da].origin,s=new QDe(n,e,r);return this[xi].push(s),this[Rd]||(Sd.bodyLength(s.body)==null&&Sd.isIterable(s.body)?(this[Rd]=1,queueMicrotask(()=>nk(this))):this[yh](!0)),this[Rd]&&this[$l]!==2&&this[ek]&&(this[$l]=2),this[$l]<2}async[JDe](){return new Promise(e=>{this[Eh]?this[ql]=e:e(null)})}async[KDe](e){return new Promise(r=>{let n=this[xi].splice(this[wi]);for(let o=0;o<n.length;o++){let i=n[o];Sd.errorRequest(this,i,e)}let s=()=>{this[ql]&&(this[ql](),this[ql]=null),r(null)};this[Br]?(this[Br].destroy(e,s),this[Br]=null):queueMicrotask(s),this[yh]()})}},ske=Jb();function g8(t,e){if(t[Ch]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){Sc(t[wi]===t[Rc]);let r=t[xi].splice(t[Rc]);for(let n=0;n<r.length;n++){let s=r[n];Sd.errorRequest(t,s,e)}Sc(t[Eh]===0)}}async function h8(t){Sc(!t[nm]),Sc(!t[Br]);let{host:e,hostname:r,protocol:n,port:s}=t[da];if(r[0]==="["){let o=r.indexOf("]");Sc(o!==-1);let i=r.substring(1,o);Sc(m8.isIP(i)),r=i}t[nm]=!0,rm.beforeConnect.hasSubscribers&&rm.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Br]?.version,servername:t[Ul],localAddress:t[hh]},connector:t[gh]});try{let o=await new Promise((i,a)=>{t[gh]({host:e,hostname:r,protocol:n,port:s,servername:t[Ul],localAddress:t[hh]},(c,l)=>{c?a(c):i(l)})});if(t.destroyed){Sd.destroy(o.on("error",p8),new DDe);return}Sc(o);try{t[Br]=o.alpnProtocol==="h2"?await nke(t,o):await rke(t,o)}catch(i){throw o.destroy().on("error",p8),i}t[nm]=!1,o[WDe]=0,o[tk]=t[tk],o[LDe]=t,o[UDe]=null,rm.connected.hasSubscribers&&rm.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Br]?.version,servername:t[Ul],localAddress:t[hh]},connector:t[gh],socket:o}),t.emit("connect",t[da],[t])}catch(o){if(t.destroyed)return;if(t[nm]=!1,rm.connectError.hasSubscribers&&rm.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[Br]?.version,servername:t[Ul],localAddress:t[hh]},connector:t[gh],error:o}),o.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(Sc(t[Ch]===0);t[Ih]>0&&t[xi][t[wi]].servername===t[Ul];){let i=t[xi][t[wi]++];Sd.errorRequest(t,i,o)}else g8(t,o);t.emit("connectionError",t[da],[t],o)}t[yh]()}function A8(t){t[$l]=0,t.emit("drain",t[da],[t])}function nk(t,e){t[Rd]!==2&&(t[Rd]=2,oke(t,e),t[Rd]=0,t[Rc]>256&&(t[xi].splice(0,t[Rc]),t[wi]-=t[Rc],t[Rc]=0))}function oke(t,e){for(;;){if(t.destroyed){Sc(t[Ih]===0);return}if(t[ql]&&!t[Eh]){t[ql](),t[ql]=null;return}if(t[Br]&&t[Br].resume(),t[ek])t[$l]=2;else if(t[$l]===2){e?(t[$l]=1,queueMicrotask(()=>A8(t))):A8(t);continue}if(t[Ih]===0||t[Ch]>=(f8(t)||1))return;let r=t[xi][t[wi]];if(t[da].protocol==="https:"&&t[Ul]!==r.servername){if(t[Ch]>0)return;t[Ul]=r.servername,t[Br]?.destroy(new vDe("servername changed"),()=>{t[Br]=null,nk(t)})}if(t[nm])return;if(!t[Br]){h8(t);return}if(t[Br].destroyed||t[Br].busy(r))return;!r.aborted&&t[Br].write(r)?t[wi]++:t[xi].splice(t[wi],1)}}y8.exports=rk});var sk=C((yPt,E8)=>{"use strict";var Xb=class{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)}};E8.exports=class{constructor(){this.head=this.tail=new Xb}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new Xb),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var I8=C((EPt,C8)=>{var{kFree:ike,kConnected:ake,kPending:cke,kQueued:lke,kRunning:uke,kSize:dke}=Yt(),Nd=Symbol("pool"),ok=class{constructor(e){this[Nd]=e}get connected(){return this[Nd][ake]}get free(){return this[Nd][ike]}get pending(){return this[Nd][cke]}get queued(){return this[Nd][lke]}get running(){return this[Nd][uke]}get size(){return this[Nd][dke]}};C8.exports=ok});var dk=C((CPt,Q8)=>{"use strict";var pke=$A(),Ake=sk(),{kConnected:ik,kSize:b8,kRunning:x8,kPending:w8,kQueued:bh,kBusy:mke,kFree:fke,kUrl:gke,kClose:hke,kDestroy:yke,kDispatch:Eke}=Yt(),Cke=I8(),ws=Symbol("clients"),es=Symbol("needDrain"),xh=Symbol("queue"),ak=Symbol("closed resolve"),ck=Symbol("onDrain"),B8=Symbol("onConnect"),S8=Symbol("onDisconnect"),R8=Symbol("onConnectionError"),lk=Symbol("
Line truncated
|
|
|
|
|
`,"latin1"),r!==null&&s!==r){if(n[TF])throw new yp;process.emitWarning(new yp)}e[Nt].timeout&&e[Nt].timeoutType===tA&&e[Nt].timeout.refresh&&e[Nt].timeout.refresh(),n[hl]()}}destroy(e){let{socket:r,client:n,abort:s}=this;r[Cu]=!1,e&&(pe(n[Br]<=1,"pipeline should only contain this request"),s(e))}};L7.exports=N3e});var z7=I((u$t,$7)=>{"use strict";var Qo=require("node:assert"),{pipeline:k3e}=require("node:stream"),We=He(),{RequestContentLengthMismatchError:DF,RequestAbortedError:M7,SocketError:Ky,InformationalError:kF}=rt(),{kUrl:gb,kReset:Eb,kClient:rA,kRunning:Cb,kPending:L3e,kQueue:Iu,kPendingIdx:LF,kRunningIdx:xi,kError:Bi,kSocket:Vr,kStrictContentLength:O3e,kOnError:OF,kMaxConcurrentStreams:H7,kHTTP2Session:bi,kResume:wu,kSize:M3e,kHTTPContext:F3e}=Lt(),gl=Symbol("open streams"),F7,U7=!1,yb;try{yb=require("node:http2")}catch{yb={constants:{}}}var{constants:{HTTP2_HEADER_AUTHORITY:U3e,HTTP2_HEADER_METHOD:q3e,HTTP2_HEADER_PATH:G3e,HTTP2_HEADER_SCHEME:H3e,HTTP2_HEADER_CONTENT_LENGTH:$3e,HTTP2_HEADER_EXPECT:z3e,HTTP2_HEADER_STATUS:V3e}}=yb;function W3e(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}i(W3e,"parseH2Headers");async function Y3e(t,e){t[Vr]=e,U7||(U7=!0,process.emitWarning("H2 support is experimental, expect them to change at any time.",{code:"UNDICI-H2"}));let r=yb.connect(t[gb],{createConnection:i(()=>e,"createConnection"),peerMaxConcurrentStreams:t[H7]});r[gl]=0,r[rA]=t,r[Vr]=e,We.addListener(r,"error",j3e),We.addListener(r,"frameError",K3e),We.addListener(r,"end",X3e),We.addListener(r,"goaway",Z3e),We.addListener(r,"close",function(){let{[rA]:s}=this,{[Vr]:o}=s,a=this[Vr][Bi]||this[Bi]||new Ky("closed",We.getSocketInfo(o));if(s[bi]=null,s.destroyed){Qo(s[L3e]===0);let c=s[Iu].splice(s[xi]);for(let l=0;l<c.length;l++){let u=c[l];We.errorRequest(s,u,a)}}}),r.unref(),t[bi]=r,e[bi]=r,We.addListener(e,"error",function(s){Qo(s.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Bi]=s,this[rA][OF](s)}),We.addListener(e,"end",function(){We.destroy(this,new Ky("other side closed",We.getSocketInfo(this)))}),We.addListener(e,"close",function(){let s=this[Bi]||new Ky("closed",We.getSocketInfo(this));t[Vr]=null,this[bi]!=null&&this[bi].destroy(s),t[LF]=t[xi],Qo(t[Cb]===0),t.emit("disconnect",t[gb],[t],s),t[wu]()});let n=!1;return e.on("close",()=>{n=!0}),{version:"h2",defaultPipelining:1/0,write(...s){return tVe(t,...s)},resume(){J3e(t)},destroy(s,o){n?queueMicrotask(o):e.destroy(s).on("close",o)},get destroyed(){return e.destroyed},busy(){return!1}}}i(Y3e,"connectH2");function J3e(t){let e=t[Vr];e?.destroyed===!1&&(t[M3e]===0&&t[H7]===0?(e.unref(),t[bi].unref()):(e.ref(),t[bi].ref()))}i(J3e,"resumeH2");function j3e(t){Qo(t.code!=="ERR_TLS_CERT_ALTNAME_INVALID"),this[Vr][Bi]=t,this[rA][OF](t)}i(j3e,"onHttp2SessionError");function K3e(t,e,r){if(r===0){let n=new kF(`HTTP/2: "frameError" received - type ${t}, code ${e}`);this[Vr][Bi]=n,this[rA][OF](n)}}i(K3e,"onHttp2FrameError");function X3e(){let t=new Ky("other side closed",We.getSocketInfo(this[Vr]));this.destroy(t),We.destroy(this[Vr],t)}i(X3e,"onHttp2SessionEnd");function Z3e(t){let e=this[Bi]||new Ky(`HTTP/2: "GOAWAY" frame received with code ${t}`,We.getSocketInfo(this)),r=this[rA];if(r[Vr]=null,r[F3e]=null,this[bi]!=null&&(this[bi].destroy(e),this[bi]=null),We.destroy(this[Vr],e),r[xi]<r[Iu].length){let n=r[Iu][r[xi]];r[Iu][r[xi]++]=null,We.errorRequest(r,n,e),r[LF]=r[xi]}Qo(r[Cb]===0),r.emit("disconnect",r[gb],[r],e),r[wu]()}i(Z3e,"onHTTP2GoAway");function eVe(t){return t!=="GET"&&t!=="HEAD"&&t!=="OPTIONS"&&t!=="TRACE"&&t!=="CONNECT"}i(eVe,"shouldSendContentLength");function tVe(t,e){let r=t[bi],{method:n,path:s,host:o,upgrade:a,expectContinue:c,signal:l,headers:u}=e,{body:d}=e;if(a)return We.errorRequest(t,e,new Error("Upgrade not supported for H2")),!1;let p={};for(let b=0;b<u.length;b+=2){let N=u[b+0],P=u[b+1];if(Array.isArray(P))for(let _=0;_<P.length;_++)p[N]?p[N]+=`,${P[_]}`:p[N]=P[_];else p[N]=P}let m,{hostname:f,port:A}=t[gb];p[U3e]=o||`${f}${A?`:${A}`:""}`,p[q3e]=n;let h=i(b=>{e.aborted||e.completed||(b=b||new M7,We.errorRequest(t,e,b),m!=null&&We.destroy(m,b),We.destroy(d,b),t[Iu][t[xi]++]=null,t[wu]())},"abort");try{e.onConnect(h)}catch(b){We.errorRequest(t,e,b)}if(e.aborted)return!1;if(n==="CONNECT")return r.ref(),m=r.request(p,{endStream:!1,signal:l}),m.id&&!m.pending?(e.onUpgrade(null,null,m),++r[gl],t[Iu][t[xi]++]=null):m.once("ready",()=>{e.onUpgrade(null,null,m),++r[gl],t[Iu][t[xi]++]=null}),m.once("close",()=>{r[gl]-=1,r[gl]===0&&r.unref()}),!0;p[G3e]=s,p[H3e]="https";let E=n==="PUT"||n==="POST"||n==="PATCH";d&&typeof d.read=="function"&&d.read(0);let C=We.bodyLength(d);if(We.isFormDataLike(d)){F7??=Xf().extractBody;let[b,N]=F7(d);p["content-type"]=N,d=b.stream,C=b.length}if(C==null&&(C=e.contentLength),(C===0||!E)&&(C=null),eVe(n)&&C>0&&e.contentLength!=null&&e.contentLength!==C){if(t[O3e])return We.errorRequest(t,e,
Line truncated
|
|
|
|
|
`,this[RVe]=l??3e5,this[BVe]=s??3e5,this[NVe]=w??!0,this[TVe]=b,this[qF]=P,this[xu]=null,this[DVe]=re>-1?re:-1,this[LVe]=qe??100,this[mr]=null,this[Ri]=[],this[El]=0,this[Ni]=0,this[tE]=U=>HF(this,U),this[kVe]=U=>nZ(this,U)}get pipelining(){return this[xb]}set pipelining(e){this[xb]=e,this[tE](!0)}get[sE](){return this[Ri].length-this[Ni]}get[nE](){return this[Ni]-this[El]}get[rE](){return this[Ri].length-this[El]}get[EVe](){return!!this[mr]&&!this[sA]&&!this[mr].destroyed}get[UF](){return!!(this[mr]?.busy(null)||this[rE]>=(rZ(this)||1)||this[sE]>0)}[yVe](e){sZ(this),this.once("connect",e)}[_Ve](e,r){let n=e.origin||this[Ta].origin,s=new pVe(n,e,r);return this[Ri].push(s),this[Sp]||(wp.bodyLength(s.body)==null&&wp.isIterable(s.body)?(this[Sp]=1,queueMicrotask(()=>HF(this))):this[tE](!0)),this[Sp]&&this[bu]!==2&&this[UF]&&(this[bu]=2),this[bu]<2}async[PVe](){return new Promise(e=>{this[rE]?this[xu]=e:e(null)})}async[QVe](e){return new Promise(r=>{let n=this[Ri].splice(this[Ni]);for(let o=0;o<n.length;o++){let a=n[o];wp.errorRequest(this,a,e)}let s=i(()=>{this[xu]&&(this[xu](),this[xu]=null),r(null)},"callback");this[mr]?(this[mr].destroy(e,s),this[mr]=null):queueMicrotask(s),this[tE]()})}},FVe=Sb();function nZ(t,e){if(t[nE]===0&&e.code!=="UND_ERR_INFO"&&e.code!=="UND_ERR_SOCKET"){yl(t[Ni]===t[El]);let r=t[Ri].splice(t[El]);for(let n=0;n<r.length;n++){let s=r[n];wp.errorRequest(t,s,e)}yl(t[rE]===0)}}i(nZ,"onError");async function sZ(t){yl(!t[sA]),yl(!t[mr]);let{host:e,hostname:r,protocol:n,port:s}=t[Ta];if(r[0]==="["){let o=r.indexOf("]");yl(o!==-1);let a=r.substring(1,o);yl(tZ.isIP(a)),r=a}t[sA]=!0,nA.beforeConnect.hasSubscribers&&nA.beforeConnect.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[mr]?.version,servername:t[Su],localAddress:t[eE]},connector:t[Zy]});try{let o=await new Promise((a,c)=>{t[Zy]({host:e,hostname:r,protocol:n,port:s,servername:t[Su],localAddress:t[eE]},(l,u)=>{l?c(l):a(u)})});if(t.destroyed){wp.destroy(o.on("error",Z7),new AVe);return}yl(o);try{t[mr]=o.alpnProtocol==="h2"?await MVe(t,o):await OVe(t,o)}catch(a){throw o.destroy().on("error",Z7),a}t[sA]=!1,o[vVe]=0,o[qF]=t[qF],o[gVe]=t,o[IVe]=null,nA.connected.hasSubscribers&&nA.connected.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[mr]?.version,servername:t[Su],localAddress:t[eE]},connector:t[Zy],socket:o}),t.emit("connect",t[Ta],[t])}catch(o){if(t.destroyed)return;if(t[sA]=!1,nA.connectError.hasSubscribers&&nA.connectError.publish({connectParams:{host:e,hostname:r,protocol:n,port:s,version:t[mr]?.version,servername:t[Su],localAddress:t[eE]},connector:t[Zy],error:o}),o.code==="ERR_TLS_CERT_ALTNAME_INVALID")for(yl(t[nE]===0);t[sE]>0&&t[Ri][t[Ni]].servername===t[Su];){let a=t[Ri][t[Ni]++];wp.errorRequest(t,a,o)}else nZ(t,o);t.emit("connectionError",t[Ta],[t],o)}t[tE]()}i(sZ,"connect");function eZ(t){t[bu]=0,t.emit("drain",t[Ta],[t])}i(eZ,"emitDrain");function HF(t,e){t[Sp]!==2&&(t[Sp]=2,UVe(t,e),t[Sp]=0,t[El]>256&&(t[Ri].splice(0,t[El]),t[Ni]-=t[El],t[El]=0))}i(HF,"resume");function UVe(t,e){for(;;){if(t.destroyed){yl(t[sE]===0);return}if(t[xu]&&!t[rE]){t[xu](),t[xu]=null;return}if(t[mr]&&t[mr].resume(),t[UF])t[bu]=2;else if(t[bu]===2){e?(t[bu]=1,queueMicrotask(()=>eZ(t))):eZ(t);continue}if(t[sE]===0||t[nE]>=(rZ(t)||1))return;let r=t[Ri][t[Ni]];if(t[Ta].protocol==="https:"&&t[Su]!==r.servername){if(t[nE]>0)return;t[Su]=r.servername,t[mr]?.destroy(new fVe("servername changed"),()=>{t[mr]=null,HF(t)})}if(t[sA])return;if(!t[mr]){sZ(t);return}if(t[mr].destroyed||t[mr].busy(r))return;!r.aborted&&t[mr].write(r)?t[Ni]++:t[Ri].splice(t[Ni],1)}}i(UVe,"_resume");oZ.exports=GF});var $F=I((E$t,iZ)=>{"use strict";var bb=class{static{i(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)}};iZ.exports=class{static{i(this,"FixedQueue")}constructor(){this.head=this.tail=new bb}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new bb),this.head.push(e)}shift(){let e=this.tail,r=e.shift();return e.isEmpty()&&e.next!==null&&(this.tail=e.next),r}}});var cZ=I((I$t,aZ)=>{var{kFree:qVe,kConnected:GVe,kPending:HVe,kQueued:$Ve,kRunning:zVe,kSize:VVe}=Lt(),xp=Symbol("pool"),zF=class{static{i(this,"PoolStats")}constructor(e){this[xp]=e}get connected(){return this[xp][GVe]}get free(){return this[xp][qVe]}get pending(){return this[xp][HVe]}get queued(){return this[xp][$Ve]}get running(){return this[xp][zVe]}get size(){return this[xp][VVe]}};aZ.exports=zF});var KF=I((S$t,yZ)=>{"use strict";var WVe=Hf(),YVe=$F(),{kConnected:VF,kSize:lZ,kRunning:uZ,kPending:dZ,kQueued:oE,kBusy:JVe,kFree:jVe,kUrl:KVe,kClose:XVe,kDestroy:ZVe,kDispatch:e4e}=Lt(),t4e=cZ(),As=Symbol("client
Line truncated
|
|
|
|
|
${n.count} ${n.noun} ${n.is} pending:
|
|
|
|
|
|
|
|
|
|
${e.format(r)}
|
|
|
|
|
`.trim())}};O5.exports=dL});var gx=C((jPt,$5)=>{"use strict";var M5=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:VOe}=ft(),YOe=im();q5()===void 0&&U5(new YOe);function U5(t){if(!t||typeof t.dispatch!="function")throw new VOe("Argument agent must implement Agent");Object.defineProperty(globalThis,M5,{value:t,writable:!0,enumerable:!1,configurable:!1})}function q5(){return globalThis[M5]}$5.exports={setGlobalDispatcher:U5,getGlobalDispatcher:q5}});var hx=C((JPt,G5)=>{"use strict";G5.exports=class{#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 z5=C((KPt,H5)=>{"use strict";var jOe=Wb();H5.exports=t=>{let e=t?.maxRedirections;return r=>function(s,o){let{maxRedirections:i=e,...a}=s;if(!i)return r(s,o);let c=new jOe(r,i,s,o);return r(a,c)}}});var Y5=C((XPt,V5)=>{"use strict";var WOe=ix();V5.exports=t=>e=>function(n,s){return e(n,new WOe({...n,retryOptions:{...t,...n.retryOptions}},{handler:s,dispatch:e}))}});var W5=C((ZPt,j5)=>{"use strict";var JOe=tt(),{InvalidArgumentError:KOe,RequestAbortedError:XOe}=ft(),ZOe=hx(),pL=class extends ZOe{#e=1024*1024;#t=null;#s=!1;#n=!1;#r=0;#o=null;#i=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new KOe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#i=r}onConnect(e){this.#t=e,this.#i.onConnect(this.#a.bind(this))}#a(e){this.#n=!0,this.#o=e}onHeaders(e,r,n,s){let i=JOe.parseHeaders(r)["content-length"];if(i!=null&&i>this.#e)throw new XOe(`Response size (${i}) larger than maxSize (${this.#e})`);return this.#n?!0:this.#i.onHeaders(e,r,n,s)}onError(e){this.#s||(e=this.#o??e,this.#i.onError(e))}onData(e){return this.#r=this.#r+e.length,this.#r>=this.#e&&(this.#s=!0,this.#n?this.#i.onError(this.#o):this.#i.onComplete([])),!0}onComplete(e){if(!this.#s){if(this.#n){this.#i.onError(this.reason);return}this.#i.onComplete(e)}}};function eFe({maxSize:t}={maxSize:1024*1024}){return e=>function(n,s){let{dumpMaxSize:o=t}=n,i=new pL({maxSize:o},s);return e(n,i)}}j5.exports=eFe});var X5=C((eQt,K5)=>{"use strict";var{isIP:tFe}=require("node:net"),{lookup:rFe}=require("node:dns"),nFe=hx(),{InvalidArgumentError:gm,InformationalError:sFe}=ft(),J5=Math.pow(2,31)-1,AL=class{#e=0;#t=0;#s=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.#n,this.pick=e.pick??this.#r}get full(){return this.#s.size===this.#t}runLookup(e,r,n){let s=this.#s.get(e.hostname);if(s==null&&this.full){n(null,e.origin);return}let o={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,o,(i,a)=>{if(i||a==null||a.length===0){n(i??new sFe("No DNS entries found"));return}this.setRecords(e,a);let c=this.#s.get(e.hostname),l=this.pick(e,c,o.affinity),u;typeof l.port=="number"?u=`:${l.port}`:e.port!==""?u=`:${e.port}`:u="",n(null,`${e.protocol}//${l.family===6?`[${l.address}]`:l.address}${u}`)});else{let i=this.pick(e,s,o.affinity);if(i==null){this.#s.delete(e.hostname),this.runLookup(e,r,n);return}let a;typeof i.port=="number"?a=`:${i.port}`:e.port!==""?a=`:${e.port}`:a="",n(null,`${e.protocol}//${i.family===6?`[${i.address}]`:i.address}${a}`)}}#n(e,r,n){rFe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,o)=>{if(s)return n(s);let i=new Map;for(let a of o)i.set(`${a.address}:${a.family}`,a);n(null,i.values())})}#r(e,r,n){let s=null,{records:o,offset:i}=r,a;if(this.dualStack?(n==null&&(i==null||i===J5?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),o[n]!=null&&o[n].ips.length>0?a=o[n]:a=o[n===4?6:4]):a=o[n],a==null||a.ips.length===0)return s;a.offset==null||a.offset===J5?a.offset=0:a.offset++;let c=a.offset%a.ips.length;return s=a.ips[c]??null,s==null?s:Date.now()-s.timestamp>s.ttl?(a.ips.splice(c,1),this.pick(e,r,n)):s}setRecords(e,r){let n=Date.now(),s={records:{4:null,6:null}};for(let o of r){o.timestamp=n,typeof o.ttl=="number"?o.ttl=Math.min(o.ttl,this.#e):o.ttl=this.#e;let i=s.records[o.family]??{ips:[]};i.ips.push(o),s.records[o.family]=i}this.#s.set(e.hostname,s)}getHandler(e,r){return new mL(this,e,r)}},mL=class extends nFe{#e=null;#t=null;#s=null;#n=null;#r=null;constructor(e,{origin:r,handler:n,dispatch:s},o){super(n),this.#r=r,this.#n=n,this.#t={...o},this.#e=e,this.#s=s}onError(e){switch(e.code){case"ETIMEDOUT":case"ECONNREFUSED":{if(this.#e.dualStack){this.#e.runLookup(this.#r,this.#t,(r,n)=>{if(r)return this.#n.o
Line truncated
|
|
|
|
|
${o}`;break;case"retry":QZ(o)&&(r[s]=o);break;case"id":_Z(o)&&(r[s]=o);break;case"event":o.length>0&&(r[s]=o);break}}processEvent(e){e.retry&&QZ(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&_Z(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}}};vZ.exports={EventSourceStream:ZL}});var $Z=C((QQt,qZ)=>{"use strict";var{pipeline:mqe}=require("node:stream"),{fetching:fqe}=Lh(),{makeRequest:gqe}=Em(),{webidl:_c}=yn(),{EventSourceStream:hqe}=DZ(),{parseMIMEType:yqe}=bs(),{createFastMessageEvent:Eqe}=Bm(),{isNetworkError:kZ}=Dh(),{delay:Cqe}=KL(),{kEnumerableProperty:Gd}=tt(),{environmentSettingsObject:LZ}=Gs(),OZ=!1,FZ=3e3,Wh=0,MZ=1,Jh=2,Iqe="anonymous",bqe="use-credentials",Pm=class t extends EventTarget{#e={open:null,error:null,message:null};#t=null;#s=!1;#n=Wh;#r=null;#o=null;#i;#a;constructor(e,r={}){super(),_c.util.markAsUncloneable(this);let n="EventSource constructor";_c.argumentLengthCheck(arguments,1,n),OZ||(OZ=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=_c.converters.USVString(e,n,"url"),r=_c.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#i=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:FZ};let s=LZ,o;try{o=new URL(e,s.settingsObject.baseUrl),this.#a.origin=o.origin}catch(c){throw new DOMException(c,"SyntaxError")}this.#t=o.href;let i=Iqe;r.withCredentials&&(i=bqe,this.#s=!0);let a={redirect:"follow",keepalive:!0,mode:"cors",credentials:i==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};a.client=LZ.settingsObject,a.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],a.cache="no-store",a.initiator="other",a.urlList=[new URL(this.#t)],this.#r=gqe(a),this.#c()}get readyState(){return this.#n}get url(){return this.#t}get withCredentials(){return this.#s}#c(){if(this.#n===Jh)return;this.#n=Wh;let e={request:this.#r,dispatcher:this.#i},r=n=>{kZ(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#l()};e.processResponseEndOfBody=r,e.processResponse=n=>{if(kZ(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#l();return}let s=n.headersList.get("content-type",!0),o=s!==null?yqe(s):"failure",i=o!=="failure"&&o.essence==="text/event-stream";if(n.status!==200||i===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#n=MZ,this.dispatchEvent(new Event("open")),this.#a.origin=n.urlList[n.urlList.length-1].origin;let a=new hqe({eventSourceSettings:this.#a,push:c=>{this.dispatchEvent(Eqe(c.type,c.options))}});mqe(n.body.stream,a,c=>{c?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#o=fqe(e)}async#l(){this.#n!==Jh&&(this.#n=Wh,this.dispatchEvent(new Event("error")),await Cqe(this.#a.reconnectionTime),this.#n===Wh&&(this.#a.lastEventId.length&&this.#r.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#c()))}close(){_c.brandCheck(this,t),this.#n!==Jh&&(this.#n=Jh,this.#o.abort(),this.#r=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}},UZ={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:Wh,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:MZ,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:Jh,writable:!1}};Object.defineProperties(Pm,UZ);Object.defineProperties(Pm.prototype,UZ);Object.defineProperties(Pm.prototype,{close:Gd,onerror:Gd,onmessage:Gd,onopen:Gd,readyState:Gd,url:Gd,withCredentials:Gd});_c.converters.EventSourceInitDict=_c.dictionaryConverter([{key:"withCredentials",converter:_c.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:_c.converters.any}]);qZ.exports={EventSource:Pm,defaultReconnectionTime:FZ}});var ow=C((_Qt,Te)=>{"use strict";var xqe=sm(),GZ=eh(),wqe=om(),Bqe=U8(),Sqe=im(),Rqe=wk(),Nqe=u9(),Tqe=g9(),HZ=ft(),sw=tt(),{InvalidArgumentError:nw}=HZ,Qm=r5(),Pqe=rh(),Qqe=oL(),_qe=F5(),vqe=cL(),Dqe=Vk(),kqe=ix(),{getGlobalDispatcher:zZ,setGlobalDispatcher:Lqe}=gx(),Oqe=hx(),Fqe=Wb(),Mqe=Jb();Object.assign(GZ.prototype,Qm);Te.exports.Dispatcher=GZ;Te.exports.Client=xqe;Te.exports.Pool=wqe;Te.exports.BalancedPool=Bqe;Te.exports.Agent=Sqe;Te.exports.ProxyAgent=Rqe;Te.exports.EnvHttpProxyAgent=Nqe;Te.exports.RetryAgent=Tqe;Te.exports.Retry
Line truncated
|
|
|
|
|
%s`,F,F,b,n);var q=b.type==="*"?HO:b.type==="?"?GO:"\\"+b.type;s=!0,n=n.slice(0,b.reStart)+q+"\\("+F}g(),o&&(n+="\\\\");var X=!1;switch(n.charAt(0)){case"[":case".":case"(":X=!0}for(var V=a.length-1;V>-1;V--){var Ee=a[V],Ne=n.slice(0,Ee.reStart),ee=n.slice(Ee.reStart,Ee.reEnd-8),Ge=n.slice(Ee.reEnd-8,Ee.reEnd),ae=n.slice(Ee.reEnd);Ge+=ae;var ut=Ne.split("(").length-1,nn=ae;for(E=0;E<ut;E++)nn=nn.replace(/\)[+*?]?/,"");ae=nn;var vt="";ae===""&&e!==Bw&&(vt="$");var wt=Ne+ee+ae+vt+Ge;n=wt}if(n!==""&&s&&(n="(?=.)"+n),X&&(n=p+n),e===Bw)return[n,s];if(!s)return $2e(t);var Kn=r.nocase?"i":"";try{var Xn=new RegExp("^"+n+"$",Kn)}catch{return new RegExp("$.")}return Xn._glob=t,Xn._src=n,Xn}to.makeRe=function(t,e){return new Or(t,e||{}).makeRe()};Or.prototype.makeRe=q2e;function q2e(){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?HO:e.dot?v2e:D2e,n=e.nocase?"i":"",s=t.map(function(o){return o.map(function(i){return i===Jd?r:typeof i=="string"?G2e(i):i._src}).join("\\/")}).join("|");s="^(?:"+s+")$",this.negate&&(s="^(?!"+s+").*$");try{this.regexp=new RegExp(s,n)}catch{this.regexp=!1}return this.regexp}to.match=function(t,e,r){r=r||{};var n=new Or(e,r);return t=t.filter(function(s){return n.match(s)}),n.options.nonull&&!t.length&&t.push(e),t};Or.prototype.match=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;Ay.sep!=="/"&&(e=e.split(Ay.sep).join("/")),e=e.split(Tte),this.debug(this.pattern,"split",e);var s=this.set;this.debug(this.pattern,"set",s);var o,i;for(i=e.length-1;i>=0&&(o=e[i],!o);i--);for(i=0;i<s.length;i++){var a=s[i],c=e;n.matchBase&&a.length===1&&(c=[o]);var l=this.matchOne(c,a,r);if(l)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate};Or.prototype.matchOne=function(t,e,r){return e.indexOf(Jd)!==-1?this._matchGlobstar(t,e,r,0,0):this._matchOne(t,e,r,0,0)};Or.prototype._matchGlobstar=function(t,e,r,n,s){var o,i=-1;for(o=s;o<e.length;o++)if(e[o]===Jd){i=o;break}var a=-1;for(o=e.length-1;o>=0;o--)if(e[o]===Jd){a=o;break}var c=e.slice(s,i),l=r?e.slice(i+1):e.slice(i+1,a),u=r?[]:e.slice(a+1);if(c.length){var d=t.slice(n,n+c.length);if(!this._matchOne(d,c,r,0,0))return!1;n+=c.length}var p=0;if(u.length){if(u.length+n>t.length)return!1;var A=t.length-u.length;if(this._matchOne(t,u,r,A,0))p=u.length;else{if(t[t.length-1]!==""||n+u.length===t.length||(A--,!this._matchOne(t,u,r,A,0)))return!1;p=u.length+1}}if(!l.length){var g=!!p;for(o=n;o<t.length-p;o++){var E=String(t[o]);if(g=!0,E==="."||E===".."||!this.options.dot&&E.charAt(0)===".")return!1}return r||g}for(var I=[[[],0]],x=I[0],b=0,P=[0],v=0;v<l.length;v++){var F=l[v];F===Jd?(P.push(b),x=[[],0],I.push(x)):(x[0].push(F),b++)}for(var q=I.length-1,X=t.length-p,V=0;V<I.length;V++)I[V][1]=X-(P[q--]+I[V][0].length);return!!this._matchGlobStarBodySections(t,I,n,0,r,0,!!p)};Or.prototype._matchGlobStarBodySections=function(t,e,r,n,s,o,i){var a=e[n];if(!a){for(var c=r;c<t.length;c++){i=!0;var l=t[c];if(l==="."||l===".."||!this.options.dot&&l.charAt(0)===".")return!1}return i}for(var u=a[0],d=a[1];r<=d;){var p=this._matchOne(t.slice(0,r+u.length),u,s,r,0);if(p&&o<this.maxGlobstarRecursion){var A=this._matchGlobStarBodySections(t,e,r+u.length,n+1,s,o+1,i);if(A!==!1)return A}var l=t[r];if(l==="."||l===".."||!this.options.dot&&l.charAt(0)===".")return!1;r++}return s||null};Or.prototype._matchOne=function(t,e,r,n,s){var o,i,a,c;for(o=n,i=s,a=t.length,c=e.length;o<a&&i<c;o++,i++){this.debug("matchOne loop");var l=e[i],u=t[o];if(this.debug(e,l,u),l===!1||l===Jd)return!1;var d;if(typeof l=="string"?(d=u===l,this.debug("string match",l,u,d)):(d=u.match(l),this.debug("pattern match",l,u,d)),!d)return!1}if(o===a&&i===c)return!0;if(o===a)return r;if(i===c)return o===a-1&&t[o]==="";throw new Error("wtf?")};function $2e(t){return t.replace(/\\(.)/g,"$1")}function G2e(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}});var gy=C((xvt,Lte)=>{"use strict";var K2e="2.0.0",X2e=Number.MAX_SAFE_INTEGER||9007199254740991,Z2e=16,eze=250,tze=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Lte.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:Z2e,MAX_SAFE_BUILD_LENGTH:eze,MAX_SAFE_INTEGER:X2e,RELEASE_TYPES:tze,SEMVER_SPEC_VERSION:K2e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var hy=C((wvt,Ote)=>{"use strict";var rze=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Ote.exports=rze});var qm=C((ya,Fte)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:VO,MAX_SAFE_BUILD_LENGTH:nze,MAX_LENGTH:sze}=gy(),oze=hy();ya=Fte.exports={};var ize=ya.re=[],aze=ya.safeRe=[],ne=ya.src=[],cze=ya.safeSrc=[],se=ya.t={},lze=0,YO="[a-zA-Z0-9-]",uze=[["\\s",1],["\\d",sze],[YO,nze]],dze=t=>{for(let[e,r]of uze)t=t.split(`${e}*`).join(`${e}{0,${r}}`).
Line truncated
|
|
|
|
|
`.trim())}};xte.exports=K1});var Hb=I((Izt,Tte)=>{"use strict";var Bte=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:RYe}=rt(),NYe=aA();Nte()===void 0&&Rte(new NYe);function Rte(t){if(!t||typeof t.dispatch!="function")throw new RYe("Argument agent must implement Agent");Object.defineProperty(globalThis,Bte,{value:t,writable:!0,enumerable:!1,configurable:!1})}i(Rte,"setGlobalDispatcher");function Nte(){return globalThis[Bte]}i(Nte,"getGlobalDispatcher");Tte.exports={setGlobalDispatcher:Rte,getGlobalDispatcher:Nte}});var $b=I((xzt,vte)=>{"use strict";vte.exports=class{static{i(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 Qte=I((Bzt,Pte)=>{"use strict";var TYe=wb();Pte.exports=t=>{let e=t?.maxRedirections;return r=>i(function(s,o){let{maxRedirections:a=e,...c}=s;if(!a)return r(s,o);let l=new TYe(r,a,s,o);return r(c,l)},"redirectInterceptor")}});var Dte=I((Nzt,_te)=>{"use strict";var vYe=_b();_te.exports=t=>e=>i(function(n,s){return e(n,new vYe({...n,retryOptions:{...t,...n.retryOptions}},{handler:s,dispatch:e}))},"retryInterceptor")});var Lte=I((vzt,kte)=>{"use strict";var PYe=He(),{InvalidArgumentError:QYe,RequestAbortedError:_Ye}=rt(),DYe=$b(),X1=class extends DYe{static{i(this,"DumpHandler")}#e=1024*1024;#t=null;#r=!1;#o=!1;#s=0;#n=null;#i=null;constructor({maxSize:e},r){if(super(r),e!=null&&(!Number.isFinite(e)||e<1))throw new QYe("maxSize must be a number greater than 0");this.#e=e??this.#e,this.#i=r}onConnect(e){this.#t=e,this.#i.onConnect(this.#a.bind(this))}#a(e){this.#o=!0,this.#n=e}onHeaders(e,r,n,s){let a=PYe.parseHeaders(r)["content-length"];if(a!=null&&a>this.#e)throw new _Ye(`Response size (${a}) larger than maxSize (${this.#e})`);return this.#o?!0:this.#i.onHeaders(e,r,n,s)}onError(e){this.#r||(e=this.#n??e,this.#i.onError(e))}onData(e){return this.#s=this.#s+e.length,this.#s>=this.#e&&(this.#r=!0,this.#o?this.#i.onError(this.#n):this.#i.onComplete([])),!0}onComplete(e){if(!this.#r){if(this.#o){this.#i.onError(this.reason);return}this.#i.onComplete(e)}}};function kYe({maxSize:t}={maxSize:1024*1024}){return e=>i(function(n,s){let{dumpMaxSize:o=t}=n,a=new X1({maxSize:o},s);return e(n,a)},"Intercept")}i(kYe,"createDumpInterceptor");kte.exports=kYe});var Fte=I((Qzt,Mte)=>{"use strict";var{isIP:LYe}=require("node:net"),{lookup:OYe}=require("node:dns"),MYe=$b(),{InvalidArgumentError:gA,InformationalError:FYe}=rt(),Ote=Math.pow(2,31)-1,Z1=class{static{i(this,"DNSInstance")}#e=0;#t=0;#r=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.#o,this.pick=e.pick??this.#s}get full(){return this.#r.size===this.#t}runLookup(e,r,n){let s=this.#r.get(e.hostname);if(s==null&&this.full){n(null,e.origin);return}let o={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,o,(a,c)=>{if(a||c==null||c.length===0){n(a??new FYe("No DNS entries found"));return}this.setRecords(e,c);let l=this.#r.get(e.hostname),u=this.pick(e,l,o.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,o.affinity);if(a==null){this.#r.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}`)}}#o(e,r,n){OYe(e.hostname,{all:!0,family:this.dualStack===!1?this.affinity:0,order:"ipv4first"},(s,o)=>{if(s)return n(s);let a=new Map;for(let c of o)a.set(`${c.address}:${c.family}`,c);n(null,a.values())})}#s(e,r,n){let s=null,{records:o,offset:a}=r,c;if(this.dualStack?(n==null&&(a==null||a===Ote?(r.offset=0,n=4):(r.offset++,n=(r.offset&1)===1?6:4)),o[n]!=null&&o[n].ips.length>0?c=o[n]:c=o[n===4?6:4]):c=o[n],c==null||c.ips.length===0)return s;c.offset==null||c.offset===Ote?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 o of r){o.timestamp=n,typeof o.ttl=="number"?o.ttl=Math.min(o.ttl,this.#e):o.ttl=this.#e;let a=s.records[o.family]??{ips:[]};a.ips.push(o),s.records[o.family]=a}this.#r.set(e.hostname,s)}getHandler(e,r){return new eU(this,e,r)}},eU=class extends MYe{static{i(this,"DNSDispatchHan
Line truncated
|
|
|
|
|
${o}`;break;case"retry":yse(o)&&(r[s]=o);break;case"id":Ese(o)&&(r[s]=o);break;case"event":o.length>0&&(r[s]=o);break}}processEvent(e){e.retry&&yse(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),e.id&&Ese(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}}};Cse.exports={EventSourceStream:qU}});var Tse=I((k3t,Nse)=>{"use strict";var{pipeline:Wje}=require("node:stream"),{fetching:Yje}=EE(),{makeRequest:Jje}=CA(),{webidl:xl}=sn(),{EventSourceStream:jje}=Ise(),{parseMIMEType:Kje}=ms(),{createFastMessageEvent:Xje}=BA(),{isNetworkError:wse}=gE(),{delay:Zje}=FU(),{kEnumerableProperty:Fp}=He(),{environmentSettingsObject:Sse}=zs(),xse=!1,bse=3e3,_E=0,Bse=1,DE=2,e6e="anonymous",t6e="use-credentials",PA=class t extends EventTarget{static{i(this,"EventSource")}#e={open:null,error:null,message:null};#t=null;#r=!1;#o=_E;#s=null;#n=null;#i;#a;constructor(e,r={}){super(),xl.util.markAsUncloneable(this);let n="EventSource constructor";xl.argumentLengthCheck(arguments,1,n),xse||(xse=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=xl.converters.USVString(e,n,"url"),r=xl.converters.EventSourceInitDict(r,n,"eventSourceInitDict"),this.#i=r.dispatcher,this.#a={lastEventId:"",reconnectionTime:bse};let s=Sse,o;try{o=new URL(e,s.settingsObject.baseUrl),this.#a.origin=o.origin}catch(l){throw new DOMException(l,"SyntaxError")}this.#t=o.href;let a=e6e;r.withCredentials&&(a=t6e,this.#r=!0);let c={redirect:"follow",keepalive:!0,mode:"cors",credentials:a==="anonymous"?"same-origin":"omit",referrer:"no-referrer"};c.client=Sse.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=Jje(c),this.#l()}get readyState(){return this.#o}get url(){return this.#t}get withCredentials(){return this.#r}#l(){if(this.#o===DE)return;this.#o=_E;let e={request:this.#s,dispatcher:this.#i},r=i(n=>{wse(n)&&(this.dispatchEvent(new Event("error")),this.close()),this.#c()},"processEventSourceEndOfBody");e.processResponseEndOfBody=r,e.processResponse=n=>{if(wse(n))if(n.aborted){this.close(),this.dispatchEvent(new Event("error"));return}else{this.#c();return}let s=n.headersList.get("content-type",!0),o=s!==null?Kje(s):"failure",a=o!=="failure"&&o.essence==="text/event-stream";if(n.status!==200||a===!1){this.close(),this.dispatchEvent(new Event("error"));return}this.#o=Bse,this.dispatchEvent(new Event("open")),this.#a.origin=n.urlList[n.urlList.length-1].origin;let c=new jje({eventSourceSettings:this.#a,push:i(l=>{this.dispatchEvent(Xje(l.type,l.options))},"push")});Wje(n.body.stream,c,l=>{l?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#n=Yje(e)}async#c(){this.#o!==DE&&(this.#o=_E,this.dispatchEvent(new Event("error")),await Zje(this.#a.reconnectionTime),this.#o===_E&&(this.#a.lastEventId.length&&this.#s.headersList.set("last-event-id",this.#a.lastEventId,!0),this.#l()))}close(){xl.brandCheck(this,t),this.#o!==DE&&(this.#o=DE,this.#n.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}},Rse={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:_E,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:Bse,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:DE,writable:!1}};Object.defineProperties(PA,Rse);Object.defineProperties(PA.prototype,Rse);Object.defineProperties(PA.prototype,{close:Fp,onerror:Fp,onmessage:Fp,onopen:Fp,readyState:Fp,url:Fp,withCredentials:Fp});xl.converters.EventSourceInitDict=xl.dictionaryConverter([{key:"withCredentials",converter:xl.converters.boolean,defaultValue:i(()=>!1,"defaultValue")},{key:"dispatcher",converter:xl.converters.any}]);Nse.exports={EventSource:PA,defaultReconnectionTime:bse}});var Up=I((O3t,Ie)=>{"use strict";var r6e=oA(),vse=Oy(),n6e=iA(),s6e=RZ(),o6e=aA(),i6e=u1(),a6e=KZ(),c6e=nee(),Pse=rt(),P0=He(),{InvalidArgumentError:v0}=Pse,QA=Hee(),l6e=Fy(),u6e=z1(),d6e=bte(),p6e=Y1(),m6e=Q1(),f6e=_b(),{getGlobalDispatcher:Qse,setGlobalDispatcher:A6e}=Hb(),h6e=$b(),g6e=wb(),y6e=Sb();Object.assign(vse.prototype,QA);Ie.exports.Dispatcher=vse;Ie.exports.Client=r6e;Ie.exports.Pool=n6e;Ie.exports.BalancedPool=
Line truncated
|
|
|
|
|
%s`,N,N,w,n);var P=w.type==="*"?U2:w.type==="?"?F2:"\\"+w.type;s=!0,n=n.slice(0,w.reStart)+P+"\\("+N}A(),o&&(n+="\\\\");var _=!1;switch(n.charAt(0)){case"[":case".":case"(":_=!0}for(var re=c.length-1;re>-1;re--){var ye=c[re],ae=n.slice(0,ye.reStart),qe=n.slice(ye.reStart,ye.reEnd-8),ne=n.slice(ye.reEnd-8,ye.reEnd),K=n.slice(ye.reEnd);ne+=K;var U=ae.split("(").length-1,wt=K;for(h=0;h<U;h++)wt=wt.replace(/\)[+*?]?/,"");K=wt;var X="";K===""&&e!==rB&&(X="$");var lt=ae+qe+K+X+ne;n=lt}if(n!==""&&s&&(n="(?=.)"+n),_&&(n=m+n),e===rB)return[n,s];if(!s)return M7e(t);var Ia=r.nocase?"i":"";try{var hu=new RegExp("^"+n+"$",Ia)}catch{return new RegExp("$.")}return hu._glob=t,hu._src=n,hu}i(L7e,"parse");ro.makeRe=function(t,e){return new vr(t,e||{}).makeRe()};vr.prototype.makeRe=O7e;function O7e(){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?U2:e.dot?T7e:v7e,n=e.nocase?"i":"",s=t.map(function(o){return o.map(function(a){return a===Wp?r:typeof a=="string"?F7e(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}i(O7e,"makeRe");ro.match=function(t,e,r){r=r||{};var n=new vr(e,r);return t=t.filter(function(s){return n.match(s)}),n.options.nonull&&!t.length&&t.push(e),t};vr.prototype.match=i(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;sC.sep!=="/"&&(e=e.split(sC.sep).join("/")),e=e.split(kae),this.debug(this.pattern,"split",e);var s=this.set;this.debug(this.pattern,"set",s);var o,a;for(a=e.length-1;a>=0&&(o=e[a],!o);a--);for(a=0;a<s.length;a++){var c=s[a],l=e;n.matchBase&&c.length===1&&(l=[o]);var u=this.matchOne(l,c,r);if(u)return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate},"match");vr.prototype.matchOne=function(t,e,r){return e.indexOf(Wp)!==-1?this._matchGlobstar(t,e,r,0,0):this._matchOne(t,e,r,0,0)};vr.prototype._matchGlobstar=function(t,e,r,n,s){var o,a=-1;for(o=s;o<e.length;o++)if(e[o]===Wp){a=o;break}var c=-1;for(o=e.length-1;o>=0;o--)if(e[o]===Wp){c=o;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 p=t.slice(n,n+l.length);if(!this._matchOne(p,l,r,0,0))return!1;n+=l.length}var m=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))m=d.length;else{if(t[t.length-1]!==""||n+d.length===t.length||(f--,!this._matchOne(t,d,r,f,0)))return!1;m=d.length+1}}if(!u.length){var A=!!m;for(o=n;o<t.length-m;o++){var h=String(t[o]);if(A=!0,h==="."||h===".."||!this.options.dot&&h.charAt(0)===".")return!1}return r||A}for(var E=[[[],0]],C=E[0],w=0,x=[0],b=0;b<u.length;b++){var N=u[b];N===Wp?(x.push(w),C=[[],0],E.push(C)):(C[0].push(N),w++)}for(var P=E.length-1,_=t.length-m,re=0;re<E.length;re++)E[re][1]=_-(x[P--]+E[re][0].length);return!!this._matchGlobStarBodySections(t,E,n,0,r,0,!!m)};vr.prototype._matchGlobStarBodySections=function(t,e,r,n,s,o,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],p=c[1];r<=p;){var m=this._matchOne(t.slice(0,r+d.length),d,s,r,0);if(m&&o<this.maxGlobstarRecursion){var f=this._matchGlobStarBodySections(t,e,r+d.length,n+1,s,o+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};vr.prototype._matchOne=function(t,e,r,n,s){var o,a,c,l;for(o=n,a=s,c=t.length,l=e.length;o<c&&a<l;o++,a++){this.debug("matchOne loop");var u=e[a],d=t[o];if(this.debug(e,u,d),u===!1||u===Wp)return!1;var p;if(typeof u=="string"?(p=d===u,this.debug("string match",u,d,p)):(p=d.match(u),this.debug("pattern match",u,d,p)),!p)return!1}if(o===c&&a===l)return!0;if(o===c)return r;if(a===l)return o===c-1&&t[o]==="";throw new Error("wtf?")};function M7e(t){return t.replace(/\\(.)/g,"$1")}i(M7e,"globUnescape");function F7e(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}i(F7e,"regExpEscape")});var qA=I((kJt,Gae)=>{"use strict";var W7e="2.0.0",Y7e=Number.MAX_SAFE_INTEGER||9007199254740991,J7e=16,j7e=250,K7e=["major","premajor","minor","preminor","patch","prepatch","prerelease"];Gae.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:J7e,MAX_SAFE_BUILD_LENGTH:j7e,MAX_SAFE_INTEGER:Y7e,RELEASE_TYPES:K7e,SEMVER_SPEC_VERSION:W7e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var aC=I((LJt,Hae)=>{"use strict";var X7e=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};Hae.exports=X7e});var GA=I((Oa,$ae)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:G2,MAX_SAFE_BUILD_LENGTH:Z7e,MAX_LENGTH:eZe}=qA(),tZe=aC();Oa=$ae.exports={};var rZe=Oa.re=[],nZe=Oa.safeRe=[],z=Oa.src=[],sZe=Oa.safeSrc=[],V=Oa.t={},oZe=0,H2="[a-zA-Z0-9-]",iZe=[["\\s",1],["\\d",e
Line truncated
|
|
|
|
|
`).join(`
|
|
|
|
|
`+o),t.push(s+"m+"+AB.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=kje()+e+" "+t[0]}function kje(){return En.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Lje(...t){return process.stderr.write(pB.format(...t)+`
|
|
|
|
|
`)}function Oje(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Fje(){return process.env.DEBUG}function Mje(t){t.inspectOpts={};let e=Object.keys(En.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=En.inspectOpts[e[r]]}AB.exports=_F()(En);var{formatters:Ese}=AB.exports;Ese.o=function(t){return this.inspectOpts.colors=this.useColors,pB.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};Ese.O=function(t){return this.inspectOpts.colors=this.useColors,pB.inspect(t,this.inspectOpts)}});var ap=C((Ukt,kF)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?kF.exports=Ase():kF.exports=Cse()});var xse=C(Qs=>{"use strict";var Uje=Qs&&Qs.__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:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),qje=Qs&&Qs.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Ise=Qs&&Qs.__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)&&Uje(e,t,r);return qje(e,t),e};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.req=Qs.json=Qs.toBuffer=void 0;var $je=Ise(require("http")),Gje=Ise(require("https"));async function bse(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}Qs.toBuffer=bse;async function Hje(t){let r=(await bse(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}Qs.json=Hje;function zje(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?Gje:$je).request(t,e),s=new Promise((o,i)=>{n.once("response",o).once("error",i).end()});return n.then=s.then.bind(s),n}Qs.req=zje});var Rse=C(oo=>{"use strict";var Bse=oo&&oo.__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:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Vje=oo&&oo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Sse=oo&&oo.__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)&&Bse(e,t,r);return Vje(e,t),e},Yje=oo&&oo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Bse(e,t,r)};Object.defineProperty(oo,"__esModule",{value:!0});oo.Agent=void 0;var jje=Sse(require("net")),wse=Sse(require("http")),Wje=require("https");Yje(xse(),oo);var Ia=Symbol("AgentBaseInternalState"),LF=class extends wse.Agent{constructor(e){super(e),this[Ia]={}}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 jje.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))?Wje.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},o=this.getName(s),i=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,s)).then(a=>{if(this.decrementSockets(o,i),a instanceof wse.Agent)try{return a.addRequest(e,s)}catch(c){return n(c)}this[Ia].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(o,i),n(a)})}createConnection(){let e=this[Ia].currentSocket;if(this[Ia].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Ia].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Ia]&&(this[Ia].defaultPort=e)}get protocol(){return this[Ia].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Ia]&&(this[Ia].protocol=e)}};oo.Agent=LF});var Nse=C(Jm=>{"use strict";var Jje=Jm&&Jm.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Jm,"__esModule",{value:!0});Jm.parseProxyResponse=void 0;var Kje=Jje(ap()),mB=(0,Kje.default)("https-proxy-agent:parse-proxy-response");function Xje(t){return new Promise((e,r)=>{let n=0,s=[];function o(){let u=t.read();u?l(u):t.once("readable",o)}function i(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",o)}function a(){i(),mB("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function c(u){i(),mB("onerror %o",u),r(u)}function l(u){s.push(u),n+=u.length;let d=Buffer.concat(s,n),p=d.indexOf(`\r
|
|
|
|
|
`+o),t.push(s+"m+"+VB.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=Xrt()+e+" "+t[0]}i(Krt,"formatArgs");function Xrt(){return cn.inspectOpts.hideDate?"":new Date().toISOString()+" "}i(Xrt,"getDate");function Zrt(...t){return process.stderr.write(zB.format(...t)+`
|
|
|
|
|
`)}i(Zrt,"log");function ent(t){t?process.env.DEBUG=t:delete process.env.DEBUG}i(ent,"save");function tnt(){return process.env.DEBUG}i(tnt,"load");function rnt(t){t.inspectOpts={};let e=Object.keys(cn.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=cn.inspectOpts[e[r]]}i(rnt,"init");VB.exports=Qq()(cn);var{formatters:Tue}=VB.exports;Tue.o=function(t){return this.inspectOpts.colors=this.useColors,zB.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};Tue.O=function(t){return this.inspectOpts.colors=this.useColors,zB.inspect(t,this.inspectOpts)}});var nm=I((B6t,kq)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?kq.exports=Sue():kq.exports=vue()});var _ue=I(ws=>{"use strict";var nnt=ws&&ws.__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:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),snt=ws&&ws.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Pue=ws&&ws.__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)&&nnt(e,t,r);return snt(e,t),e};Object.defineProperty(ws,"__esModule",{value:!0});ws.req=ws.json=ws.toBuffer=void 0;var ont=Pue(require("http")),int=Pue(require("https"));async function Que(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}i(Que,"toBuffer");ws.toBuffer=Que;async function ant(t){let r=(await Que(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}i(ant,"json");ws.json=ant;function cnt(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?int:ont).request(t,e),s=new Promise((o,a)=>{n.once("response",o).once("error",a).end()});return n.then=s.then.bind(s),n}i(cnt,"req");ws.req=cnt});var Oue=I(ao=>{"use strict";var kue=ao&&ao.__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:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),lnt=ao&&ao.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Lue=ao&&ao.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&kue(e,t,r);return lnt(e,t),e},unt=ao&&ao.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kue(e,t,r)};Object.defineProperty(ao,"__esModule",{value:!0});ao.Agent=void 0;var dnt=Lue(require("net")),Due=Lue(require("http")),pnt=require("https");unt(_ue(),ao);var qa=Symbol("AgentBaseInternalState"),Lq=class extends Due.Agent{static{i(this,"Agent")}constructor(e){super(e),this[qa]={}}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 dnt.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))?pnt.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},o=this.getName(s),a=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(o,a),c instanceof Due.Agent)try{return c.addRequest(e,s)}catch(l){return n(l)}this[qa].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(o,a),n(c)})}createConnection(){let e=this[qa].currentSocket;if(this[qa].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[qa].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[qa]&&(this[qa].defaultPort=e)}get protocol(){return this[qa].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[qa]&&(this[qa].protocol=e)}};ao.Agent=Lq});var Mue=I(XA=>{"use strict";var mnt=XA&&XA.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(XA,"__esModule",{value:!0});XA.parseProxyResponse=void 0;var fnt=mnt(nm()),WB=(0,fnt.default)("https-proxy-agent:parse-proxy-response");function Ant(t){return new Promise((e,r)=>{let n=0,s=[];function o(){let d=t.read();d?u(d):t.once("readable",o)}i(o,"read");function a(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("readable",o)}i(a,"cleanup");function c(){a(),WB("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}i(c,"onend");function l(d){a(),WB("onerror %o",d),r(d)}i(l,"onerror");function u(d){s.push(d),n+=d.length;let p=Buffer.concat(s,n),m=p.indexOf(`\r
|
|
|
|
|
\r
|
|
|
|
|
`);if(p===-1){mB("have not received end of HTTP headers yet..."),o();return}let A=d.slice(0,p).toString("ascii").split(`\r
|
|
|
|
|
`),g=A.shift();if(!g)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let E=g.split(" "),I=+E[1],x=E.slice(2).join(" "),b={};for(let P of A){if(!P)continue;let v=P.indexOf(":");if(v===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${P}"`));let F=P.slice(0,v).toLowerCase(),q=P.slice(v+1).trimStart(),X=b[F];typeof X=="string"?b[F]=[X,q]:Array.isArray(X)?X.push(q):b[F]=q}mB("got proxy server response: %o %o",g,b),i(),e({connect:{statusCode:I,statusText:x,headers:b},buffered:d})}t.on("error",c),t.on("end",a),o()})}Jm.parseProxyResponse=Xje});var Dse=C(Uo=>{"use strict";var Zje=Uo&&Uo.__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:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),eWe=Uo&&Uo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),_se=Uo&&Uo.__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)&&Zje(e,t,r);return eWe(e,t),e},vse=Uo&&Uo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Uo,"__esModule",{value:!0});Uo.HttpsProxyAgent=void 0;var fB=_se(require("net")),Tse=_se(require("tls")),tWe=vse(require("assert")),rWe=vse(ap()),nWe=Rse(),sWe=require("url"),oWe=Nse(),Qy=(0,rWe.default)("https-proxy-agent"),Pse=t=>t.servername===void 0&&t.host&&!fB.isIP(t.host)?{...t,servername:t.host}:t,gB=class extends nWe.Agent{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new sWe.URL(e):e,this.proxyHeaders=r?.headers??{},Qy("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?Qse(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:"?(Qy("Creating `tls.Socket`: %o",this.connectOpts),s=Tse.connect(Pse(this.connectOpts))):(Qy("Creating `net.Socket`: %o",this.connectOpts),s=fB.connect(this.connectOpts));let o=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},i=fB.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${i}:${r.port} HTTP/1.1\r
|
|
|
|
|
`;if(n.username||n.password){let p=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}o.Host=`${i}:${r.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(o))a+=`${p}: ${o[p]}\r
|
|
|
|
|
`;let c=(0,oWe.parseProxyResponse)(s);s.write(`${a}\r
|
|
|
|
|
`);let{connect:l,buffered:u}=await c;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),l.statusCode===200)return e.once("socket",iWe),r.secureEndpoint?(Qy("Upgrading socket connection to TLS"),Tse.connect({...Qse(Pse(r),"host","path","port"),socket:s})):s;s.destroy();let d=new fB.Socket({writable:!1});return d.readable=!0,e.once("socket",p=>{Qy("Replaying proxy buffer for failed request"),(0,tWe.default)(p.listenerCount("data")>0),p.push(u),p.push(null)}),d}};gB.protocols=["http","https"];Uo.HttpsProxyAgent=gB;function iWe(t){t.resume()}function Qse(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var Ose=C(_s=>{"use strict";var aWe=_s&&_s.__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:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),cWe=_s&&_s.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),kse=_s&&_s.__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)&&aWe(e,t,r);return cWe(e,t),e};Object.defineProperty(_s,"__esModule",{value:!0});_s.req=_s.json=_s.toBuffer=void 0;var lWe=kse(require("http")),uWe=kse(require("https"));async function Lse(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}_s.toBuffer=Lse;async function dWe(t){let r=(await Lse(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}_s.json=dWe;function pWe(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?uWe:lWe).request(t,e),s=new Promise((o,i)=>{n.once("response",o).once("error",i).end()});return n.then=s.then.bind(s),n}_s.req=pWe});var Use=C(io=>{"use strict";var Mse=io&&io.__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:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),AWe=io&&io.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),mWe=io&&io.__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)&&Mse(e,t,r);return AWe(e,t),e},fWe=io&&io.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Mse(e,t,r)};Object.defineProperty(io,"__esModule",{value:!0});io.Agent=void 0;var Fse=mWe(require("http"));fWe(Ose(),io);var ba=Symbol("AgentBaseInternalState"),OF=class extends Fse.Agent{constructor(e){super(e),this[ba]={}}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)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)};Promise.resolve().then(()=>this.connect(e,s)).then(o=>{if(o instanceof Fse.Agent)return o.addRequest(e,s);this[ba].currentSocket=o,super.createSocket(e,r,n)},n)}createConnection(){let e=this[ba].currentSocket;if(this[ba].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[ba].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[ba]&&(this[ba].defaultPort=e)}get protocol(){return this[ba].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[ba]&&(this[ba].protocol=e)}};io.Agent=OF});var Gse=C(qo=>{"use strict";var gWe=qo&&qo.__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:function(){return e[r]}}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),hWe=qo&&qo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),$se=qo&&qo.__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)&&gWe(e,t,r);return hWe(e,t),e},yWe=qo&&qo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qo,"__esModule",{value:!0});qo.HttpProxyAgent=void 0;var EWe=$se(require("net")),CWe=$se(require("tls")),IWe=yWe(ap()),bWe=require("events"),xWe=Use(),qse=require("url"),Km=(0,IWe.default)("http-proxy-agent"),hB=class extends xWe.Agent{constructor(e,r){super(r),this.proxy=typeof e=="string"?new qse.URL(e):e,this.proxyHeaders=r?.headers??{},Km("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?wWe(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:",o=e.getHeader("host")||"localhost",i=`${s}//${o}`,a=new qse.URL(e.path,i);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let c=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let l=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;c["Proxy-Authorization"]=`Basic ${Buffer.from(l).toString("base64")}`}c["Proxy-Connection"]||(c["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let l of Object.keys(c)){let u=c[l];u&&e.setHeader(l,u)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,s;Km("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Km("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,s=n.indexOf(`\r
|
|
|
|
|
`);if(m===-1){WB("have not received end of HTTP headers yet..."),o();return}let f=p.slice(0,m).toString("ascii").split(`\r
|
|
|
|
|
`),A=f.shift();if(!A)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let h=A.split(" "),E=+h[1],C=h.slice(2).join(" "),w={};for(let x of f){if(!x)continue;let b=x.indexOf(":");if(b===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${x}"`));let N=x.slice(0,b).toLowerCase(),P=x.slice(b+1).trimStart(),_=w[N];typeof _=="string"?w[N]=[_,P]:Array.isArray(_)?_.push(P):w[N]=P}WB("got proxy server response: %o %o",A,w),a(),e({connect:{statusCode:E,statusText:C,headers:w},buffered:p})}i(u,"ondata"),t.on("error",l),t.on("end",c),o()})}i(Ant,"parseProxyResponse");XA.parseProxyResponse=Ant});var $ue=I(zo=>{"use strict";var hnt=zo&&zo.__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:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),gnt=zo&&zo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Gue=zo&&zo.__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)&&hnt(e,t,r);return gnt(e,t),e},Hue=zo&&zo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(zo,"__esModule",{value:!0});zo.HttpsProxyAgent=void 0;var YB=Gue(require("net")),Fue=Gue(require("tls")),ynt=Hue(require("assert")),Ent=Hue(nm()),Cnt=Oue(),Int=require("url"),wnt=Mue(),wC=(0,Ent.default)("https-proxy-agent"),Uue=i(t=>t.servername===void 0&&t.host&&!YB.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),JB=class extends Cnt.Agent{static{i(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new Int.URL(e):e,this.proxyHeaders=r?.headers??{},wC("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?que(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:"?(wC("Creating `tls.Socket`: %o",this.connectOpts),s=Fue.connect(Uue(this.connectOpts))):(wC("Creating `net.Socket`: %o",this.connectOpts),s=YB.connect(this.connectOpts));let o=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=YB.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
|
|
|
|
`;if(n.username||n.password){let m=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(m).toString("base64")}`}o.Host=`${a}:${r.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let m of Object.keys(o))c+=`${m}: ${o[m]}\r
|
|
|
|
|
`;let l=(0,wnt.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",Snt),r.secureEndpoint?(wC("Upgrading socket connection to TLS"),Fue.connect({...que(Uue(r),"host","path","port"),socket:s})):s;s.destroy();let p=new YB.Socket({writable:!1});return p.readable=!0,e.once("socket",m=>{wC("Replaying proxy buffer for failed request"),(0,ynt.default)(m.listenerCount("data")>0),m.push(d),m.push(null)}),p}};JB.protocols=["http","https"];zo.HttpsProxyAgent=JB;function Snt(t){t.resume()}i(Snt,"resume");function que(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i(que,"omit")});var Wue=I(Ss=>{"use strict";var xnt=Ss&&Ss.__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:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),bnt=Ss&&Ss.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),zue=Ss&&Ss.__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)&&xnt(e,t,r);return bnt(e,t),e};Object.defineProperty(Ss,"__esModule",{value:!0});Ss.req=Ss.json=Ss.toBuffer=void 0;var Bnt=zue(require("http")),Rnt=zue(require("https"));async function Vue(t){let e=0,r=[];for await(let n of t)e+=n.length,r.push(n);return Buffer.concat(r,e)}i(Vue,"toBuffer");Ss.toBuffer=Vue;async function Nnt(t){let r=(await Vue(t)).toString("utf8");try{return JSON.parse(r)}catch(n){let s=n;throw s.message+=` (input: ${r})`,s}}i(Nnt,"json");Ss.json=Nnt;function Tnt(t,e={}){let n=((typeof t=="string"?t:t.href).startsWith("https:")?Rnt:Bnt).request(t,e),s=new Promise((o,a)=>{n.once("response",o).once("error",a).end()});return n.then=s.then.bind(s),n}i(Tnt,"req");Ss.req=Tnt});var jue=I(co=>{"use strict";var Jue=co&&co.__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:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),vnt=co&&co.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Pnt=co&&co.__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)&&Jue(e,t,r);return vnt(e,t),e},Qnt=co&&co.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Jue(e,t,r)};Object.defineProperty(co,"__esModule",{value:!0});co.Agent=void 0;var Yue=Pnt(require("http"));Qnt(Wue(),co);var Ga=Symbol("AgentBaseInternalState"),Oq=class extends Yue.Agent{static{i(this,"Agent")}constructor(e){super(e),this[Ga]={}}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)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)};Promise.resolve().then(()=>this.connect(e,s)).then(o=>{if(o instanceof Yue.Agent)return o.addRequest(e,s);this[Ga].currentSocket=o,super.createSocket(e,r,n)},n)}createConnection(){let e=this[Ga].currentSocket;if(this[Ga].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[Ga].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[Ga]&&(this[Ga].defaultPort=e)}get protocol(){return this[Ga].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[Ga]&&(this[Ga].protocol=e)}};co.Agent=Oq});var Zue=I(Vo=>{"use strict";var _nt=Vo&&Vo.__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:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Dnt=Vo&&Vo.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),Xue=Vo&&Vo.__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)&&_nt(e,t,r);return Dnt(e,t),e},knt=Vo&&Vo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Vo,"__esModule",{value:!0});Vo.HttpProxyAgent=void 0;var Lnt=Xue(require("net")),Ont=Xue(require("tls")),Mnt=knt(nm()),Fnt=require("events"),Unt=jue(),Kue=require("url"),ZA=(0,Mnt.default)("http-proxy-agent"),jB=class extends Unt.Agent{static{i(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new Kue.URL(e):e,this.proxyHeaders=r?.headers??{},ZA("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?qnt(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:",o=e.getHeader("host")||"localhost",a=`${s}//${o}`,c=new Kue.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;ZA("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(ZA("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),Km("Output buffer: %o",e.outputData[0].data));let o;return this.proxy.protocol==="https:"?(Km("Creating `tls.Socket`: %o",this.connectOpts),o=CWe.connect(this.connectOpts)):(Km("Creating `net.Socket`: %o",this.connectOpts),o=EWe.connect(this.connectOpts)),await(0,bWe.once)(o,"connect"),o}};hB.protocols=["http","https"];qo.HttpProxyAgent=hB;function wWe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var doe=C(QB=>{"use strict";Object.defineProperty(QB,"__esModule",{value:!0});QB.state=void 0;QB.state={instrumenterImplementation:void 0}});var Noe=C(LB=>{"use strict";Object.defineProperty(LB,"__esModule",{value:!0});LB.state=void 0;LB.state={operationRequestMap:new WeakMap}});var $ae=C(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});var B8e=require("os"),S8e=require("util");function R8e(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var N8e=R8e(S8e);function T8e(t,...e){process.stderr.write(`${N8e.default.format(t,...e)}${B8e.EOL}`)}var _ae=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,Dae,r$=[],n$=[],JS=[];_ae&&s$(_ae);var kae=Object.assign(t=>Lae(t),{enable:s$,enabled:o$,disable:P8e,log:T8e});function s$(t){Dae=t,r$=[],n$=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?n$.push(new RegExp(`^${n.substr(1)}$`)):r$.push(new RegExp(`^${n}$`));for(let n of JS)n.enabled=o$(n.namespace)}function o$(t){if(t.endsWith("*"))return!0;for(let e of n$)if(e.test(t))return!1;for(let e of r$)if(e.test(t))return!0;return!1}function P8e(){let t=Dae||"";return s$(""),t}function Lae(t){let e=Object.assign(r,{enabled:o$(t),destroy:Q8e,log:kae.log,namespace:t,extend:_8e});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return JS.push(e),e}function Q8e(){let t=JS.indexOf(this);return t>=0?(JS.splice(t,1),!0):!1}function _8e(t){let e=Lae(`${this.namespace}:${t}`);return e.log=this.log,e}var hE=kae,Oae=new Set,jS=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,KS,XS=hE("azure");XS.log=(...t)=>{hE.log(...t)};var i$=["verbose","info","warning","error"];jS&&(qae(jS)?Fae(jS):console.error(`AZURE_LOG_LEVEL set to unknown log level '${jS}'; logging is not enabled. Acceptable values: ${i$.join(", ")}.`));function Fae(t){if(t&&!qae(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${i$.join(",")}`);KS=t;let e=[];for(let r of Oae)Uae(r)&&e.push(r.namespace);hE.enable(e.join(","))}function v8e(){return KS}var vae={verbose:400,info:300,warning:200,error:100};function D8e(t){let e=XS.extend(t);return Mae(XS,e),{error:WS(e,"error"),warning:WS(e,"warning"),info:WS(e,"info"),verbose:WS(e,"verbose")}}function Mae(t,e){e.log=(...r)=>{t.log(...r)}}function WS(t,e){let r=Object.assign(t.extend(e),{level:e});if(Mae(t,r),Uae(r)){let n=hE.disable();hE.enable(n+","+r.namespace)}return Oae.add(r),r}function Uae(t){return!!(KS&&vae[t.level]<=vae[KS])}function qae(t){return i$.includes(t)}mf.AzureLogger=XS;mf.createClientLogger=D8e;mf.getLogLevel=v8e;mf.setLogLevel=Fae});var l$=C(EE=>{"use strict";Object.defineProperty(EE,"__esModule",{value:!0});var ff=new WeakMap,ZS=new WeakMap,yE=class t{constructor(){this.onabort=null,ff.set(this,[]),ZS.set(this,!1)}get aborted(){if(!ZS.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return ZS.get(this)}static get none(){return new t}addEventListener(e,r){if(!ff.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");ff.get(this).push(r)}removeEventListener(e,r){if(!ff.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=ff.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 Gae(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=ff.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),ZS.set(t,!0)}var a$=class extends Error{constructor(e){super(e),this.name="AbortError"}},c$=class{constructor(e){if(this._signal=new yE,!!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(){Gae(this._signal)}static timeout(e){let r=new yE,n=setTimeout(Gae,e,r);return typeof n.unref=="function"&&n.unref(),r}};EE.AbortController=c$;EE.AbortError=a$;EE.AbortSignal=yE});var jae=C(us=>{"use strict";Object.defineProperty(us,"__esModule",{value:!0});var k8e=l$(),A$=require("crypto"),u$,L8e=typeof process<"u"&&!!process.version&&!!(!((u$=process.versions)===null||u$===void 0)&&u$.node);function Hae(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((o,i)=>{function a(){i(new k8e.AbortError(s??"The operation was aborted."))}function c(){n?.removeEventListener("abort",l)}function l(){r?.(),c(),a()}if(n?.aborted)return a();
Line truncated
|
|
|
|
|
`)+4,e.outputData[0].data=e._header+n.substring(s),ZA("Output buffer: %o",e.outputData[0].data));let o;return this.proxy.protocol==="https:"?(ZA("Creating `tls.Socket`: %o",this.connectOpts),o=Ont.connect(this.connectOpts)):(ZA("Creating `net.Socket`: %o",this.connectOpts),o=Lnt.connect(this.connectOpts)),await(0,Fnt.once)(o,"connect"),o}};jB.protocols=["http","https"];Vo.HttpProxyAgent=jB;function qnt(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i(qnt,"omit")});var Ide=I(uR=>{"use strict";Object.defineProperty(uR,"__esModule",{value:!0});uR.state=void 0;uR.state={instrumenterImplementation:void 0}});var Mde=I(AR=>{"use strict";Object.defineProperty(AR,"__esModule",{value:!0});AR.state=void 0;AR.state={operationRequestMap:new WeakMap}});var hfe=I(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});var alt=require("os"),clt=require("util");function llt(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}i(llt,"_interopDefaultLegacy");var ult=llt(clt);function dlt(t,...e){process.stderr.write(`${ult.default.format(t,...e)}${alt.EOL}`)}i(dlt,"log");var ife=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,cfe,A3=[],h3=[],DN=[];ife&&g3(ife);var lfe=Object.assign(t=>ufe(t),{enable:g3,enabled:y3,disable:plt,log:dlt});function g3(t){cfe=t,A3=[],h3=[];let e=/\*/g,r=t.split(",").map(n=>n.trim().replace(e,".*?"));for(let n of r)n.startsWith("-")?h3.push(new RegExp(`^${n.substr(1)}$`)):A3.push(new RegExp(`^${n}$`));for(let n of DN)n.enabled=y3(n.namespace)}i(g3,"enable");function y3(t){if(t.endsWith("*"))return!0;for(let e of h3)if(e.test(t))return!1;for(let e of A3)if(e.test(t))return!0;return!1}i(y3,"enabled");function plt(){let t=cfe||"";return g3(""),t}i(plt,"disable");function ufe(t){let e=Object.assign(r,{enabled:y3(t),destroy:mlt,log:lfe.log,namespace:t,extend:flt});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return i(r,"debug"),DN.push(e),e}i(ufe,"createDebugger");function mlt(){let t=DN.indexOf(this);return t>=0?(DN.splice(t,1),!0):!1}i(mlt,"destroy");function flt(t){let e=ufe(`${this.namespace}:${t}`);return e.log=this.log,e}i(flt,"extend");var lI=lfe,dfe=new Set,QN=typeof process<"u"&&process.env&&process.env.AZURE_LOG_LEVEL||void 0,kN,LN=lI("azure");LN.log=(...t)=>{lI.log(...t)};var E3=["verbose","info","warning","error"];QN&&(Afe(QN)?pfe(QN):console.error(`AZURE_LOG_LEVEL set to unknown log level '${QN}'; logging is not enabled. Acceptable values: ${E3.join(", ")}.`));function pfe(t){if(t&&!Afe(t))throw new Error(`Unknown log level '${t}'. Acceptable values: ${E3.join(",")}`);kN=t;let e=[];for(let r of dfe)ffe(r)&&e.push(r.namespace);lI.enable(e.join(","))}i(pfe,"setLogLevel");function Alt(){return kN}i(Alt,"getLogLevel");var afe={verbose:400,info:300,warning:200,error:100};function hlt(t){let e=LN.extend(t);return mfe(LN,e),{error:_N(e,"error"),warning:_N(e,"warning"),info:_N(e,"info"),verbose:_N(e,"verbose")}}i(hlt,"createClientLogger");function mfe(t,e){e.log=(...r)=>{t.log(...r)}}i(mfe,"patchLogMethod");function _N(t,e){let r=Object.assign(t.extend(e),{level:e});if(mfe(t,r),ffe(r)){let n=lI.disable();lI.enable(n+","+r.namespace)}return dfe.add(r),r}i(_N,"createLogger");function ffe(t){return!!(kN&&afe[t.level]<=afe[kN])}i(ffe,"shouldEnable");function Afe(t){return E3.includes(t)}i(Afe,"isAzureLogLevel");gh.AzureLogger=LN;gh.createClientLogger=hlt;gh.getLogLevel=Alt;gh.setLogLevel=pfe});var w3=I(dI=>{"use strict";Object.defineProperty(dI,"__esModule",{value:!0});var yh=new WeakMap,ON=new WeakMap,uI=class t{static{i(this,"AbortSignal")}constructor(){this.onabort=null,yh.set(this,[]),ON.set(this,!1)}get aborted(){if(!ON.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return ON.get(this)}static get none(){return new t}addEventListener(e,r){if(!yh.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");yh.get(this).push(r)}removeEventListener(e,r){if(!yh.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");let n=yh.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 gfe(t){if(t.aborted)return;t.onabort&&t.onabort.call(t);let e=yh.get(t);e&&e.slice().forEach(r=>{r.call(t,{type:"abort"})}),ON.set(t,!0)}i(gfe,"abortSignal");var C3=class extends Error{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}},I3=class{static{i(this,"AbortController")}constructor(e){if(this._signal=new uI,!!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(){gfe(this._signal)}static timeout(e){let r=new uI,n=setTimeout(gfe,e,r);return typeof n.unref=="function"&&n.unref(),r}};dI.AbortController=I3;dI.AbortError=C3;dI.AbortSignal=uI});var wfe=I(Zn=>{"use strict";Object.defineP
Line truncated
|
|
|
|
|
Polling from: ${r.config.operationLocation}
|
|
|
|
|
Operation status: ${u}
|
|
|
|
|
Polling status: ${Xae.includes(u)?"Stopped":"Running"}`),u==="succeeded"){let d=i(l,r);if(d!==void 0)return{response:await e(d).catch(Jae({state:r,stateProxy:n,isOperationError:a})),status:u}}return{response:l,status:u}}async function rce(t){let{poll:e,state:r,stateProxy:n,options:s,getOperationStatus:o,getResourceLocation:i,getOperationLocation:a,isOperationError:c,withOperationLocation:l,getPollingInterval:u,processResult:d,getError:p,updateState:A,setDelay:g,isDone:E,setErrorAsResult:I}=t,{operationLocation:x}=r.config;if(x!==void 0){let{response:b,status:P}=await K8e({poll:e,getOperationStatus:o,state:r,stateProxy:n,operationLocation:x,getResourceLocation:i,isOperationError:c,options:s});if(ece({status:P,response:b,state:r,stateProxy:n,isDone:E,processResult:d,getError:p,setErrorAsResult:I}),!Xae.includes(P)){let v=u?.(b);v&&g(v);let F=a?.(b,r);if(F!==void 0){let q=x!==F;r.config.operationLocation=F,l?.(F,q)}else l?.(x,!1)}A?.(r,b)}}function nce(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}function sce(t){return t.headers.location}function oce(t){return t.headers["operation-location"]}function ice(t){return t.headers["azure-asyncoperation"]}function X8e(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}}}function ace(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:s}=t,o=oce(e),i=ice(e),a=nce({operationLocation:o,azureAsyncOperation:i}),c=sce(e),l=r?.toLocaleUpperCase();return a!==void 0?{mode:"OperationLocation",operationLocation:a,resourceLocation:X8e({requestMethod:l,location:c,requestPath:n,resourceLocationConfig:s})}:c!==void 0?{mode:"ResourceLocation",operationLocation:c}:l==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}function cce(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 h$(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 wp.verbose(`LRO: unrecognized operation status: ${e}`),e}}function Z8e(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return cce({status:r,statusCode:t.statusCode})}function e9e(t){var e,r;let{properties:n,provisioningState:s}=(e=t.body)!==null&&e!==void 0?e:{},o=(r=n?.provisioningState)!==null&&r!==void 0?r:s;return cce({status:o,statusCode:t.statusCode})}function h$(t){return t===202?"running":t<300?"succeeded":"failed"}function lce({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?t9e(new Date(e)):r*1e3}}function uce(t){let e=t.flatResponse.error;if(!e){wp.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){wp.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}function t9e(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}function dce(t){let{response:e,state:r,operationLocation:n}=t;function s(){var i;switch((i=r.config.metadata)===null||i===void 0?void 0:i.mode){case void 0:return h$(e.rawResponse.statusCode);case"Body":return y$(e,r);default:return"running"}}let o=s();return o==="running"&&n===void 0?"succeeded":o}async function r9e(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:s,setErrorAsResult:o}=t;return tce({init:async()=>{let i=await s.sendInitialRequest(),a=ace({rawResponse:i.rawResponse,requestPath:s.requestPath,requestMethod:s.requestMethod,resourceLocationConfig:r});return Object.assign({response:i,operationLocation:a?.operationLocation,resourceLocation:a?.resourceLocation},a?.mode?{metadata:{mode:a.mode}}:{})},stateProxy:e,processResult:n?({flatResponse:i},a)=>n(i,a):({flatResponse:i})=>i,getOperationStatus:dce,setErrorAsResult:o})}function pce({rawResponse:t},e){var r;switch((r=e.config.metadata)===null||r===void 0?void 0:r.mode){case"OperationLocation":return nce({operationLocation:oce(t),azureAsyncOperation:ice(t)});case"ResourceLocation":return sce(t);default:return}}function y$({rawResponse:t},e){var r;let n=(r=e.config.metadata)===null||r===void 0?void 0:r.mode;switch(n){case"OperationLocation":return Z8e(t);case"ResourceLocation":return h$(t.statusCode);case"Body":return e9e(t);default:throw new Error(`Internal error: Unexpected operation mode: ${n}`)}}function Ace({flatResponse:t},e){if(typeof t=="object"){let r=t.resourceLocation;r!==void 0&&(e.config.resourceLocation=r)}return e.cLine truncated
|
|
|
|
|
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(s){case 0:i=o,s=1;break;case 1:r[n++]=i<<2|(o&48)>>4,i=o,s=2;break;case 2:r[n++]=(i&15)<<4|(o&60)>>2,i=o,s=3;break;case 3:r[n++]=(i&3)<<6|o,s=0;break}}if(s==1)throw Error("invalid base64 string.");return r.subarray(0,n)}If.base64decode=M9e;function U9e(t){let e="",r=0,n,s=0;for(let o=0;o<t.length;o++)switch(n=t[o],r){case 0:e+=Jc[n>>2],s=(n&3)<<4,r=1;break;case 1:e+=Jc[s|n>>4],s=(n&15)<<2,r=2;break;case 2:e+=Jc[s|n>>6],e+=Jc[n&63],r=0;break}return r&&(e+=Jc[s],e+="=",r==1&&(e+="=")),e}If.base64encode=U9e});var $ce=C(yR=>{"use strict";Object.defineProperty(yR,"__esModule",{value:!0});yR.utf8read=void 0;var N$=t=>String.fromCharCode.apply(String,t);function q9e(t){if(t.length<1)return"";let e=0,r=[],n=[],s=0,o,i=t.length;for(;e<i;)o=t[e++],o<128?n[s++]=o:o>191&&o<224?n[s++]=(o&31)<<6|t[e++]&63:o>239&&o<365?(o=((o&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[s++]=55296+(o>>10),n[s++]=56320+(o&1023)):n[s++]=(o&15)<<12|(t[e++]&63)<<6|t[e++]&63,s>8191&&(r.push(N$(n)),s=0);return r.length?(s&&r.push(N$(n.slice(0,s))),r.join("")):N$(n.slice(0,s))}yR.utf8read=q9e});var RE=C(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.WireType=Ya.mergeBinaryOptions=Ya.UnknownFieldHandler=void 0;var $9e;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,s,o,i)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:s,wireType:o,data:i})},t.onWrite=(r,n,s)=>{for(let{no:o,wireType:i,data:a}of t.list(n))s.tag(o,i).raw(a)},t.list=(r,n)=>{if(e(r)){let s=r[t.symbol];return n?s.filter(o=>o.no==n):s}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=r=>r&&Array.isArray(r[t.symbol])})($9e=Ya.UnknownFieldHandler||(Ya.UnknownFieldHandler={}));function G9e(t,e){return Object.assign(Object.assign({},t),e)}Ya.mergeBinaryOptions=G9e;var H9e;(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"})(H9e=Ya.WireType||(Ya.WireType={}))});var CR=C(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.varint32read=Ls.varint32write=Ls.int64toString=Ls.int64fromString=Ls.varint64write=Ls.varint64read=void 0;function z9e(){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")}Ls.varint64read=z9e;function V9e(t,e,r){for(let o=0;o<28;o=o+7){let i=t>>>o,a=!(!(i>>>7)&&e==0),c=(a?i|128:i)&255;if(r.push(c),!a)return}let n=t>>>28&15|(e&7)<<4,s=e>>3!=0;if(r.push((s?n|128:n)&255),!!s){for(let o=3;o<31;o=o+7){let i=e>>>o,a=!!(i>>>7),c=(a?i|128:i)&255;if(r.push(c),!a)return}r.push(e>>>31&1)}}Ls.varint64write=V9e;var ER=65536*65536;function Y9e(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,s=0;function o(i,a){let c=Number(t.slice(i,a));s*=r,n=n*r+c,n>=ER&&(s=s+(n/ER|0),n=n%ER)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),[e,n,s]}Ls.int64fromString=Y9e;function j9e(t,e){if(e>>>0<=2097151)return""+(ER*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,s=e>>16&65535,o=r+n*6777216+s*6710656,i=n+s*8147497,a=s*2,c=1e7;o>=c&&(i+=Math.floor(o/c),o%=c),i>=c&&(a+=Math.floor(i/c),i%=c);function l(u,d){let p=u?String(u):"";return d?"0000000".slice(p.length)+p:p}return l(a,0)+l(i,a)+l(o,1)}Ls.int64toString=j9e;function W9e(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)}}Ls.varint32write=W9e;function J9e(){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}Ls.varint32read=J9e});var bu=C(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.PbLong=Iu.PbULong=Iu.detectBi=void 0;var NE=CR(),Dt;function Gce(){let t=new DataView(new ArrayBuffer(8));Dt=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("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:BigInt,V:t}:void 0}Iu.detectBi=Gce;Gce();function Hce(t){if(!t)throw new Error("BigInt unavailable, see https://github.com/timostamm/protobuf-ts/blob/v1.0.8/MANUAL.md#bigint-support")}var zce=/^-?[0-9]+$/,bR=4294967296,IR=2147483648,xR=c
Line truncated
|
|
|
|
|
`)}};YR.RpcError=tG});var nG=C(WR=>{"use strict";Object.defineProperty(WR,"__esModule",{value:!0});WR.mergeRpcOptions=void 0;var Ile=Qr();function y6e(t,e){if(!e)return t;let r={};jR(t,r),jR(e,r);for(let n of Object.keys(e)){let s=e[n];switch(n){case"jsonOptions":r.jsonOptions=Ile.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=Ile.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},jR(t.meta,r.meta),jR(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(s):s.concat();break}}return r}WR.mergeRpcOptions=y6e;function jR(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}});var oG=C(Tp=>{"use strict";Object.defineProperty(Tp,"__esModule",{value:!0});Tp.Deferred=Tp.DeferredState=void 0;var Ja;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(Ja=Tp.DeferredState||(Tp.DeferredState={}));var sG=class{constructor(e=!0){this._state=Ja.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!==Ja.PENDING)throw new Error(`cannot resolve ${Ja[this.state].toLowerCase()}`);this._resolve(e),this._state=Ja.RESOLVED}reject(e){if(this.state!==Ja.PENDING)throw new Error(`cannot reject ${Ja[this.state].toLowerCase()}`);this._reject(e),this._state=Ja.REJECTED}resolvePending(e){this._state===Ja.PENDING&&this.resolve(e)}rejectPending(e){this._state===Ja.PENDING&&this.reject(e)}};Tp.Deferred=sG});var aG=C(JR=>{"use strict";Object.defineProperty(JR,"__esModule",{value:!0});JR.RpcOutputStreamController=void 0;var ble=oG(),Pp=Qr(),iG=class{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){Pp.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){Pp.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){Pp.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(){Pp.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:()=>{let e=this._itState;Pp.assert(e,"bad state"),Pp.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 ble.Deferred,e.p.promise)}}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;Pp.assert(n.state==ble.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};JR.RpcOutputStreamController=iG});var lG=C(Nf=>{"use strict";var E6e=Nf&&Nf.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Nf,"__esModule",{value:!0});Nf.UnaryCall=void 0;var cG=class{constructor(e,r,n,s,o,i,a){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.response=o,this.status=i,this.trailers=a}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 E6e(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}})}};Nf.UnaryCall=cG});var dG=C(Tf=>{"use strict";var C6e=Tf&&Tf.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Tf,"__esModule",{value:!0});Tf.ServerStreamingCall=void 0;var uG=class{constructor(e
Line truncated
|
|
|
|
|
`));return r(s)}});var lme,rl,ume=_(()=>{H0();lme={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},rl=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(dC(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),lme)}})});var dme,vst,pme=_(()=>{H0();dme={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},vst=(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:n=>{n.addRelativeTo(dC(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),dme)}})});var Ame=_(()=>{H0();ume();pme()});var mme,fme,Dst,kst,d2,p2=_(()=>{mme=S(St()),fme=S(Fn()),Dst=t=>e=>{throw e},kst=(t,e)=>{},d2=t=>(e,r)=>async n=>{if(!mme.HttpRequest.isInstance(n.request))return e(n);let o=(0,fme.getSmithyContext)(r).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:i={}},identity:a,signer:c}=o,l=await e({...n,request:await c.sign(n.request,a,i)}).catch((c.errorHandler||Dst)(i));return(c.successHandler||kst)(l.response,i),l}});var gme,nl,hme=_(()=>{p2();gme={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},nl=t=>({applyToStack:e=>{e.addRelativeTo(d2(t),gme)}})});var yme=_(()=>{p2();hme()});var _u,Eme=_(()=>{_u=t=>{if(typeof t=="function")return t;let e=Promise.resolve(t);return()=>e}});function Cme(t,e,r,n,s){return async function*(i,a,...c){let l=a,u=i.startingToken??l[r],d=!0,p;for(;d;){if(l[r]=u,s&&(l[s]=l[s]??i.pageSize),i.client instanceof t)p=await Lst(e,i.client,a,i.withCommand,...c);else throw new Error(`Invalid client, expected instance of ${t.name}`);yield p;let A=u;u=Ost(p,n),d=!!(u&&(!i.stopOnSameToken||u!==A))}return void 0}}var Lst,Ost,Ime=_(()=>{Lst=async(t,e,r,n=o=>o,...s)=>{let o=new t(r);return o=n(o)??o,await e.send(o,...s)};Ost=(t,e)=>{let r=t,n=e.split(".");for(let s of n){if(!r||typeof r!="object")return;r=r[s]}return r}});var A2=C(bme=>{"use strict";var Fst=t=>typeof ArrayBuffer=="function"&&t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]";bme.isArrayBuffer=Fst});var Xf=C(f2=>{"use strict";var Mst=A2(),m2=require("buffer"),Ust=(t,e=0,r=t.byteLength-e)=>{if(!Mst.isArrayBuffer(t))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof t} (${t})`);return m2.Buffer.from(t,e,r)},qst=(t,e)=>{if(typeof t!="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof t} (${t})`);return e?m2.Buffer.from(t,e):m2.Buffer.from(t)};f2.fromArrayBuffer=Ust;f2.fromString=qst});var xme=C(z0=>{"use strict";Object.defineProperty(z0,"__esModule",{value:!0});z0.fromBase64=void 0;var $st=Xf(),Gst=/^[A-Za-z0-9+/]*={0,2}$/,Hst=t=>{if(t.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!Gst.exec(t))throw new TypeError("Invalid base64 string.");let e=(0,$st.fromString)(t,"base64");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)};z0.fromBase64=Hst});var Jr=C(V0=>{"use strict";var wme=Xf(),Bme=t=>{let e=wme.fromString(t,"utf8");return new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT)},zst=t=>typeof t=="string"?Bme(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t),Vst=t=>{if(typeof t=="string")return t;if(typeof t!="object"||typeof t.byteOffset!="number"||typeof t.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return wme.fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength).toString("utf8")};V0.fromUtf8=Bme;V0.toUint8Array=zst;V0.toUtf8=Vst});var Sme=C(Y0=>{"use strict";Object.defineProperty(Y0,"__esModule",{value:!0});Y0.toBase64=void 0;var Yst=Xf(),jst=Jr(),Wst=t=>{let e;if(typeof t=="string"?e=(0,jst.fromUtf8)(t):e=t,typeof e!="object"||typeof e.byteOffset!="number"||typeof e.byteLength!="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,Yst.fromArrayBuffer)(e.buffer,e.byteOffset,e.byteLength).toString("base64")};Y0.toBase64=Wst});var Kr=C(sl=>{"use strict";var j0=xme(),W0=Sme();Object.prototype.hasOwnProperty.call(j0,"__proto__")&&!Object.prototype.hasOwnProperty.call(sl,"__proto__")&&Object.defineProperty(sl,"__proto__",{enumerable:!0,value:j0.__proto__});Object.keys(j0).forEach(function(t){t!=="default"&&!Object.prototype.hasOwnProperty.call(sl,t)&&(sl[t]=j0[t])});Object.prototype.hasOwnProperty.call(W0,"__proto__")&&!Object.prototype.hasOwnProperty.call(sl,"__proto__")&&Object.defineProperty(sl,"__proto__",{enumerable:!0,value
Line truncated
|
|
|
|
|
`),a){let A=r(await c);u.enqueue(`${o}:${A}\r
|
|
|
|
|
`),u.enqueue(`\r
|
|
|
|
|
`)}u.close()}else u.enqueue(`${(n(d)||0).toString(16)}\r
|
|
|
|
|
${d}\r
|
|
|
|
|
`)}})};tN.getAwsChunkedEncodingStream=Aot});var Ome=C(x2=>{"use strict";Object.defineProperty(x2,"__esModule",{value:!0});x2.getAwsChunkedEncodingStream=hot;var mot=require("node:stream"),fot=Lme(),got=ol();function hot(t,e){let r=t,n=t;if((0,got.isReadableStream)(n))return(0,fot.getAwsChunkedEncodingStream)(n,e);let{base64Encoder:s,bodyLengthChecker:o,checksumAlgorithmFn:i,checksumLocationName:a,streamHasher:c}=e,l=s!==void 0&&i!==void 0&&a!==void 0&&c!==void 0,u=l?c(i,r):void 0,d=new mot.Readable({read:()=>{}});return r.on("data",p=>{let A=o(p)||0;A!==0&&(d.push(`${A.toString(16)}\r
|
|
|
|
|
`),d.push(p),d.push(`\r
|
|
|
|
|
`))}),r.on("end",async()=>{if(d.push(`0\r
|
|
|
|
|
`),l){let p=s(await u);d.push(`${a}:${p}\r
|
|
|
|
|
`),d.push(`\r
|
|
|
|
|
`)}d.push(null)}),d}});var Fme=C(w2=>{"use strict";Object.defineProperty(w2,"__esModule",{value:!0});w2.headStream=yot;async function yot(t,e){let r=0,n=[],s=t.getReader(),o=!1;for(;!o;){let{done:c,value:l}=await s.read();if(l&&(n.push(l),r+=l?.byteLength??0),r>=e)break;o=c}s.releaseLock();let i=new Uint8Array(Math.min(e,r)),a=0;for(let c of n){if(c.byteLength>i.byteLength-a){i.set(c.subarray(0,i.byteLength-a),a);break}else i.set(c,a);a+=c.length}return i}});var Mme=C(rN=>{"use strict";Object.defineProperty(rN,"__esModule",{value:!0});rN.headStream=void 0;var Eot=require("stream"),Cot=Fme(),Iot=ol(),bot=(t,e)=>(0,Iot.isReadableStream)(t)?(0,Cot.headStream)(t,e):new Promise((r,n)=>{let s=new B2;s.limit=e,t.pipe(s),t.on("error",o=>{s.end(),n(o)}),s.on("error",n),s.on("finish",function(){let o=new Uint8Array(Buffer.concat(this.buffers));r(o)})});rN.headStream=bot;var B2=class extends Eot.Writable{buffers=[];limit=1/0;bytesBuffered=0;_write(e,r,n){if(this.buffers.push(e),this.bytesBuffered+=e.byteLength??0,this.bytesBuffered>=this.limit){let s=this.bytesBuffered-this.limit,o=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=o.subarray(0,o.byteLength-s),this.emit("finish")}n()}}});var R2=C(S2=>{"use strict";var Ume=t=>encodeURIComponent(t).replace(/[!'()*]/g,xot),xot=t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`,wot=t=>t.split("/").map(Ume).join("/");S2.escapeUri=Ume;S2.escapeUriPath=wot});var T2=C(qme=>{"use strict";var N2=R2();function Bot(t){let e=[];for(let r of Object.keys(t).sort()){let n=t[r];if(r=N2.escapeUri(r),Array.isArray(n))for(let s=0,o=n.length;s<o;s++)e.push(`${r}=${N2.escapeUri(n[s])}`);else{let s=r;(n||typeof n=="string")&&(s+=`=${N2.escapeUri(n)}`),e.push(s)}}return e.join("&")}qme.buildQueryString=Bot});var tc=C(pC=>{"use strict";var Vme=St(),Yme=T2(),nN=require("node:https"),jme=require("node:stream"),P2=require("node:http2");function oN(t){let e=t&&typeof t=="object"&&"reason"in t?t.reason:void 0;if(e){if(e instanceof Error){let s=new Error("Request aborted");return s.name="AbortError",s.cause=e,s}let n=new Error(String(e));return n.name="AbortError",n}let r=new Error("Request aborted");return r.name="AbortError",r}var Sot=["ECONNRESET","EPIPE","ETIMEDOUT"],Wme=t=>{let e={};for(let r of Object.keys(t)){let n=t[r];e[r]=Array.isArray(n)?n.join(","):n}return e},fs={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},$me=1e3,Rot=(t,e,r=0)=>{if(!r)return-1;let n=s=>{let o=fs.setTimeout(()=>{t.destroy(),e(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${r} ms.`),{name:"TimeoutError"}))},r-s),i=a=>{a?.connecting?a.on("connect",()=>{fs.clearTimeout(o)}):fs.clearTimeout(o)};t.socket?i(t.socket):t.on("socket",i)};return r<2e3?(n(0),0):fs.setTimeout(n.bind(null,$me),$me)},Not=(t,e,r=0,n,s)=>r?fs.setTimeout(()=>{let o=`@smithy/node-http-handler - [${n?"ERROR":"WARN"}] a request has exceeded the configured ${r} ms requestTimeout.`;if(n){let i=Object.assign(new Error(o),{name:"TimeoutError",code:"ETIMEDOUT"});t.destroy(i),e(i)}else o+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",s?.warn?.(o)},r):-1,Tot=3e3,Pot=(t,{keepAlive:e,keepAliveMsecs:r},n=Tot)=>{if(e!==!0)return-1;let s=()=>{t.socket?t.socket.setKeepAlive(e,r||0):t.on("socket",o=>{o.setKeepAlive(e,r||0)})};return n===0?(s(),0):fs.setTimeout(s,n)},Gme=3e3,Qot=(t,e,r=0)=>{let n=s=>{let o=r-s,i=()=>{t.destroy(),e(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${r} ms of inactivity (configured by client requestHandler).`),{name:"TimeoutError"}))};t.socket?(t.socket.setTimeout(o,i),t.on("close",()=>t.socket?.removeListener("timeout",i))):t.setTimeout(o,i)};return 0<r&&r<6e3?(n(0),0):fs.setTimeout(n.bind(null,r===0?0:Gme),Gme)},Hme=6e3;async function Jme(t,e,r=Hme,n=!1){let s=e.headers??{},o=s.Expect||s.expect,i=-1,a=!0;!n&&o==="100-continue"&&(a=await Promise.race([new Promise(c=>{i=Number(fs.setTimeout(()=>c(!0),Math.max(Hme,r)))}),new Promise(c=>{t.on("continue",()=>{fs.clearTimeout(i),c(!0)}),t.on("response",()=>{fs.clearTimeout(i),c(!1)}),t.on("error",()=>{fs.clearTimeout(i),c(!1)})})])),a&&_ot(t,e.body)}function _ot(t,e){if(e instanceof jme.Readable){e.pipe(t);return}if(e){let r=Buffer.isBuffer(e);if(r||typeof e=="string"){r&&e.byteLength===0?t.end():t.end(e);return}let s=e;if(typeof s=="object"&&s.buffer&&typeof s.byteOffset=="number"&&typeof s.byteLength=="number"){t.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}t.end(Buffer.from(e));return}t.end()}var vot=0,sN,zme,Q2=class t{config;configProvider;socketWarningTimestamp=0;externalAgent=!1;metadata={handlerProtocol:"http/1.1"};static create(e){return typeof e?.handle=="function"?e:new t(e)}static checkSocketUsage(e,r,n=console){let{sockets:s,requests:o,maxSockets:i}=e;if(typeof i!="number"||i===1/0||Date.now()-15e3<r)return r;if(s&&o)for(let c in s){le
Line truncated
|
|
|
|
|
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
|
|
|
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return r}constructor(e){this.configProvider=new Promise((r,n)=>{typeof e=="function"?e().then(s=>{r(this.resolveDefaultConfig(s))}).catch(n):r(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let s=this.config,o=e.protocol==="https:";return!o&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((i,a)=>{let c,l=[],u=async V=>{await c,l.forEach(fs.clearTimeout),i(V)},d=async V=>{await c,l.forEach(fs.clearTimeout),a(V)};if(r?.aborted){let V=oN(r);d(V);return}let p=e.headers??{},A=(p.Expect??p.expect)==="100-continue",g=o?s.httpsAgent:s.httpAgent;A&&!this.externalAgent&&(g=new(o?nN.Agent:sN)({keepAlive:!1,maxSockets:1/0})),l.push(fs.setTimeout(()=>{this.socketWarningTimestamp=t.checkSocketUsage(g,this.socketWarningTimestamp,s.logger)},s.socketAcquisitionWarningTimeout??(s.requestTimeout??2e3)+(s.connectionTimeout??1e3)));let E=Yme.buildQueryString(e.query||{}),I;if(e.username!=null||e.password!=null){let V=e.username??"",Ee=e.password??"";I=`${V}:${Ee}`}let x=e.path;E&&(x+=`?${E}`),e.fragment&&(x+=`#${e.fragment}`);let b=e.hostname??"";b[0]==="["&&b.endsWith("]")?b=e.hostname.slice(1,-1):b=e.hostname;let P={headers:e.headers,host:b,method:e.method,path:x,port:e.port,agent:g,auth:I},F=(o?nN.request:zme)(P,V=>{let Ee=new Vme.HttpResponse({statusCode:V.statusCode||-1,reason:V.statusMessage,headers:Wme(V.headers),body:V});u({response:Ee})});if(F.on("error",V=>{Sot.includes(V.code)?d(Object.assign(V,{name:"TimeoutError"})):d(V)}),r){let V=()=>{F.destroy();let Ee=oN(r);d(Ee)};if(typeof r.addEventListener=="function"){let Ee=r;Ee.addEventListener("abort",V,{once:!0}),F.once("close",()=>Ee.removeEventListener("abort",V))}else r.onabort=V}let q=n??s.requestTimeout;l.push(Rot(F,d,s.connectionTimeout)),l.push(Not(F,d,q,s.throwOnRequestTimeout,s.logger??console)),l.push(Qot(F,d,s.socketTimeout));let X=P.agent;typeof X=="object"&&"keepAlive"in X&&l.push(Pot(F,{keepAlive:X.keepAlive,keepAliveMsecs:X.keepAliveMsecs})),c=Jme(F,e,q,this.externalAgent).catch(V=>(l.forEach(fs.clearTimeout),a(V)))})}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:r}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:r,connectionTimeout:n,socketTimeout:s,socketAcquisitionWarningTimeout:o,httpAgent:i,httpsAgent:a,throwOnRequestTimeout:c,logger:l}=e||{},u=!0,d=50;return{connectionTimeout:n,requestTimeout:r,socketTimeout:s,socketAcquisitionWarningTimeout:o,throwOnRequestTimeout:c,httpAgentProvider:async()=>{let{Agent:p,request:A}=await import("node:http");return zme=A,sN=p,i instanceof sN||typeof i?.destroy=="function"?(this.externalAgent=!0,i):new sN({keepAlive:u,maxSockets:d,...i})},httpsAgent:a instanceof nN.Agent||typeof a?.destroy=="function"?(this.externalAgent=!0,a):new nN.Agent({keepAlive:u,maxSockets:d,...a}),logger:l}}},_2=class{sessions=[];constructor(e){this.sessions=e??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(e){this.sessions.push(e)}contains(e){return this.sessions.includes(e)}remove(e){this.sessions=this.sessions.filter(r=>r!==e)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(e){for(let r of this.sessions)r===e&&(r.destroyed||r.destroy())}},v2=class{constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}config;sessionCache=new Map;lease(e,r){let n=this.getUrlString(e),s=this.sessionCache.get(n);if(s){let c=s.poll();if(c&&!this.config.disableConcurrency)return c}let o=P2.connect(n);this.config.maxConcurrency&&o.settings({maxConcurrentStreams:this.config.maxConcurrency},c=>{if(c)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+e.destination.toString())}),o.unref();let i=()=>{o.destroy(),this.deleteSession(n,o)};o.on("goaway",i),o.on("error",i),o.on("frameError",i),o.on("close",()=>this.deleteSession(n,o)),r.requestTimeout&&o.setTimeout(r.requestTimeout,i);let a=this.sessionCache.get(n)||new _2;return a.offerLast(o),this.sessionCache.set(n,a),o}deleteSession(e,r){let n=this.sessionCache.get(e);n&&n.contains(r)&&(n.remove(r),this.sessionCache.set(e,n))}release(e,r){let n=this.getUrlString(e);this.sessionCache.get(n)?.offerLast(r)}destroy(){for(let[e,r]of this.sessionCache){for(let n of r)n.destroyed||n.destroy(),r.remove(n);this.sessionCache.delete(e)}}setMaxConcurrentStreams(e){if(e&&e<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=e}setDisableConcurrentStreams(e){this.config.disableConcurrency=e}getUrlString(e){return e.destination.toString()}},D2=class t{config;confi
Line truncated
|
|
|
|
|
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return s.stream()};return Object.assign(t,{transformToByteArray:r,transformToString:async s=>{let o=await r();if(s==="base64")return(0,Yot.toBase64)(o);if(s==="hex")return(0,jot.toHex)(o);if(s===void 0||s==="utf8"||s==="utf-8")return(0,Wot.toUtf8)(o);if(typeof TextDecoder=="function")return new TextDecoder(s).decode(o);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(e)throw new Error(nfe);if(e=!0,sfe(t))return n(t);if((0,rfe.isReadableStream)(t))return t;throw new Error(`Cannot transform payload to web stream, got ${t}`)}})};cN.sdkStreamMixin=Jot;var sfe=t=>typeof Blob=="function"&&t instanceof Blob});var afe=C(lN=>{"use strict";Object.defineProperty(lN,"__esModule",{value:!0});lN.sdkStreamMixin=void 0;var Kot=tc(),Xot=Xf(),U2=require("stream"),Zot=ofe(),ife="The stream has already been transformed.",eit=t=>{if(!(t instanceof U2.Readable))try{return(0,Zot.sdkStreamMixin)(t)}catch{let s=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${s}`)}let e=!1,r=async()=>{if(e)throw new Error(ife);return e=!0,await(0,Kot.streamCollector)(t)};return Object.assign(t,{transformToByteArray:r,transformToString:async n=>{let s=await r();return n===void 0||Buffer.isEncoding(n)?(0,Xot.fromArrayBuffer)(s.buffer,s.byteOffset,s.byteLength).toString(n):new TextDecoder(n).decode(s)},transformToWebStream:()=>{if(e)throw new Error(ife);if(t.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof U2.Readable.toWeb!="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return e=!0,U2.Readable.toWeb(t)}})};lN.sdkStreamMixin=eit});var cfe=C(q2=>{"use strict";Object.defineProperty(q2,"__esModule",{value:!0});q2.splitStream=tit;async function tit(t){return typeof t.stream=="function"&&(t=t.stream()),t.tee()}});var dfe=C($2=>{"use strict";Object.defineProperty($2,"__esModule",{value:!0});$2.splitStream=nit;var lfe=require("stream"),rit=cfe(),ufe=ol();async function nit(t){if((0,ufe.isReadableStream)(t)||(0,ufe.isBlob)(t))return(0,rit.splitStream)(t);let e=new lfe.PassThrough,r=new lfe.PassThrough;return t.pipe(e),t.pipe(r),[e,r]}});var hN=C(gt=>{"use strict";var pfe=Kr(),Afe=Jr(),uN=h2(),dN=Tme(),pN=kme(),AN=Ome(),mN=Mme(),fN=afe(),gN=dfe(),mfe=ol(),G2=class t extends Uint8Array{static fromString(e,r="utf-8"){if(typeof e=="string")return r==="base64"?t.mutate(pfe.fromBase64(e)):t.mutate(Afe.fromUtf8(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,t.prototype),e}transformToString(e="utf-8"){return e==="base64"?pfe.toBase64(this):Afe.toUtf8(this)}};gt.isBlob=mfe.isBlob;gt.isReadableStream=mfe.isReadableStream;gt.Uint8ArrayBlobAdapter=G2;Object.prototype.hasOwnProperty.call(uN,"__proto__")&&!Object.prototype.hasOwnProperty.call(gt,"__proto__")&&Object.defineProperty(gt,"__proto__",{enumerable:!0,value:uN.__proto__});Object.keys(uN).forEach(function(t){t!=="default"&&!Object.prototype.hasOwnProperty.call(gt,t)&&(gt[t]=uN[t])});Object.prototype.hasOwnProperty.call(dN,"__proto__")&&!Object.prototype.hasOwnProperty.call(gt,"__proto__")&&Object.defineProperty(gt,"__proto__",{enumerable:!0,value:dN.__proto__});Object.keys(dN).forEach(function(t){t!=="default"&&!Object.prototype.hasOwnProperty.call(gt,t)&&(gt[t]=dN[t])});Object.prototype.hasOwnProperty.call(pN,"__proto__")&&!Object.prototype.hasOwnProperty.call(gt,"__proto__")&&Object.defineProperty(gt,"__proto__",{enumerable:!0,value:pN.__proto__});Object.keys(pN).forEach(function(t){t!=="default"&&!Object.prototype.hasOwnProperty.call(gt,t)&&(gt[t]=pN[t])});Object.prototype.hasOwnProperty.call(AN,"__proto__")&&!Object.prototype.hasOwnProperty.call(gt,"__proto__")&&Object.defineProperty(gt,"__proto__",{enumerable:!0,value:AN.__proto__});Object.keys(AN).forEach(function(t){t!=="default"&&!Object.prototype.hasOwnProperty.call(gt,t)&&(gt[t]=AN[t])});Object.prototype.hasOwnProperty.call(mN,"__proto__")&&!Object.prototype.hasOwnProperty.call(gt,"__proto__")&&Object.defineProperty(gt,"__proto__",{enumerable:!0,value:mN.__proto__});Object.keys(mN).forEach(function(t){t!=="default"&&!Object.prototype.hasOwnProperty.call(gt,t)&&(gt[t]=mN[t])});Object.prototype.hasOwnProperty.call(fN,"__proto__")&&!Object.prototype.hasOwnProperty.call(gt,"__proto__")&&Object.defineProperty(gt,"__proto__",{enumerable:!0,value:fN.__proto__});Object.keys(fN).forEach(function(t){t!=="default"&&!Object.prototype.hasOwnProperty.call(gt,t)&&(gt[t]=fN[t])});Object.prototype.hasOwnProperty.call(gN,"__proto__")&&!Object.prototype.hasOwnProperty.call(gt,"__proto__")&&Object.defineProperty(gt,"__proto__",{enumerable:!0,value:gN.__proto__});Object.keys(gN).forEach(function(t){t!
Line truncated
|
|
|
|
|
`+p}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(p):r.logger?.warn?.(p)}typeof d.$responseBodyText<"u"&&d.$response&&(d.$response.body=d.$responseBodyText);try{if(ffe.HttpResponse.isInstance(s)){let{headers:A={}}=s,g=Object.entries(A);d.$metadata={httpStatusCode:s.statusCode,requestId:z2(/^x-[\w-]+-request-?id$/,g),extendedRequestId:z2(/^x-[\w-]+-id-2$/,g),cfId:z2(/^x-[\w-]+-cf-id$/,g)}}}catch{}}throw d}},z2=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1]});var Cfe=C(Efe=>{"use strict";function sit(t){let e={};if(t=t.replace(/^\?/,""),t)for(let r of t.split("&")){let[n,s=null]=r.split("=");n=decodeURIComponent(n),s&&(s=decodeURIComponent(s)),n in e?Array.isArray(e[n])?e[n].push(s):e[n]=[e[n],s]:e[n]=s}return e}Efe.parseQueryString=sit});var Hi=C(bfe=>{"use strict";var oit=Cfe(),Ife=t=>{if(typeof t=="string")return Ife(new URL(t));let{hostname:e,pathname:r,port:n,protocol:s,search:o}=t,i;return o&&(i=oit.parseQueryString(o)),{hostname:e,port:n?parseInt(n):void 0,protocol:s,path:r,query:i}};bfe.parseUrl=Ife});var V2,Y2,xfe=_(()=>{V2=S(Hi()),Y2=t=>{if(typeof t=="object"){if("url"in t){let e=(0,V2.parseUrl)(t.url);if(t.headers){e.headers={};for(let[r,n]of Object.entries(t.headers))e.headers[r.toLowerCase()]=n.join(", ")}return e}return t}return(0,V2.parseUrl)(t)}});var wfe={};hn(wfe,{toEndpointV1:()=>Y2});var j2=_(()=>{xfe()});var Bfe,Sfe,Rfe=_(()=>{j2();Bfe=S(Fn());IN();Sfe=t=>(e,r)=>async n=>{let{operationSchema:s}=(0,Bfe.getSmithyContext)(r),[,o,i,a,c,l]=s??[],u=r.endpointV2?async()=>Y2(r.endpointV2):t.endpoint,d=await t.protocol.serializeRequest(AC(o,i,a,c,l),n.input,{...t,...r,endpoint:u});return e({...n,request:d})}});function cl(t){return{applyToStack:e=>{e.add(Sfe(t),Tfe),e.add(hfe(t),Nfe),t.protocol.setSerdeContext(t)}}}var Nfe,Tfe,Pfe=_(()=>{yfe();Rfe();Nfe={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},Tfe={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var Dr,vu=_(()=>{Dr=class{name;namespace;traits;static assign(e,r){return Object.assign(e,r)}static[Symbol.hasInstance](e){let r=this.prototype.isPrototypeOf(e);return!r&&typeof e=="object"&&e!==null?e.symbol===this.symbol:r}getName(){return this.namespace+"#"+this.name}}});var bN,iit,Qfe=_(()=>{vu();bN=class t extends Dr{static symbol=Symbol.for("@smithy/lis");name;traits;valueSchema;symbol=t.symbol},iit=(t,e,r,n)=>Dr.assign(new bN,{name:e,namespace:t,traits:r,valueSchema:n})});var xN,ait,_fe=_(()=>{vu();xN=class t extends Dr{static symbol=Symbol.for("@smithy/map");name;traits;keySchema;valueSchema;symbol=t.symbol},ait=(t,e,r,n,s)=>Dr.assign(new xN,{name:e,namespace:t,traits:r,keySchema:n,valueSchema:s})});var wN,cit,vfe=_(()=>{vu();wN=class t extends Dr{static symbol=Symbol.for("@smithy/ope");name;traits;input;output;symbol=t.symbol},cit=(t,e,r,n,s)=>Dr.assign(new wN,{name:e,namespace:t,traits:r,input:n,output:s})});var tg,lit,W2=_(()=>{vu();tg=class t extends Dr{static symbol=Symbol.for("@smithy/str");name;traits;memberNames;memberList;symbol=t.symbol},lit=(t,e,r,n,s)=>Dr.assign(new tg,{name:e,namespace:t,traits:r,memberNames:n,memberList:s})});var BN,uit,Dfe=_(()=>{vu();W2();BN=class t extends tg{static symbol=Symbol.for("@smithy/err");ctor;symbol=t.symbol},uit=(t,e,r,n,s,o)=>Dr.assign(new BN,{name:e,namespace:t,traits:r,memberNames:n,memberList:s,ctor:null})});function nc(t){if(typeof t=="object")return t;if(t=t|0,SN[t])return SN[t];let e={},r=0;for(let n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(t>>r++&1)===1&&(e[n]=1);return SN[t]=e}var SN,J2=_(()=>{SN=[]});function fC(t,e){if(t instanceof me)return Object.assign(t,{memberName:e,_isMemberSchema:!0});let r=me;return new r(t,e)}var mC,RN,NN,me,K2,kfe,Lfe=_(()=>{H2();J2();mC={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},RN=[],NN={},me=class t{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=t.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,r){this.ref=e,this.memberName=r;let n=[],s=e,o=e;for(this._isMemberSchema=!1;K2(s);)n.push(s[1]),s=s[0],o=Gi(s),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let i=n.length-1;i>=0;--i){let a=n[i];Object.assign(this.memberTraits,nc(a))}}else this.memberTraits=0;if(o instanceof t){let i=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},i,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??o.memberName;return}if(this.schema=Gi(o),kfe(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(o),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){let r=this.prototype.isPrototypeOf(e);return!r&&typeof e=="object"&&e!==null?e.symbol===this.symbol:
Line truncated
|
|
|
|
|
Operation status: ${d}
|
|
|
|
|
Polling status: ${Bfe.includes(d)?"Stopped":"Running"}`),d==="succeeded"){let p=a(u,r);if(p!==void 0)return{response:await e(p).catch(xfe({state:r,stateProxy:n,isOperationError:c})),status:d}}return{response:u,status:d}}i(_lt,"pollOperationHelper");async function vfe(t){let{poll:e,state:r,stateProxy:n,options:s,getOperationStatus:o,getResourceLocation:a,getOperationLocation:c,isOperationError:l,withOperationLocation:u,getPollingInterval:d,processResult:p,getError:m,updateState:f,setDelay:A,isDone:h,setErrorAsResult:E}=t,{operationLocation:C}=r.config;if(C!==void 0){let{response:w,status:x}=await _lt({poll:e,getOperationStatus:o,state:r,stateProxy:n,operationLocation:C,getResourceLocation:a,isOperationError:l,options:s});if(Nfe({status:x,response:w,state:r,stateProxy:n,isDone:h,processResult:p,getError:m,setErrorAsResult:E}),!Bfe.includes(x)){let b=d?.(w);b&&A(b);let N=c?.(w,r);if(N!==void 0){let P=C!==N;r.config.operationLocation=N,u?.(N,P)}else u?.(C,!1)}f?.(r,w)}}i(vfe,"pollOperation");function Pfe(t){let{azureAsyncOperation:e,operationLocation:r}=t;return r??e}i(Pfe,"getOperationLocationPollingUrl");function Qfe(t){return t.headers.location}i(Qfe,"getLocationHeader");function _fe(t){return t.headers["operation-location"]}i(_fe,"getOperationLocationHeader");function Dfe(t){return t.headers["azure-asyncoperation"]}i(Dfe,"getAzureAsyncOperationHeader");function Dlt(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}}}i(Dlt,"findResourceLocation");function kfe(t){let{rawResponse:e,requestMethod:r,requestPath:n,resourceLocationConfig:s}=t,o=_fe(e),a=Dfe(e),c=Pfe({operationLocation:o,azureAsyncOperation:a}),l=Qfe(e),u=r?.toLocaleUpperCase();return c!==void 0?{mode:"OperationLocation",operationLocation:c,resourceLocation:Dlt({requestMethod:u,location:l,requestPath:n,resourceLocationConfig:s})}:l!==void 0?{mode:"ResourceLocation",operationLocation:l}:u==="PUT"&&n?{mode:"Body",operationLocation:n}:void 0}i(kfe,"inferLroMode");function Lfe(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 v3(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 Im.verbose(`LRO: unrecognized operation status: ${e}`),e}}i(Lfe,"transformStatus");function klt(t){var e;let{status:r}=(e=t.body)!==null&&e!==void 0?e:{};return Lfe({status:r,statusCode:t.statusCode})}i(klt,"getStatus");function Llt(t){var e,r;let{properties:n,provisioningState:s}=(e=t.body)!==null&&e!==void 0?e:{},o=(r=n?.provisioningState)!==null&&r!==void 0?r:s;return Lfe({status:o,statusCode:t.statusCode})}i(Llt,"getProvisioningState");function v3(t){return t===202?"running":t<300?"succeeded":"failed"}i(v3,"toOperationStatus");function Ofe({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let r=parseInt(e);return isNaN(r)?Olt(new Date(e)):r*1e3}}i(Ofe,"parseRetryAfter");function Mfe(t){let e=t.flatResponse.error;if(!e){Im.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){Im.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}i(Mfe,"getErrorFromResponse");function Olt(t){let e=Math.floor(new Date().getTime()),r=t.getTime();if(e<r)return r-e}i(Olt,"calculatePollingIntervalFromDate");function Ffe(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 v3(e.rawResponse.statusCode);case"Body":return P3(e,r);default:return"running"}}i(s,"helper");let o=s();return o==="running"&&n===void 0?"succeeded":o}i(Ffe,"getStatusFromInitialResponse");async function Mlt(t){let{stateProxy:e,resourceLocationConfig:r,processResult:n,lro:s,setErrorAsResult:o}=t;return Tfe({init:i(async()=>{let a=await s.sendInitialRequest(),c=kfe({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:Ffe,setErrorAsResult:o})}i(Mlt,"initHttpOperation");function Ufe({rawResponse:t},e){var r;switch((r=e.config.metadata)===null||r===void 0?void 0:r.mode){case"OperationLocation":return Pfe({opeLine truncated
|
|
|
|
|
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(s){case 0:a=o,s=1;break;case 1:r[n++]=a<<2|(o&48)>>4,a=o,s=2;break;case 2:r[n++]=(a&15)<<4|(o&60)>>2,a=o,s=3;break;case 3:r[n++]=(a&3)<<6|o,s=0;break}}if(s==1)throw Error("invalid base64 string.");return r.subarray(0,n)}i(Iut,"base64decode");xh.base64decode=Iut;function wut(t){let e="",r=0,n,s=0;for(let o=0;o<t.length;o++)switch(n=t[o],r){case 0:e+=Hl[n>>2],s=(n&3)<<4,r=1;break;case 1:e+=Hl[s|n>>4],s=(n&15)<<2,r=2;break;case 2:e+=Hl[s|n>>6],e+=Hl[n&63],r=0;break}return r&&(e+=Hl[s],e+="=",r==1&&(e+="=")),e}i(wut,"base64encode");xh.base64encode=wut});var EAe=I(rT=>{"use strict";Object.defineProperty(rT,"__esModule",{value:!0});rT.utf8read=void 0;var G3=i(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function Sut(t){if(t.length<1)return"";let e=0,r=[],n=[],s=0,o,a=t.length;for(;e<a;)o=t[e++],o<128?n[s++]=o:o>191&&o<224?n[s++]=(o&31)<<6|t[e++]&63:o>239&&o<365?(o=((o&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,n[s++]=55296+(o>>10),n[s++]=56320+(o&1023)):n[s++]=(o&15)<<12|(t[e++]&63)<<6|t[e++]&63,s>8191&&(r.push(G3(n)),s=0);return r.length?(s&&r.push(G3(n.slice(0,s))),r.join("")):G3(n.slice(0,s))}i(Sut,"utf8read");rT.utf8read=Sut});var EI=I(fc=>{"use strict";Object.defineProperty(fc,"__esModule",{value:!0});fc.WireType=fc.mergeBinaryOptions=fc.UnknownFieldHandler=void 0;var xut;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(r,n,s,o,a)=>{(e(n)?n[t.symbol]:n[t.symbol]=[]).push({no:s,wireType:o,data:a})},t.onWrite=(r,n,s)=>{for(let{no:o,wireType:a,data:c}of t.list(n))s.tag(o,a).raw(c)},t.list=(r,n)=>{if(e(r)){let s=r[t.symbol];return n?s.filter(o=>o.no==n):s}return[]},t.last=(r,n)=>t.list(r,n).slice(-1)[0];let e=i(r=>r&&Array.isArray(r[t.symbol]),"is")})(xut=fc.UnknownFieldHandler||(fc.UnknownFieldHandler={}));function but(t,e){return Object.assign(Object.assign({},t),e)}i(but,"mergeBinaryOptions");fc.mergeBinaryOptions=but;var But;(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"})(But=fc.WireType||(fc.WireType={}))});var sT=I(vs=>{"use strict";Object.defineProperty(vs,"__esModule",{value:!0});vs.varint32read=vs.varint32write=vs.int64toString=vs.int64fromString=vs.varint64write=vs.varint64read=void 0;function Rut(){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")}i(Rut,"varint64read");vs.varint64read=Rut;function Nut(t,e,r){for(let o=0;o<28;o=o+7){let a=t>>>o,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 o=3;o<31;o=o+7){let a=e>>>o,c=!!(a>>>7),l=(c?a|128:a)&255;if(r.push(l),!c)return}r.push(e>>>31&1)}}i(Nut,"varint64write");vs.varint64write=Nut;var nT=65536*65536;function Tut(t){let e=t[0]=="-";e&&(t=t.slice(1));let r=1e6,n=0,s=0;function o(a,c){let l=Number(t.slice(a,c));s*=r,n=n*r+l,n>=nT&&(s=s+(n/nT|0),n=n%nT)}return i(o,"add1e6digit"),o(-24,-18),o(-18,-12),o(-12,-6),o(-6),[e,n,s]}i(Tut,"int64fromString");vs.int64fromString=Tut;function vut(t,e){if(e>>>0<=2097151)return""+(nT*e+(t>>>0));let r=t&16777215,n=(t>>>24|e<<8)>>>0&16777215,s=e>>16&65535,o=r+n*6777216+s*6710656,a=n+s*8147497,c=s*2,l=1e7;o>=l&&(a+=Math.floor(o/l),o%=l),a>=l&&(c+=Math.floor(a/l),a%=l);function u(d,p){let m=d?String(d):"";return p?"0000000".slice(m.length)+m:m}return i(u,"decimalFrom1e7"),u(c,0)+u(a,c)+u(o,1)}i(vut,"int64toString");vs.int64toString=vut;function Put(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)}}i(Put,"varint32write");vs.varint32write=Put;function Qut(){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}i(Qut,"varint32read");vs.varint32read=Qut});var ad=I(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});id.PbLong=id.PbULong=id.detectBi=void 0;var CI=sT(),yt;function CAe(){let t=new DataView(new ArrayBuffer(8));yt=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
|
|
|
|
|
`)}};PT.RpcError=AV});var gV=I(_T=>{"use strict";Object.defineProperty(_T,"__esModule",{value:!0});_T.mergeRpcOptions=void 0;var XAe=Cr();function ept(t,e){if(!e)return t;let r={};QT(t,r),QT(e,r);for(let n of Object.keys(e)){let s=e[n];switch(n){case"jsonOptions":r.jsonOptions=XAe.mergeJsonOptions(t.jsonOptions,r.jsonOptions);break;case"binaryOptions":r.binaryOptions=XAe.mergeBinaryOptions(t.binaryOptions,r.binaryOptions);break;case"meta":r.meta={},QT(t.meta,r.meta),QT(e.meta,r.meta);break;case"interceptors":r.interceptors=t.interceptors?t.interceptors.concat(s):s.concat();break}}return r}i(ept,"mergeRpcOptions");_T.mergeRpcOptions=ept;function QT(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}i(QT,"copy")});var EV=I(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});Bm.Deferred=Bm.DeferredState=void 0;var gc;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(gc=Bm.DeferredState||(Bm.DeferredState={}));var yV=class{static{i(this,"Deferred")}constructor(e=!0){this._state=gc.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!==gc.PENDING)throw new Error(`cannot resolve ${gc[this.state].toLowerCase()}`);this._resolve(e),this._state=gc.RESOLVED}reject(e){if(this.state!==gc.PENDING)throw new Error(`cannot reject ${gc[this.state].toLowerCase()}`);this._reject(e),this._state=gc.REJECTED}resolvePending(e){this._state===gc.PENDING&&this.resolve(e)}rejectPending(e){this._state===gc.PENDING&&this.reject(e)}};Bm.Deferred=yV});var IV=I(DT=>{"use strict";Object.defineProperty(DT,"__esModule",{value:!0});DT.RpcOutputStreamController=void 0;var ZAe=EV(),Rm=Cr(),CV=class{static{i(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){Rm.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){Rm.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){Rm.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(){Rm.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:i(()=>{let e=this._itState;Rm.assert(e,"bad state"),Rm.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 ZAe.Deferred,e.p.promise)},"next")}}pushIt(e){let r=this._itState;if(r.p){let n=r.p;Rm.assert(n.state==ZAe.DeferredState.PENDING,"iterator contract broken"),"value"in e?n.resolve(e):n.reject(e),delete r.p}else r.q.push(e)}};DT.RpcOutputStreamController=CV});var SV=I(Ph=>{"use strict";var tpt=Ph&&Ph.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ph,"__esModule",{value:!0});Ph.UnaryCall=void 0;var wV=class{static{i(this,"UnaryCall")}constructor(e,r,n,s,o,a,c){this.method=e,this.requestHeaders=r,this.request=n,this.headers=s,this.response=o,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 tpt(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}})}};Ph.UnaryCall=wV});var bV=I(Qh=>{"use strict";var rpt=Qh&&Qh.__awaiter||function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(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`))}i(eEt,"logUnexpecedPropertyAccessOnce");function tEt(){Object.keys(Rv).forEach(function(t){delete Rv[t]})}i(tEt,"resetLoggedProperties")});var Tv=I(Ic=>{"use strict";Ic.__esModule=!0;Ic.HandlebarsEnvironment=aW;function vEe(t){return t&&t.__esModule?t:{default:t}}i(vEe,"_interopRequireDefault");var Lm=ss(),rEt=Eo(),oW=vEe(rEt),nEt=tW(),sEt=BEe(),oEt=nW(),Nv=vEe(oEt),iEt=sW(),aEt="4.7.9";Ic.VERSION=aEt;var cEt=8;Ic.COMPILER_REVISION=cEt;var lEt=7;Ic.LAST_COMPATIBLE_COMPILER_REVISION=lEt;var uEt={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"};Ic.REVISION_CHANGES=uEt;var iW="[object Object]";function aW(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},nEt.registerDefaultHelpers(this),sEt.registerDefaultDecorators(this)}i(aW,"HandlebarsEnvironment");aW.prototype={constructor:aW,logger:Nv.default,log:Nv.default.log,registerHelper:i(function(e,r){if(Lm.toString.call(e)===iW){if(r)throw new oW.default("Arg not supported with multiple helpers");Lm.extend(this.helpers,e)}else this.helpers[e]=r},"registerHelper"),unregisterHelper:i(function(e){delete this.helpers[e]},"unregisterHelper"),registerPartial:i(function(e,r){if(Lm.toString.call(e)===iW)Lm.extend(this.partials,e);else{if(typeof r>"u")throw new oW.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},"registerPartial"),unregisterPartial:i(function(e){delete this.partials[e]},"unregisterPartial"),registerDecorator:i(function(e,r){if(Lm.toString.call(e)===iW){if(r)throw new oW.default("Arg not supported with multiple decorators");Lm.extend(this.decorators,e)}else this.decorators[e]=r},"registerDecorator"),unregisterDecorator:i(function(e){delete this.decorators[e]},"unregisterDecorator"),resetLoggedPropertyAccesses:i(function(){iEt.resetLoggedProperties()},"resetLoggedPropertyAccesses")};var dEt=Nv.default.log;Ic.log=dEt;Ic.createFrame=Lm.createFrame;Ic.logger=Nv.default});var QEe=I((vv,PEe)=>{"use strict";vv.__esModule=!0;function cW(t){this.string=t}i(cW,"SafeString");cW.prototype.toString=cW.prototype.toHTML=function(){return""+this.string};vv.default=cW;PEe.exports=vv.default});var _Ee=I(lW=>{"use strict";lW.__esModule=!0;lW.wrapHelper=pEt;function pEt(t,e){if(typeof t!="function")return t;var r=i(function(){var s=arguments[arguments.length-1];return arguments[arguments.length-1]=e(s),t.apply(this,arguments)},"wrapper");return r}i(pEt,"wrapHelper")});var FEe=I(fd=>{"use strict";fd.__esModule=!0;fd.checkRevision=yEt;fd.template=EEt;fd.wrapProgram=Pv;fd.resolvePartial=CEt;fd.invokePartial=IEt;fd.noop=OEe;function mEt(t){return t&&t.__esModule?t:{default:t}}i(mEt,"_interopRequireDefault");function fEt(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}i(fEt,"_interopRequireWildcard");var AEt=ss(),Yh=fEt(AEt),hEt=Eo(),Jl=mEt(hEt),jl=Tv(),DEe=tW(),gEt=_Ee(),kEe=sW();function yEt(t){var e=t&&t[0]||1,r=jl.COMPILER_REVISION;if(!(e>=jl.LAST_COMPATIBLE_COMPILER_REVISION&&e<=jl.COMPILER_REVISION))if(e<jl.LAST_COMPATIBLE_COMPILER_REVISION){var n=jl.REVISION_CHANGES[r],s=jl.REVISION_CHANGES[e];throw new Jl.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 Jl.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}i(yEt,"checkRevision");function EEt(t,e){if(!e)throw new Jl.default("No environment passed to template");if(!t||!t.main)throw new Jl.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=Yh.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(`
|
|
|
|
|
`),p=0,m=d.length;p<m&&!(!d[p]&&p+1===m);p++)d[p]=l.indent+d[p];u=d.join(`
|
|
|
|
|
`)}return u}else throw new Jl.default("The partial "+l.name+" could not be compiled when running in runtime-only mode")}i(n,"invokePartialWrapper");var s={strict:i(function(c,l,u){if(!c||!(l in c))throw new Jl.default('"'+l+'" not defined in '+c,{loc:u});return s.lookupProperty(c,l)},"strict"),lookupProperty:i(function(c,l){var u=c[l];if(u==null||Object.prototype.hasOwnProperty.call(c,l)||kEe.resultIsAllowed(u,s.protoAccessControl,l))return u},"lookupProperty"),lookup:i(function(c,l){for(var u=c.length,d=0;d<u;d++){var p=c[d]&&s.lookupProperty(c[d],l);if(p!=null)return p}},"lookup"),lambda:i(function(c,l){return typeof c=="function"?c.call(l):c},"lambda"),escapeExpression:Yh.escapeExpression,invokePartial:n,fn:i(function(c){var l=t[c];return l.decorator=t[c+"_d"],l},"fn"),programs:[],program:i(function(c,l,u,d,p){var m=this.programs[c],f=this.fn(c);return l||p||d||u?m=Pv(this,c,f,l,u,d,p):m||(m=this.programs[c]=Pv(this,c,f)),m},"program"),data:i(function(c,l){for(;c&&l--;)c=c._parent;return c},"data"),mergeIfNeeded:i(function(c,l){var u=c||l;return c&&l&&c!==l&&(u=Yh.extend({},l,c)),u},"mergeIfNeeded"),nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function o(a){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],l=c.data;o._setup(c),!c.partial&&t.useData&&(l=wEt(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 p(m){return""+t.main(s,m,s.helpers,s.partials,l,d,u)}return i(p,"main"),p=MEe(t.main,p,s,c.depths||[],l,d),p(a,c)}return i(o,"ret"),o.isTop=!0,o._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={};LEe(c,e.helpers,s),LEe(c,a.helpers,s),s.helpers=c,t.usePartial&&(s.partials=s.mergeIfNeeded(a.partials,e.partials)),(t.usePartial||t.useDecorators)&&(s.decorators=Yh.extend({},e.decorators,a.decorators)),s.hooks={},s.protoAccessControl=kEe.createProtoAccessControl(a);var l=a.allowCallsToHelperMissing||r;DEe.moveHelperToHooks(s,"helperMissing",l),DEe.moveHelperToHooks(s,"blockHelperMissing",l)}},o._child=function(a,c,l,u){if(t.useBlockParams&&!l)throw new Jl.default("must pass block params");if(t.useDepths&&!u)throw new Jl.default("must pass parent depths");return Pv(s,a,t[a],c,0,l,u)},o}i(EEt,"template");function Pv(t,e,r,n,s,o,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,o&&[u.blockParams].concat(o),d)}return i(c,"prog"),c=MEe(r,c,t,a,n,o),c.program=e,c.depth=a?a.length:0,c.blockParams=s||0,c}i(Pv,"wrapProgram");function CEt(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=Qv(r.partials,t)):r.name==="@partial-block"?t=Qv(r.data,"partial-block"):t=Qv(r.partials,r.name),t}i(CEt,"resolvePartial");function IEt(t,e,r){var n=Qv(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!==OEe&&(function(){r.data=jl.createFrame(r.data);var o=r.fn;s=r.data["partial-block"]=i(function(c){var l=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return l.data=jl.createFrame(l.data),l.data["partial-block"]=n,o(c,l)},"partialBlockWrapper"),o.partials&&(r.partials=Yh.extend({},r.partials,o.partials))})(),t===void 0&&s&&(t=s),t===void 0)throw new Jl.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}i(IEt,"invokePartial");function OEe(){return""}i(OEe,"noop");function Qv(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e))return t[e]}i(Qv,"lookupOwnProperty");function wEt(t,e){return(!e||!("root"in e))&&(e=e?jl.createFrame(e):{},e.root=t),e}i(wEt,"initData");function MEe(t,e,r,n,s,o){if(t.decorator){var a={};e=t.decorator(e,a,r,n&&n[0],s,o,n),Yh.extend(e,a)}return e}i(MEe,"executeDecorators");function LEe(t,e,r){e&&Object.keys(e).forEach(function(n){var s=e[n];t[n]=SEt(s,r)})}i(LEe,"addHelpers");function SEt(t,e){var r=e.lookupProperty;return gEt.wrapHelper(t,function(n){return n.lookupProperty=r,n})}i(SEt,"passLookupPropertyOption")});var uW=I((_v,UEe)=>{"use strict";_v.__esModule=!0;_v.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}};UEe.exports=_v.default});var zEe=I((Dv,$Ee)=>{"use strict";Dv.__esModule=!0;function pW(t){return t&&t.__esModule?t:{default:t}}i(pW,"_interopRequireDefault");function mW(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}i(mW,"_interopRequireWildcard");var xEt=Tv(),qEe=mW(xEt),bEt=QEe(),BEt=pW(bEt),REt=Eo(),NEt=pW(REt),TEt=ss(),dW=mW(TEt),vEt=FEe
Line truncated
|
|
|
|
|
`+this.lexer.showPosition()+`
|
|
|
|
|
Expecting `+U.join(", ")+", got '"+(this.terminals_[b]||b)+"'":wt="Parse error on line "+(p+1)+": Unexpected "+(b==1?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(wt,{text:this.lexer.match,token:this.terminals_[b]||b,line:this.lexer.yylineno,loc:E,expected:U})}}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+b);switch(_[0]){case 1:a.push(b),c.push(this.lexer.yytext),l.push(this.lexer.yylloc),a.push(_[1]),b=null,N?(b=N,N=null):(m=this.lexer.yyleng,d=this.lexer.yytext,p=this.lexer.yylineno,E=this.lexer.yylloc,f>0&&f--);break;case 2:if(ne=this.productions_[_[1]][1],ae.$=c[c.length-ne],ae._$={first_line:l[l.length-(ne||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(ne||1)].first_column,last_column:l[l.length-1].last_column},C&&(ae._$.range=[l[l.length-(ne||1)].range[0],l[l.length-1].range[1]]),ye=this.performAction.call(ae,d,m,p,this.yy,_[1],c,l),typeof ye<"u")return ye;ne&&(a=a.slice(0,-1*ne*2),c=c.slice(0,-1*ne),l=l.slice(0,-1*ne)),a.push(this.productions_[_[1]][0]),c.push(ae.$),l.push(ae._$),K=u[a[a.length-2]][a[a.length-1]],a.push(K);break;case 3:return!0}}return!0},"parse")},e=(function(){var n={EOF:1,parseError:i(function(o,a){if(this.yy.parser)this.yy.parser.parseError(o,a);else throw new Error(o)},"parseError"),setInput:i(function(o){return this._input=o,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:i(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var a=o.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),o},"input"),unput:i(function(o){var a=o.length,c=o.split(/(?:\r\n?|\n)/g);this._input=o+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:i(function(){return this._more=!0,this},"more"),less:i(function(o){this.unput(this.match.slice(o))},"less"),pastInput:i(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var o=this.pastInput(),a=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
|
|
|
`+a+"^"},"showPosition"),next:i(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,a,c,l,u,d;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),m=0;m<p.length&&(c=this._input.match(this.rules[p[m]]),!(c&&(!a||c[0].length>a[0].length)&&(a=c,l=m,!this.options.flex)));m++);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],o=this.performAction.call(this,this.yy,this,p[l],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o||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:i(function(){var o=this.next();return typeof o<"u"?o:this.lex()},"lex"),begin:i(function(o){this.conditionStack.push(o)},"begin"),popState:i(function(){return this.conditionStack.pop()},"popState"),_currentRules:i(function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},"_currentRules"),topState:i(function(){return this.conditionStack[this.conditionStack.length-2]},"topState"),pushState:i(function(o){this.begin(o)},"begin")};return n.options={},n.performAction=i(function(o,a,c,l){function u(p,m){return a.yytext=a.yytext.substring(p,a.yyleng-m+p)}i(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 i(r,"Parser"),r.prototype=t,t.Parser=r,new r})();Lv.default=_Et;YEe.exports=Lv.default});var Uv=I((Fv,XEe)=>{"use strict";Fv.__esModule=!0;function DEt(t){return t&&t.__esModule?t:{default:t}}i(DEt,"_interopRequireDefault");var kEt=Eo(),AW=DEt(kEt);function Ov(){this.parents=[]}i(Ov,"Visitor");Ov.prototype={constructor:Ov,mutating:!1,acceptKey:i(function(e,r){var n=this.accept(e[r]);if(this.mutating){if(n&&!Ov.prototype[n.type])throw new AW.default('Unexpected node type "'+n.type+'" found when accepting '+r+" on "+e.type);e[r]=n}},"acceptKey"),acceptRequired:i(function(e,r){if(this.acceptKey(e,r),!e[r])throw new AW.default(e.type+" requires "+r)},"acceptRequired"),acceptArray:i(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:i(function(e){if(e){if(!this[e.type])throw new AW.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:i(function(e){this.acceptArray(e.body)},"Program"),MustacheStatement:Mv,Decorator:Mv,BlockStatement:jEe,DecoratorBlock:jEe,PartialStatement:KEe,PartialBlockStatement:i(function(e){KEe.call(this,e),this.acceptKey(e,"program")},"PartialBlockStatement"),ContentStatement:i(function(){},"ContentStatement"),CommentStatement:i(function(){},"CommentStatement"),SubExpression:Mv,PathExpression:i(function(){},"PathExpressionLine truncated
|
|
|
|
|
`])}),e},"merge"),each:i(function(e){for(var r=0,n=this.source.length;r<n;r++)e(this.source[r])},"each"),empty:i(function(){var e=this.currentLocation||{start:{}};return new Um(e.start.line,e.start.column,this.srcFile)},"empty"),wrap:i(function(e){var r=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return e instanceof Um?e:(e=OW(e,this,r),new Um(r.start.line,r.start.column,this.srcFile,e))},"wrap"),functionCall:i(function(e,r,n){return n=this.generateList(n),this.wrap([e,r?"."+r+"(":"(",n,")"])},"functionCall"),quotedString:i(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:i(function(e){var r=this,n=[];Object.keys(e).forEach(function(o){var a=OW(e[o],r);a!=="undefined"&&n.push([r.quotedString(o),":",a])});var s=this.generateList(n);return s.prepend("{"),s.add("}"),s},"objectLiteral"),generateList:i(function(e){for(var r=this.empty(),n=0,s=e.length;n<s;n++)n&&r.add(","),r.add(OW(e[n],this));return r},"generateList"),generateArray:i(function(e){var r=this.generateList(e);return r.prepend("["),r.add("]"),r},"generateArray")};Yv.default=_Ce;DCe.exports=Yv.default});var UCe=I((Jv,FCe)=>{"use strict";Jv.__esModule=!0;function MCe(t){return t&&t.__esModule?t:{default:t}}i(MCe,"_interopRequireDefault");var LCe=Tv(),QCt=Eo(),FW=MCe(QCt),_Ct=ss(),DCt=kCe(),OCe=MCe(DCt);function eg(t){this.value=t}i(eg,"Literal");function tg(){}i(tg,"JavaScriptCompiler");tg.prototype={nameLookup:i(function(e,r){return this.internalNameLookup(e,r)},"nameLookup"),depthedLookup:i(function(e){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(e),")"]},"depthedLookup"),compilerInfo:i(function(){var e=LCe.COMPILER_REVISION,r=LCe.REVISION_CHANGES[e];return[e,r]},"compilerInfo"),appendToBuffer:i(function(e,r,n){return _Ct.isArray(e)||(e=[e]),e=this.source.wrap(e,r),this.environment.isSimple?["return ",e,";"]:n?["buffer += ",e,";"]:(e.appendToBuffer=!0,e)},"appendToBuffer"),initializeBuffer:i(function(){return this.quotedString("")},"initializeBuffer"),internalNameLookup:i(function(e,r){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",e,",",JSON.stringify(r),")"]},"internalNameLookup"),lookupPropertyFunctionIsUsed:!1,compile:i(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 o=e.opcodes,a=void 0,c=void 0,l=void 0,u=void 0;for(l=0,u=o.length;l<u;l++)a=o[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 FW.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 p={compiler:this.compilerInfo(),main:d};this.decorators&&(p.main_d=this.decorators,p.useDecorators=!0);var m=this.context,f=m.programs,A=m.decorators;for(l=0,u=f.length;l<u;l++)p[l]=f[l],A[l]&&(p[l+"_d"]=A[l],p.useDecorators=!0);return this.environment.usePartial&&(p.usePartial=!0),this.options.data&&(p.useData=!0),this.useDepths&&(p.useDepths=!0),this.useBlockParams&&(p.useBlockParams=!0),this.options.compat&&(p.compat=!0),s?p.compilerOptions=this.options:(p.compiler=JSON.stringify(p.compiler),this.source.currentLocation={start:{line:1,column:0}},p=this.objectLiteral(p),r.srcName?(p=p.toStringWithSourceMap({file:r.destName}),p.map=p.map&&p.map.toString()):p=p.toString()),p},"compile"),preamble:i(function(){this.lastContext=0,this.source=new OCe.default(this.options.srcName),this.decorators=new OCe.default(this.options.srcName)},"preamble"),createFunctionContext:i(function(e){var r=this,n="",s=this.stackVars.concat(this.registers.list);s.length>0&&(n+=", "+s.join(", "));var o=0;Object.keys(this.aliases).forEach(function(l){var u=r.aliases[l];u.children&&u.referenceCount>1&&(n+=", alias"+ ++o+"="+l,u.children[0]="alias"+o)}),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:i(function(e){var r=this.environment.isSimple,n=!this.forceBuffer,s=void 0,o=void 0,a=void 0,c=void 0;return this.source.each(function(l){l.appendToBuffer?(a?l.prepend(" + "):a=l,c=l):(a&&(o?a.prepend("buffer += "):s=!0,c.add(";"),a=c=void 0),o=!0,r||(n=!1))}),n?a?(a.prepend("return "),c.add(";")):o||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:i(function(){return`
|
|
|
|
|
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
|
|
|
return parent[propertyName];
|
|
|
|
|
}
|
|
|
|
|
return undefined
|
|
|
|
|
}
|
|
|
|
|
`.trim()},"lookupPropertyFunctionVarDeclaration"),blockValue:i(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:i(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:i(function(e){this.pendingContent?e=this.pendingContent+e:this.pendingLocation=this.source.currentLocation,this.pendingContent=e},"appendContent"),append:i(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:i(function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},"appendEscaped"),getContext:i(function(e){this.lastContext=e},"getContext"),pushContext:i(function(){this.pushStackLiteral(this.contextName(this.lastContext))},"pushContext"),lookupOnContext:i(function(e,r,n,s){var o=0;!s&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(e[o++])):this.pushContext(),this.resolvePath("context",e,o,r,n)},"lookupOnContext"),lookupBlockParam:i(function(e,r){this.useBlockParams=!0,this.push(["blockParams[",e[0],"][",e[1],"]"]),this.resolvePath("context",r,1)},"lookupBlockParam"),lookupData:i(function(e,r,n){e?this.pushStackLiteral("container.data(data, "+e+")"):this.pushStackLiteral("data"),this.resolvePath("data",r,0,!0,n)},"lookupData"),resolvePath:i(function(e,r,n,s,o){var a=this;if(this.options.strict||this.options.assumeObjects){this.push(kCt(this.options.strict&&o,this,r,n,e));return}for(var c=r.length,l=i(function(d){a.replaceStack(function(p){var m=a.nameLookup(p,r[d],e);return s?[" && ",m]:[" != null ? ",m," : ",p]})},"_loop"),u=n;u<c;u++)l(u)},"resolvePath"),resolvePossibleLambda:i(function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},"resolvePossibleLambda"),pushStringParam:i(function(e,r){this.pushContext(),this.pushString(r),r!=="SubExpression"&&(typeof e=="string"?this.pushString(e):this.pushStackLiteral(e))},"pushStringParam"),emptyHash:i(function(e){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(e?"undefined":"{}")},"emptyHash"),pushHash:i(function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},"pushHash"),popHash:i(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:i(function(e){this.pushStackLiteral(this.quotedString(e))},"pushString"),pushLiteral:i(function(e){this.pushStackLiteral(e)},"pushLiteral"),pushProgram:i(function(e){e!=null?this.pushStackLiteral(this.programExpression(e)):this.pushStackLiteral(null)},"pushProgram"),registerDecorator:i(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:i(function(e,r,n){var s=this.popStack(),o=this.setupHelper(e,r),a=[];n&&a.push(o.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",o.callParams);this.push(l)},"invokeHelper"),itemsSeparatedBy:i(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:i(function(e,r){var n=this.setupHelper(e,r);this.push(this.source.functionCall(n.name,"call",n.callParams))},"invokeKnownHelper"),invokeAmbiguous:i(function(e,r){this.useRegister("helper");var n=this.popStack();this.emptyHash();var s=this.setupHelper(0,e,r),o=this.lastHelper=this.nameLookup("helpers",e,"helper"),a=["(","(helper = ",o," || ",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};cr.prototype.Program=function(t){var e="",r=t.body,n=void 0,s=void 0;if(t.blockParams){var o="BLOCK PARAMS: [";for(n=0,s=t.blockParams.length;n<s;n++)o+=" "+t.blockParams[n];o+=" ]",e+=this.pad(o)}for(n=0,s=r.length;n<s;n++)e+=this.accept(r[n]);return this.padding--,e};cr.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")};cr.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")};cr.prototype.BlockStatement=cr.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};cr.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+" }}")};cr.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+" }}")};cr.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")};cr.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")};cr.prototype.SubExpression=function(t){for(var e=t.params,r=[],n=void 0,s=0,o=e.length;s<o;s++)r.push(this.accept(e[s]));return e="["+r.join(", ")+"]",n=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+n};cr.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e};cr.prototype.StringLiteral=function(t){return'"'+t.value+'"'};cr.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"};cr.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"};cr.prototype.UndefinedLiteral=function(){return"UNDEFINED"};cr.prototype.NullLiteral=function(){return"NULL"};cr.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(", ")+"}"};cr.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)}});var YCe=I((cEr,WCe)=>{var Xv=HCe().default,VCe=$Ce();Xv.PrintVisitor=VCe.PrintVisitor;Xv.print=VCe.print;WCe.exports=Xv;function zCe(t,e){var r=require("fs"),n=r.readFileSync(e,"utf8");t.exports=Xv.compile(n)}i(zCe,"extension");typeof require<"u"&&require.extensions&&(require.extensions[".handlebars"]=zCe,require.extensions[".hbs"]=zCe)});var iIe=I(nP=>{"use strict";Object.defineProperty(nP,"__esModule",{value:!0});nP.getProxyUrl=eIt;nP.checkBypass=oIe;function eIt(t){let e=t.protocol==="https:";if(oIe(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 rP(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new rP(`http://${r}`)}else return}i(eIt,"getProxyUrl");function oIe(t){if(!t.hostname)return!1;let e=t.hostname;if(tIt(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 o of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(o==="*"||s.some(a=>a===o||a.endsWith(`.${o}`)||o.startsWith(".")&&a.endsWith(`${o}`)))return!0;return!1}i(oIe,"checkBypass");function tIt(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}i(tIt,"isLoopbackAddress");var rP=class extends URL{static{i(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 cIe=I(Gt=>{"use strict";var rIt=Gt&&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:i(function(){return e[r]},"get")}),Object.defineProperty(t,n,s)}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),nIt=Gt&&Gt.__setModuleDefault||(Object.create?(function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}):function(t,e){t.default=e}),aP=Gt&&Gt.__importStar||(function(){var t=i(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"&&rIt(r,e,n[s]);return nIt(r,e),
Line truncated
|
|
|
|
|
versions published after the first week of January 2027
|
|
|
|
|
will require node >=${r}. You are running node ${t}.
|
|
|
|
|
|
|
|
|
|
To continue receiving updates to AWS services, bug fixes,
|
|
|
|
|
and security updates please upgrade to node >=${r}.
|
|
|
|
|
|
|
|
|
|
More information can be found at: https://a.co/c895JFp`))}},"emitWarningIfUnsupportedVersion")});var fwt,Awt,owe,iwe=g(()=>{fwt=i(()=>(t,e)=>async r=>(e.__retryLongPoll=!0,t(r)),"longPollMiddleware"),Awt={name:"longPollMiddleware",tags:["RETRY"],step:"initialize",override:!0},owe=i(t=>({applyToStack:i(e=>{e.add(fwt(),Awt)},"applyToStack")}),"getLongPollPlugin")});function Ed(t,e,r){return t.$source||(t.$source={}),t.$source[e]=r,t}var awe=g(()=>{i(Ed,"setCredentialFeature")});var cwe,pY,lwe=g(()=>{cwe=require("node:stream"),pY=i(t=>t?.body instanceof cwe.Readable||typeof ReadableStream<"u"&&t?.body instanceof ReadableStream,"isStreamingPayload")});var zm,Cd,Id,uwe,dwe,AP=g(()=>{zm=i((t,e)=>{let r=[];if(t&&r.push(t),e)for(let n of e)r.push(n);return r},"getAllAliases"),Cd=i((t,e)=>`${t||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,"getMiddlewareNameWithAliases"),Id=i(()=>{let t=[],e=[],r=!1,n=new Set,s=i(p=>p.sort((m,f)=>uwe[f.step]-uwe[m.step]||dwe[f.priority||"normal"]-dwe[m.priority||"normal"]),"sort"),o=i(p=>{let m=!1,f=i(A=>{let h=zm(A.name,A.aliases);if(h.includes(p)){m=!0;for(let E of h)n.delete(E);return!1}return!0},"filterCb");return t=t.filter(f),e=e.filter(f),m},"removeByName"),a=i(p=>{let m=!1,f=i(A=>{if(A.middleware===p){m=!0;for(let h of zm(A.name,A.aliases))n.delete(h);return!1}return!0},"filterCb");return t=t.filter(f),e=e.filter(f),m},"removeByReference"),c=i(p=>(t.forEach(m=>{p.add(m.middleware,{...m})}),e.forEach(m=>{p.addRelativeTo(m.middleware,{...m})}),p.identifyOnResolve?.(d.identifyOnResolve()),p),"cloneTo"),l=i(p=>{let m=[];return p.before.forEach(f=>{f.before.length===0&&f.after.length===0?m.push(f):m.push(...l(f))}),m.push(p),p.after.reverse().forEach(f=>{f.before.length===0&&f.after.length===0?m.push(f):m.push(...l(f))}),m},"expandRelativeMiddlewareList"),u=i((p=!1)=>{let m=[],f=[],A={};return t.forEach(E=>{let C={...E,before:[],after:[]};for(let w of zm(C.name,C.aliases))A[w]=C;m.push(C)}),e.forEach(E=>{let C={...E,before:[],after:[]};for(let w of zm(C.name,C.aliases))A[w]=C;f.push(C)}),f.forEach(E=>{if(E.toMiddleware){let C=A[E.toMiddleware];if(C===void 0){if(p)return;throw new Error(`${E.toMiddleware} is not found when adding ${Cd(E.name,E.aliases)} middleware ${E.relation} ${E.toMiddleware}`)}E.relation==="after"&&C.after.push(E),E.relation==="before"&&C.before.push(E)}}),s(m).map(l).reduce((E,C)=>(E.push(...C),E),[])},"getMiddlewareList"),d={add:i((p,m={})=>{let{name:f,override:A,aliases:h}=m,E={step:"initialize",priority:"normal",middleware:p,...m},C=zm(f,h);if(C.length>0){if(C.some(w=>n.has(w))){if(!A)throw new Error(`Duplicate middleware name '${Cd(f,h)}'`);for(let w of C){let x=t.findIndex(N=>N.name===w||N.aliases?.some(P=>P===w));if(x===-1)continue;let b=t[x];if(b.step!==E.step||E.priority!==b.priority)throw new Error(`"${Cd(b.name,b.aliases)}" middleware with ${b.priority} priority in ${b.step} step cannot be overridden by "${Cd(f,h)}" middleware with ${E.priority} priority in ${E.step} step.`);t.splice(x,1)}}for(let w of C)n.add(w)}t.push(E)},"add"),addRelativeTo:i((p,m)=>{let{name:f,override:A,aliases:h}=m,E={middleware:p,...m},C=zm(f,h);if(C.length>0){if(C.some(w=>n.has(w))){if(!A)throw new Error(`Duplicate middleware name '${Cd(f,h)}'`);for(let w of C){let x=e.findIndex(N=>N.name===w||N.aliases?.some(P=>P===w));if(x===-1)continue;let b=e[x];if(b.toMiddleware!==E.toMiddleware||b.relation!==E.relation)throw new Error(`"${Cd(b.name,b.aliases)}" middleware ${b.relation} "${b.toMiddleware}" middleware cannot be overridden by "${Cd(f,h)}" middleware ${E.relation} "${E.toMiddleware}" middleware.`);e.splice(x,1)}}for(let w of C)n.add(w)}e.push(E)},"addRelativeTo"),clone:i(()=>c(Id()),"clone"),use:i(p=>{p.applyToStack(d)},"use"),remove:i(p=>typeof p=="string"?o(p):a(p),"remove"),removeByTag:i(p=>{let m=!1,f=i(A=>{let{tags:h,name:E,aliases:C}=A;if(h&&h.includes(p)){let w=zm(E,C);for(let x of w)n.delete(x);return m=!0,!1}return!0},"filterCb");return t=t.filter(f),e=e.filter(f),m},"removeByTag"),concat:i(p=>{let m=c(Id());return m.use(p),m.identifyOnResolve(r||m.identifyOnResolve()||(p.identifyOnResolve?.()??!1)),m},"concat"),applyToStack:c,identify:i(()=>u(!0).map(p=>{let m=p.step??p.relation+" "+p.toMiddleware;return Cd(p.name,p.aliases)+" - "+m}),"identify"),identifyOnResolve(p){return typeof p=="boolean"&&(r=p),r},resolve:i((p,m)=>{for(let f of u().map(A=>A.middleware).reverse())p=f(p,m);return r&&console.log(d.identify()),p},"resolve")};return d},"constructStack"),uwe={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},dwe={high:3,normal:2,low:1}});var xc=I(Yi=>{var mY;(function(t){t.HEADER="header",t.QUERY="query"})(mY||(mY={}));var fY;(function(t){t.HEADER="header",t.QUERY="query"})(fY||(fY={}));var AY;(function(t){t.HTTP="http",t.HTTPS="https"})(AY||(AY={}));var uw;(function(t){t.MD5="md5",t.CRC32="crc32",t.CRC32C="crc32c",t.SHA1="sha1",t.SHA256="sha256"})(uw||(uw={}));var hwt=i(t=>{let e=[];return t.sha256!==void 0&&e.push({algorithmId:i(
Line truncated
|
|
|
|
|
`+m}catch{!r.logger||r.logger?.constructor?.name==="NoOpLogger"?console.warn(m):r.logger?.warn?.(m)}typeof p.$responseBodyText<"u"&&p.$response&&(p.$response.body=p.$responseBodyText);try{if(pn.isInstance(s)){let{headers:f={},statusCode:A}=s,h=Object.entries(f);p.$metadata={httpStatusCode:A,requestId:xY(/^x-[\w-]+-request-?id$/,h),extendedRequestId:xY(/^x-[\w-]+-id-2$/,h),cfId:xY(/^x-[\w-]+-cf-id$/,h)}}}catch{}}throw p}},"schemaDeserializationMiddleware"),xY=i((t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],"findHeader")});var Lwe,Owe=g(()=>{Et();yP();Lwe=i(t=>(e,r)=>async n=>{let{operationSchema:s}=Bt(r),[,o,a,c,l,u]=s??[],d=r.endpointV2?async()=>Io(r.endpointV2):t.endpoint,p=await t.protocol.serializeRequest(dg(o,a,c,l,u),n.input,{...t,...r,endpoint:d});return e({...n,request:p})},"schemaSerializationMiddleware")});function bc(t){return{applyToStack:i(e=>{e.add(Lwe(t),BY),e.add(Dwe(t),bY),t.protocol.setSerdeContext(t)},"applyToStack")}}var bY,BY,Mwe=g(()=>{kwe();Owe();bY={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},BY={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};i(bc,"getSchemaSerdePlugin")});var lr,wd=g(()=>{lr=class{static{i(this,"Schema")}name;namespace;traits;static assign(e,r){return Object.assign(e,r)}static[Symbol.hasInstance](e){let r=this.prototype.isPrototypeOf(e);return!r&&typeof e=="object"&&e!==null?e.symbol===this.symbol:r}getName(){return this.namespace+"#"+this.name}}});var mw,Fwe,Uwe=g(()=>{wd();mw=class t extends lr{static{i(this,"ListSchema")}static symbol=Symbol.for("@smithy/lis");name;traits;valueSchema;symbol=t.symbol},Fwe=i((t,e,r,n)=>lr.assign(new mw,{name:e,namespace:t,traits:r,valueSchema:n}),"list")});var fw,qwe,Gwe=g(()=>{wd();fw=class t extends lr{static{i(this,"MapSchema")}static symbol=Symbol.for("@smithy/map");name;traits;keySchema;valueSchema;symbol=t.symbol},qwe=i((t,e,r,n,s)=>lr.assign(new fw,{name:e,namespace:t,traits:r,keySchema:n,valueSchema:s}),"map")});var Aw,Hwe,$we=g(()=>{wd();Aw=class t extends lr{static{i(this,"OperationSchema")}static symbol=Symbol.for("@smithy/ope");name;traits;input;output;symbol=t.symbol},Hwe=i((t,e,r,n,s)=>lr.assign(new Aw,{name:e,namespace:t,traits:r,input:n,output:s}),"op")});var Vm,zwe,RY=g(()=>{wd();Vm=class t extends lr{static{i(this,"StructureSchema")}static symbol=Symbol.for("@smithy/str");name;traits;memberNames;memberList;symbol=t.symbol},zwe=i((t,e,r,n,s)=>lr.assign(new Vm,{name:e,namespace:t,traits:r,memberNames:n,memberList:s}),"struct")});var hw,Vwe,Wwe=g(()=>{wd();RY();hw=class t extends Vm{static{i(this,"ErrorSchema")}static symbol=Symbol.for("@smithy/err");ctor;symbol=t.symbol},Vwe=i((t,e,r,n,s,o)=>lr.assign(new hw,{name:e,namespace:t,traits:r,memberNames:n,memberList:s,ctor:null}),"error")});function ji(t){if(typeof t=="object")return t;if(t=t|0,gw[t])return gw[t];let e={},r=0;for(let n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(t>>r++&1)===1&&(e[n]=1);return gw[t]=e}var gw,NY=g(()=>{gw=[];i(ji,"translateTraits")});function Ew(t,e){if(t instanceof te)return Object.assign(t,{memberName:e,_isMemberSchema:!0});let r=te;return new r(t,e)}var yw,Cw,Iw,te,TY,vY,Ywe=g(()=>{SY();NY();yw={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},Cw=[],Iw={},te=class t{static{i(this,"NormalizedSchema")}ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=t.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,r){this.ref=e,this.memberName=r;let n=[],s=e,o=e;for(this._isMemberSchema=!1;TY(s);)n.push(s[1]),s=s[0],o=ci(s),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let a=n.length-1;a>=0;--a){let c=n[a];Object.assign(this.memberTraits,ji(c))}}else this.memberTraits=0;if(o instanceof t){let a=this.memberTraits;Object.assign(this,o),this.memberTraits=Object.assign({},a,o.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=r??o.memberName;return}if(this.schema=ci(o),vY(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(o),this.traits=0),this._isMemberSchema&&!r)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){let r=this.prototype.isPrototypeOf(e);return!r&&typeof e=="object"&&e!==null?e.symbol===this.symbol:r}static of(e){let r=typeof e=="function"||typeof e=="object"&&e!==null;if(typeof e=="number"){if(Cw[e])return Cw[e]}else if(typeof e=="string"){if(Iw[e])return Iw[e]}else if(r&&e[yw.ns])return e[yw.ns];let n=ci(e);if(n instanceof t)return n;if(TY(n)){let[o,a]=n;if(o instanceof t)return Object.assign(o.getMergedTraits(),ji(a)),o;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}let s=new t(n);return r?e[yw.ns]=s:typeof n=="string"?Iw[n]=s:typeof n=="number"?Cw[n]=s
Line truncated
|
|
|
|
|
`).slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join(`
|
|
|
|
|
`),EC={warn:console.warn}});function IC(t){let e=t.getUTCFullYear(),r=t.getUTCMonth(),n=t.getUTCDay(),s=t.getUTCDate(),o=t.getUTCHours(),i=t.getUTCMinutes(),a=t.getUTCSeconds(),c=s<10?`0${s}`:`${s}`,l=o<10?`0${o}`:`${o}`,u=i<10?`0${i}`:`${i}`,d=a<10?`0${a}`:`${a}`;return`${Pit[n]}, ${c} ${az[r]} ${e} ${l}:${u}:${d} GMT`}var Pit,az,Qit,_it,vit,cz,Dit,kit,Lit,lz,uz,CC,Oit,Fit,Mit,iz,Uit,qit,$it,sc,Git,Hit,sg,Hfe=_(()=>{oz();Pit=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],az=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Qit=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),_it=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let e=Qit.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,s,o,i,a,c,l]=e,u=Hp(sg(n)),d=sc(s,"month",1,12),p=sc(o,"day",1,31);return CC(u,d,p,{hours:i,minutes:a,seconds:c,fractionalMilliseconds:l})},vit=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),cz=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let e=vit.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,s,o,i,a,c,l,u]=e,d=Hp(sg(n)),p=sc(s,"month",1,12),A=sc(o,"day",1,31),g=CC(d,p,A,{hours:i,minutes:a,seconds:c,fractionalMilliseconds:l});return u.toUpperCase()!="Z"&&g.setTime(g.getTime()-Hit(u)),g},Dit=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),kit=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Lit=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),lz=t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=Dit.exec(t);if(e){let[r,n,s,o,i,a,c,l]=e;return CC(Hp(sg(o)),iz(s),sc(n,"day",1,31),{hours:i,minutes:a,seconds:c,fractionalMilliseconds:l})}if(e=kit.exec(t),e){let[r,n,s,o,i,a,c,l]=e;return Mit(CC(Oit(o),iz(s),sc(n,"day",1,31),{hours:i,minutes:a,seconds:c,fractionalMilliseconds:l}))}if(e=Lit.exec(t),e){let[r,n,s,o,i,a,c,l]=e;return CC(Hp(sg(l)),iz(n),sc(s.trimLeft(),"day",1,31),{hours:o,minutes:i,seconds:a,fractionalMilliseconds:c})}throw new TypeError("Invalid RFC-7231 date-time value")},uz=t=>{if(t==null)return;let e;if(typeof t=="number")e=t;else if(typeof t=="string")e=QN(t);else if(typeof t=="object"&&t.tag===1)e=t.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(e)||e===1/0||e===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(e*1e3))},CC=(t,e,r,n)=>{let s=e-1;return qit(t,s,r),new Date(Date.UTC(t,s,r,sc(n.hours,"hour",0,23),sc(n.minutes,"minute",0,59),sc(n.seconds,"seconds",0,60),Git(n.fractionalMilliseconds)))},Oit=t=>{let e=new Date().getUTCFullYear(),r=Math.floor(e/100)*100+Hp(sg(t));return r<e?r+100:r},Fit=50*365*24*60*60*1e3,Mit=t=>t.getTime()-new Date().getTime()>Fit?new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())):t,iz=t=>{let e=az.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},Uit=[31,28,31,30,31,30,31,31,30,31,30,31],qit=(t,e,r)=>{let n=Uit[e];if(e===1&&$it(t)&&(n=29),r>n)throw new TypeError(`Invalid day for ${az[e]} in ${t}: ${r}`)},$it=t=>t%4===0&&(t%100!==0||t%400===0),sc=(t,e,r,n)=>{let s=sz(sg(t));if(s<r||s>n)throw new TypeError(`${e} must be between ${r} and ${n}, inclusive`);return s},Git=t=>t==null?0:rz("0."+t)*1e3,Hit=t=>{let e=t[0],r=1;if(e=="+")r=1;else if(e=="-")r=-1;else throw new TypeError(`Offset direction, ${e}, must be "+" or "-"`);let n=Number(t.substring(1,3)),s=Number(t.substring(4,6));return r*(n*60+s)*60*1e3},sg=t=>{let e=0;for(;e<t.length-1&&t.charAt(e)==="0";)e++;return e===0?t:t.slice(e)}});var bC={};hn(bC,{__addDisposableResource:()=>dge,__assign:()=>_N,__asyncDelegator:()=>nge,__asyncGenerator:()=>rge,__asyncValues:()=>sge,__await:()=>og,__awaiter:()=>Jfe,__classPrivateFieldGet:()=>cge,__classPrivateFieldIn:()=>uge,__classPrivateFieldSet:()=>lge,__createBinding:()=>DN,__decorate:()=>Yfe,__disposeResources:()=>pge,__esDecorate:()=>zit,__exportStar:()=>Xfe,__extends:()=>zfe,__generator:()=>Kfe,__importDefault:()=>age,__importStar:()=>ige,__makeTemplateObject:()=>oge,__metadata:()=>Wfe,__param:()=>jfe,__propKey:()=>Yit,__read:()=>pz,__rest:()=>Vfe,__runInitializers:()=>Vit,__setFunctionName:()=>jit,__spread:()=>Zfe,__spreadArray:()=>tge,__spreadArrays:()=>ege,__values:()=>vN,default:()=>K
Line truncated
|
|
|
|
|
no longer support Node.js ${t} in January 2026.
|
|
|
|
|
|
|
|
|
|
To continue receiving updates to AWS services, bug fixes, and security
|
|
|
|
|
updates please upgrade to a supported Node.js LTS version.
|
|
|
|
|
|
|
|
|
|
More information can be found at: https://a.co/c895JFp`))}});function Kp(t,e,r){return t.$source||(t.$source={}),t.$source[e]=r,t}var Che=_(()=>{});function Dat(t,e,r){t.__aws_sdk_context?t.__aws_sdk_context.features||(t.__aws_sdk_context.features={}):t.__aws_sdk_context={features:{}},t.__aws_sdk_context.features[e]=r}var Ihe=_(()=>{});function kat(t,e,r){return t.$source||(t.$source={}),t.$source[e]=r,t}var bhe=_(()=>{});var ni={};hn(ni,{emitWarningIfUnsupportedVersion:()=>pl,setCredentialFeature:()=>Kp,setFeature:()=>Dat,setTokenFeature:()=>kat,state:()=>qz});var mn=_(()=>{Ehe();Che();Ihe();bhe()});var Gz=C(Lu=>{"use strict";var Lat=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Oat=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Fat=["TimeoutError","RequestTimeout","RequestTimeoutException"],Mat=[500,502,503,504],Uat=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],qat=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],xhe=t=>t?.$retryable!==void 0,$at=t=>Lat.includes(t.name),whe=t=>t.$metadata?.clockSkewCorrected,Bhe=t=>{let e=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return t&&t instanceof TypeError?e.has(t.message):!1},Gat=t=>t.$metadata?.httpStatusCode===429||Oat.includes(t.name)||t.$retryable?.throttling==!0,$z=(t,e=0)=>xhe(t)||whe(t)||Fat.includes(t.name)||Uat.includes(t?.code||"")||qat.includes(t?.code||"")||Mat.includes(t.$metadata?.httpStatusCode||0)||Bhe(t)||t.cause!==void 0&&e<=10&&$z(t.cause,e+1),Hat=t=>{if(t.$metadata?.httpStatusCode!==void 0){let e=t.$metadata.httpStatusCode;return 500<=e&&e<=599&&!$z(t)}return!1};Lu.isBrowserNetworkError=Bhe;Lu.isClockSkewCorrectedError=whe;Lu.isClockSkewError=$at;Lu.isRetryableByTrait=xhe;Lu.isServerError=Hat;Lu.isThrottlingError=Gat;Lu.isTransientError=$z});var Al=C(br=>{"use strict";var zat=Gz();br.RETRY_MODES=void 0;(function(t){t.STANDARD="standard",t.ADAPTIVE="adaptive"})(br.RETRY_MODES||(br.RETRY_MODES={}));var Hz=3,Vat=br.RETRY_MODES.STANDARD,HN=class t{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;let r=this.getCurrentTimeInSeconds();this.lastThrottleTime=r,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.availableTokens){let r=(e-this.availableTokens)/this.fillRate*1e3;await new Promise(n=>t.setTimeoutFn(n,r))}this.availableTokens=this.availableTokens-e}}refillTokenBucket(){let e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}let r=(e-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+r),this.lastTimestamp=e}updateClientSendingRate(e){let r;this.updateMeasuredRate();let n=e;if(n?.errorType==="THROTTLING"||zat.isThrottlingError(n?.error??e)){let i=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=i,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),r=this.cubicThrottle(i),this.enableTokenBucket()}else this.calculateTimeWindow(),r=this.cubicSuccess(this.getCurrentTimeInSeconds());let o=Math.min(r,2*this.measuredTxRate);this.updateTokenBucketRate(o)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){let e=this.getCurrentTimeInSeconds(),r=Math.floor(e*2)/2;if(this.requestCount++,r>this.lastTxRateBucket){let n=this.requestCount/(r-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=r}}getPre
Line truncated
|
|
|
|
|
`+a}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(a):n.logger?.warn?.(a)}typeof i.$responseBodyText<"u"&&i.$response&&(i.$response.body=i.$responseBodyText);try{if(flt.HttpResponse.isInstance(o)){let{headers:c={}}=o,l=Object.entries(c);i.$metadata={httpStatusCode:o.statusCode,requestId:lV(/^x-[\w-]+-request-?id$/,l),extendedRequestId:lV(/^x-[\w-]+-id-2$/,l),cfId:lV(/^x-[\w-]+-cf-id$/,l)}}}catch{}}throw i}},lV=(t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],cye=(t,e)=>(r,n)=>async s=>{let o=t,i=n.endpointV2?async()=>glt.toEndpointV1(n.endpointV2):o.endpoint;if(!i)throw new Error("No valid endpoint provider available.");let a=await e(s.input,{...t,endpoint:i});return r({...s,request:a})},lye={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},uye={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function hlt(t,e,r){return{applyToStack:n=>{n.add(aye(t,r),lye),n.add(cye(t,e),uye)}}}Ag.deserializerMiddleware=aye;Ag.deserializerMiddlewareOption=lye;Ag.getSerdePlugin=hlt;Ag.serializerMiddleware=cye;Ag.serializerMiddlewareOption=uye});var si=C(fl=>{"use strict";var Aye=iye(),pye=Hi(),ylt=(Un(),Ze(SC)),tT=Fn(),Elt=dye(),Clt=async t=>{let e=t?.Bucket||"";if(typeof t.Bucket=="string"&&(t.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),Blt(e)){if(t.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!wlt(e)||e.indexOf(".")!==-1&&!String(t.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(t.ForcePathStyle=!0);return t.DisableMultiRegionAccessPoints&&(t.disableMultiRegionAccessPoints=!0,t.DisableMRAP=!0),t},Ilt=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,blt=/(\d+\.){3}\d+/,xlt=/\.\./,wlt=t=>Ilt.test(t)&&!blt.test(t)&&!xlt.test(t),Blt=t=>{let[e,r,n,,,s]=t.split(":"),o=e==="arn"&&t.split(":").length>=6,i=!!(o&&r&&n&&s);if(o&&!i)throw new Error(`Invalid ARN: ${t} was an invalid ARN.`);return i},Slt=(t,e,r,n=!1)=>{let s=async()=>{let o;return n?o=r.clientContextParams?.[t]??r[t]??r[e]:o=r[t]??r[e],typeof o=="function"?o():o};return t==="credentialScope"||e==="CredentialScope"?async()=>{let o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.credentialScope??o?.CredentialScope}:t==="accountId"||e==="AccountId"?async()=>{let o=typeof r.credentials=="function"?await r.credentials():r.credentials;return o?.accountId??o?.AccountId}:t==="endpoint"||e==="endpoint"?async()=>{if(r.isCustomEndpoint===!1)return;let o=await s();if(o&&typeof o=="object"){if("url"in o)return o.url.href;if("hostname"in o){let{protocol:i,hostname:a,port:c,path:l}=o;return`${i}//${a}${c?":"+c:""}${l}`}}return o}:s},uV=t=>{if(typeof t=="object"){if("url"in t){let e=pye.parseUrl(t.url);if(t.headers){e.headers={};for(let[r,n]of Object.entries(t.headers))e.headers[r.toLowerCase()]=n.join(", ")}return e}return t}return pye.parseUrl(t)},mye=async(t,e,r,n)=>{if(!r.isCustomEndpoint){let i;r.serviceConfiguredEndpoint?i=await r.serviceConfiguredEndpoint():i=await Aye.getEndpointFromConfig(r.serviceId),i&&(r.endpoint=()=>Promise.resolve(uV(i)),r.isCustomEndpoint=!0)}let s=await fye(t,e,r);if(typeof r.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");let o=r.endpointProvider(s,n);if(r.isCustomEndpoint&&r.endpoint){let i=await r.endpoint();if(i?.headers){o.headers??={};for(let[a,c]of Object.entries(i.headers))o.headers[a]=Array.isArray(c)?c:[c]}}return o},fye=async(t,e,r)=>{let n={},s=e?.getEndpointParameterInstructions?.()||{};for(let[o,i]of Object.entries(s))switch(i.type){case"staticContextParams":n[o]=i.value;break;case"contextParams":n[o]=t[i.name];break;case"clientContextParams":case"builtInParams":n[o]=await Slt(i.name,o,r,i.type!=="builtInParams")();break;case"operationContextParams":n[o]=i.get(t);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(i))}return Object.keys(s).length===0&&Object.assign(n,r),String(r.serviceId).toLowerCase()==="s3"&&await Clt(n),n},gye=({config:t,instructions:e})=>(r,n)=>async s=>{t.isCustomEndpoint&&ylt.setFeature(n,"ENDPOINT_OVERRIDE","N");let o=await mye(s.input,{getEndpointParameterInstructions(){return e}},{...t},n);n.endpointV2=o,n.authSchemes=o.properties?.authSchemes;let i=n.authSchemes?.[0];if(i){n.signing_region=i.signingRegion,n.signing_service=i.signingName;let c=tT.getSmithyContext(n)?.selectedHttpAuthScheme?.httpAuthOption;c&&(c.signingProperties=Object.assign(c.signingProperties||{},{signing_region:i.signingRegion,signingRegion:i.signingRegion,signing_service:i.signingName,signingName:i.signingName,signingRegionSet:i.signingRegionSet},i.properties))}return r({...s})},hye={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Elt.serializerMiddlewareOption.name},Rlt=(t,e)=>({applyToStack:r=>{r.addRelativeTo(gye({config:t,instructions:e}),h
Line truncated
|
|
|
|
|
`),"stackTraceWarning"),yg={warn:console.warn}});function Zi(t){let e=t.getUTCFullYear(),r=t.getUTCMonth(),n=t.getUTCDay(),s=t.getUTCDate(),o=t.getUTCHours(),a=t.getUTCMinutes(),c=t.getUTCSeconds(),l=s<10?`0${s}`:`${s}`,u=o<10?`0${o}`:`${o}`,d=a<10?`0${a}`:`${a}`,p=c<10?`0${c}`:`${c}`;return`${kwt[n]}, ${l} ${YY[r]} ${e} ${u}:${d}:${p} GMT`}var kwt,YY,Lwt,YSe,Owt,kP,Mwt,Fwt,Uwt,Ig,LP,xw,qwt,Gwt,Hwt,WY,$wt,zwt,Vwt,Pc,Wwt,Ywt,Cg,JSe=g(()=>{VY();kwt=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],YY=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];i(Zi,"dateToUtcString");Lwt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),YSe=i(t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let e=Lwt.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,s,o,a,c,l,u]=e,d=bd(Cg(n)),p=Pc(s,"month",1,12),m=Pc(o,"day",1,31);return xw(d,p,m,{hours:a,minutes:c,seconds:l,fractionalMilliseconds:u})},"parseRfc3339DateTime"),Owt=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}:\d{2})|[zZ])$/),kP=i(t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");let e=Owt.exec(t);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");let[r,n,s,o,a,c,l,u,d]=e,p=bd(Cg(n)),m=Pc(s,"month",1,12),f=Pc(o,"day",1,31),A=xw(p,m,f,{hours:a,minutes:c,seconds:l,fractionalMilliseconds:u});return d.toUpperCase()!="Z"&&A.setTime(A.getTime()-Ywt(d)),A},"parseRfc3339DateTimeWithOffset"),Mwt=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Fwt=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Uwt=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Ig=i(t=>{if(t==null)return;if(typeof t!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=Mwt.exec(t);if(e){let[r,n,s,o,a,c,l,u]=e;return xw(bd(Cg(o)),WY(s),Pc(n,"day",1,31),{hours:a,minutes:c,seconds:l,fractionalMilliseconds:u})}if(e=Fwt.exec(t),e){let[r,n,s,o,a,c,l,u]=e;return Hwt(xw(qwt(o),WY(s),Pc(n,"day",1,31),{hours:a,minutes:c,seconds:l,fractionalMilliseconds:u}))}if(e=Uwt.exec(t),e){let[r,n,s,o,a,c,l,u]=e;return xw(bd(Cg(u)),WY(n),Pc(s.trimLeft(),"day",1,31),{hours:o,minutes:a,seconds:c,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),LP=i(t=>{if(t==null)return;let e;if(typeof t=="number")e=t;else if(typeof t=="string")e=Sw(t);else if(typeof t=="object"&&t.tag===1)e=t.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(e)||e===1/0||e===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(e*1e3))},"parseEpochTimestamp"),xw=i((t,e,r,n)=>{let s=e-1;return zwt(t,s,r),new Date(Date.UTC(t,s,r,Pc(n.hours,"hour",0,23),Pc(n.minutes,"minute",0,59),Pc(n.seconds,"seconds",0,60),Wwt(n.fractionalMilliseconds)))},"buildDate"),qwt=i(t=>{let e=new Date().getUTCFullYear(),r=Math.floor(e/100)*100+bd(Cg(t));return r<e?r+100:r},"parseTwoDigitYear"),Gwt=50*365*24*60*60*1e3,Hwt=i(t=>t.getTime()-new Date().getTime()>Gwt?new Date(Date.UTC(t.getUTCFullYear()-100,t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())):t,"adjustRfc850Year"),WY=i(t=>{let e=YY.indexOf(t);if(e<0)throw new TypeError(`Invalid month: ${t}`);return e+1},"parseMonthByShortName"),$wt=[31,28,31,30,31,30,31,31,30,31,30,31],zwt=i((t,e,r)=>{let n=$wt[e];if(e===1&&Vwt(t)&&(n=29),r>n)throw new TypeError(`Invalid day for ${YY[e]} in ${t}: ${r}`)},"validateDayOfMonth"),Vwt=i(t=>t%4===0&&(t%100!==0||t%400===0),"isLeapYear"),Pc=i((t,e,r,n)=>{let s=DP(Cg(t));if(s<r||s>n)throw new TypeError(`${e} must be between ${r} and ${n}, inclusive`);return s},"parseDateValue"),Wwt=i(t=>t==null?0:QP("0."+t)*1e3,"parseMilliseconds"),Ywt=i(t=>{let e=t[0],r=1;if(e=="+")r=1;else if(e=="-")r=-1;else throw new TypeError(`Offset direction, ${e}, must be "+" or "-"`);let n=Number(t.substring(1,3)),s=Number(t.substring(4,6));return r*(n*60+s)*60*1e3},"parseOffsetToMilliseconds"),Cg=i(t=>{let e=0;for(;e<t.length-1&&t.charAt(e)==="0";)e++;return e===0?t:t.slice(e)},"stripLeadingZeroes")});var Qn,jSe=g(()=>{Qn=i(function(e){return Object.assign(new String(e),{deserializeJSON(){return JSON.parse(String(e))},toString(){return String(e)},toJSON(){return String(e)}})},"LazyJsonString");Qn.from=t=>t&&typeof t=="object"&&(t instanceof Qn||"deserializeJSON"in t)?t:typeof t=="string"||Object.getPrototypeOf(t)===String.p
Line truncated
|
|
|
|
|
`+c}catch{!n.logger||n.logger?.constructor?.name==="NoOpLogger"?console.warn(c):n.logger?.warn?.(c)}typeof a.$responseBodyText<"u"&&a.$response&&(a.$response.body=a.$responseBodyText);try{if(pn.isInstance(o)){let{headers:l={}}=o,u=Object.entries(l);a.$metadata={httpStatusCode:o.statusCode,requestId:tJ(/^x-[\w-]+-request-?id$/,u),extendedRequestId:tJ(/^x-[\w-]+-id-2$/,u),cfId:tJ(/^x-[\w-]+-cf-id$/,u)}}}catch{}}throw a}},"deserializerMiddleware"),tJ=i((t,e)=>(e.find(([r])=>r.match(t))||[void 0,void 0])[1],"findHeader")});var So,Bw=g(()=>{So=class t extends Error{static{i(this,"ProviderError")}name="ProviderError";tryNextLink;constructor(e,r=!0){let n,s=!0;typeof r=="boolean"?(n=void 0,s=r):r!=null&&typeof r=="object"&&(n=r.logger,s=r.tryNextLink??!0),super(e),this.tryNextLink=s,Object.setPrototypeOf(this,t.prototype),n?.debug?.(`@smithy/property-provider ${s?"->":"(!)"} ${e}`)}static from(e,r=!0){return Object.assign(new this(e.message,r),e)}}});var Bd,$P=g(()=>{Bw();Bd=class t extends So{static{i(this,"CredentialsProviderError")}name="CredentialsProviderError";constructor(e,r=!0){super(e,r),Object.setPrototypeOf(this,t.prototype)}}});var zP,axe=g(()=>{Bw();zP=class t extends So{static{i(this,"TokenProviderError")}name="TokenProviderError";constructor(e,r=!0){super(e,r),Object.setPrototypeOf(this,t.prototype)}}});var VP,nJ=g(()=>{Bw();VP=i((...t)=>async()=>{if(t.length===0)throw new So("No providers in chain");let e;for(let r of t)try{return await r()}catch(n){if(e=n,n?.tryNextLink)continue;throw n}throw e},"chain")});var WP,sJ=g(()=>{WP=i(t=>()=>Promise.resolve(t),"fromValue")});var xg,YP=g(()=>{xg=i((t,e,r)=>{let n,s,o,a=!1,c=i(async()=>{s||(s=t());try{n=await s,o=!0,a=!1}finally{s=void 0}return n},"coalesceProvider");return e===void 0?async l=>((!o||l?.forceRefresh)&&(n=await c()),n):async l=>((!o||l?.forceRefresh)&&(n=await c()),a?n:r&&!r(n)?(a=!0,n):(e(n)&&await c(),n))},"memoize")});var cs,JP=g(()=>{cs=i((t,e,r)=>{if(e in t){if(t[e]==="true")return!0;if(t[e]==="false")return!1;throw new Error(`Cannot load ${r} "${e}". Expected "true" or "false", got ${t[e]}.`)}},"booleanSelector")});var cxe,lxe=g(()=>{cxe=i((t,e,r)=>{if(!(e in t))return;let n=parseInt(t[e],10);if(Number.isNaN(n))throw new TypeError(`Cannot load ${r} '${e}'. Expected number, got '${t[e]}'.`);return n},"numberSelector")});var fn,jP=g(()=>{(function(t){t.ENV="env",t.CONFIG="shared config entry"})(fn||(fn={}))});var uxe,dxe,oJ,eSt,Dc,bg=g(()=>{uxe=require("node:os"),dxe=require("node:path"),oJ={},eSt=i(()=>process&&process.geteuid?`${process.geteuid()}`:"DEFAULT","getHomeDirCacheKey"),Dc=i(()=>{let{HOME:t,USERPROFILE:e,HOMEPATH:r,HOMEDRIVE:n=`C:${dxe.sep}`}=process.env;if(t)return t;if(e)return e;if(r)return`${n}${r}`;let s=eSt();return oJ[s]||(oJ[s]=(0,uxe.homedir)()),oJ[s]},"getHomeDir")});var iJ,aJ,KP,cJ=g(()=>{iJ="AWS_PROFILE",aJ="default",KP=i(t=>t.profile||process.env[iJ]||aJ,"getProfileName")});var pxe,mxe,XP,lJ=g(()=>{pxe=require("node:crypto"),mxe=require("node:path");bg();XP=i(t=>{let r=(0,pxe.createHash)("sha1").update(t).digest("hex");return(0,mxe.join)(Dc(),".aws","sso","cache",`${r}.json`)},"getSSOTokenFilepath")});var fxe,Rw,Axe,uJ=g(()=>{fxe=require("node:fs/promises");lJ();Rw={},Axe=i(async t=>{if(Rw[t])return Rw[t];let e=XP(t),r=await(0,fxe.readFile)(e,"utf8");return JSON.parse(r)},"getSSOTokenFromFile")});var kc,hxe=g(()=>{kc="."});var dJ,gxe,yxe=g(()=>{dJ=R(xc()),gxe=i(t=>Object.entries(t).filter(([e])=>{let r=e.indexOf(".");return r===-1?!1:Object.values(dJ.IniSectionType).includes(e.substring(0,r))}).reduce((e,[r,n])=>{let s=r.indexOf("."),o=r.substring(0,s)===dJ.IniSectionType.PROFILE?r.substring(s+1):r;return e[o]=n,e},{...t.default&&{default:t.default}}),"getConfigData")});var Exe,tSt,ZP,pJ=g(()=>{Exe=require("node:path");bg();tSt="AWS_CONFIG_FILE",ZP=i(()=>process.env[tSt]||(0,Exe.join)(Dc(),".aws","config"),"getConfigFilepath")});var Cxe,rSt,Ixe,wxe=g(()=>{Cxe=require("node:path");bg();rSt="AWS_SHARED_CREDENTIALS_FILE",Ixe=i(()=>process.env[rSt]||(0,Cxe.join)(Dc(),".aws","credentials"),"getCredentialsFilepath")});var Sxe,nSt,sSt,Nw,mJ=g(()=>{Sxe=R(xc()),nSt=/^([\w-]+)\s(["'])?([\w-@+.%:/]+)\2$/,sSt=["__proto__","profile __proto__"],Nw=i(t=>{let e={},r,n;for(let s of t.split(/\r?\n/)){let o=s.split(/(^|\s)[;#]/)[0].trim();if(o[0]==="["&&o[o.length-1]==="]"){r=void 0,n=void 0;let c=o.substring(1,o.length-1),l=nSt.exec(c);if(l){let[,u,,d]=l;Object.values(Sxe.IniSectionType).includes(u)&&(r=[u,d].join("."))}else r=c;if(sSt.includes(c))throw new Error(`Found invalid profile name "${c}"`)}else if(r){let c=o.indexOf("=");if(![0,-1].includes(c)){let[l,u]=[o.substring(0,c).trim(),o.substring(c+1).trim()];if(u==="")n=l;else{n&&s.trimStart()===s&&(n=void 0),e[r]=e[r]||{};let d=n?[n,l].join("."):l;e[r][d]=u}}}}return e},"parseIni")});var xxe,fJ,Tw,jm,vw=g(()=>{xxe=require("node:fs/promises"),fJ={},Tw={},jm=i((t,e)=>Tw[t]!==void 0?Tw[t]:((!fJ[t]||e?.ignoreCache)&&(fJ[t]=(0,xxe.readFile)(t,"utf8")),fJ[t]),"readFile")});var A
Line truncated
|
|
|
|
|
`),c){let f=r(await l);d.enqueue(`${o}:${f}\r
|
|
|
|
|
`),d.enqueue(`\r
|
|
|
|
|
`)}d.close()}else d.enqueue(`${(n(p)||0).toString(16)}\r
|
|
|
|
|
${p}\r
|
|
|
|
|
`)}})},"getAwsChunkedEncodingStream")});function K0e(t,e){let r=t,n=t;if($r(n))return Y0e(n,e);let{base64Encoder:s,bodyLengthChecker:o,checksumAlgorithmFn:a,checksumLocationName:c,streamHasher:l}=e,u=s!==void 0&&a!==void 0&&c!==void 0&&l!==void 0,d=u?l(a,r):void 0,p=new j0e.Readable({read:i(()=>{},"read")});return r.on("data",m=>{let f=o(m)||0;f!==0&&(p.push(`${f.toString(16)}\r
|
|
|
|
|
`),p.push(m),p.push(`\r
|
|
|
|
|
`))}),r.on("end",async()=>{if(p.push(`0\r
|
|
|
|
|
`),u){let m=s(await d);p.push(`${c}:${m}\r
|
|
|
|
|
`),p.push(`\r
|
|
|
|
|
`)}p.push(null)}),p}var j0e,X0e=g(()=>{j0e=require("node:stream");J0e();ea();i(K0e,"getAwsChunkedEncodingStream")});async function Z0e(t,e){let r=0,n=[],s=t.getReader(),o=!1;for(;!o;){let{done:l,value:u}=await s.read();if(u&&(n.push(u),r+=u?.byteLength??0),r>=e)break;o=l}s.releaseLock();let a=new Uint8Array(Math.min(e,r)),c=0;for(let l of n){if(l.byteLength>a.byteLength-c){a.set(l.subarray(0,a.byteLength-c),c);break}else a.set(l,c);c+=l.length}return a}var eBe=g(()=>{i(Z0e,"headStream")});var tBe,rBe,a8,nBe=g(()=>{tBe=require("node:stream");bw();eBe();ea();rBe=i((t,e)=>$r(t)?Z0e(t,e):new Promise((r,n)=>{let s=new a8;s.limit=e,t.pipe(s),t.on("error",o=>{s.end(),n(o)}),s.on("error",n),s.on("finish",function(){let o=_c(this.buffers);r(o)})}),"headStream"),a8=class extends tBe.Writable{static{i(this,"Collector")}buffers=[];limit=1/0;bytesBuffered=0;_write(e,r,n){if(this.buffers.push(e),this.bytesBuffered+=e.byteLength??0,this.bytesBuffered>=this.limit){let s=this.bytesBuffered-this.limit,o=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=o.subarray(0,o.byteLength-s),this.emit("finish")}n()}}});var sBe,oBe=g(()=>{sBe=i(t=>{if(typeof t=="string")return t;if(typeof t!="object"||typeof t.byteOffset!="number"||typeof t.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(t)},"toUtf8")});async function c8(t){return t.arrayBuffer().then(e=>new Uint8Array(e))}async function l8(t){let e=[],r=t.getReader(),n=0;for(;;){let{done:s,value:o}=await r.read();if(o&&(e.push(o),n+=o.length),s)break}return _c(e,n)}var iBe,u8=g(()=>{bw();ea();iBe=i(async t=>Rd(t)?c8(t):l8(t),"streamCollector");i(c8,"collectBlob");i(l8,"collectReadableStream")});var aBe,lBe,cBe,uBe=g(()=>{n8();ZY();oBe();u8();ea();aBe="The stream has already been transformed.",lBe=i(t=>{if(!cBe(t)&&!$r(t)){let s=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${s}`)}let e=!1,r=i(async()=>{if(e)throw new Error(aBe);return e=!0,await iBe(t)},"transformToByteArray"),n=i(s=>{if(typeof s.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
|
|
|
|
|
If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return s.stream()},"blobToWebStream");return Object.assign(t,{transformToByteArray:r,transformToString:i(async s=>{let o=await r();if(s==="base64")return bQ(o);if(s==="hex")return ui(o);if(s===void 0||s==="utf8"||s==="utf-8")return sBe(o);if(typeof TextDecoder=="function")return new TextDecoder(s).decode(o);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},"transformToString"),transformToWebStream:i(()=>{if(e)throw new Error(aBe);if(e=!0,cBe(t))return n(t);if($r(t))return t;throw new Error(`Cannot transform payload to web stream, got ${t}`)},"transformToWebStream")})},"sdkStreamMixin"),cBe=i(t=>typeof Blob=="function"&&t instanceof Blob,"isBlobInstance")});var dBe,RQ,d8,p8=g(()=>{dBe=require("node:stream");bw();u8();ea();RQ=i(t=>Rd(t)?c8(t):$r(t)?l8(t):new Promise((e,r)=>{let n=new d8,s=t;s.pipe(n),s.on("error",o=>{n.end(),r(o)}),n.on("error",r),n.on("finish",function(){let o=_c(this.bufferedBytes);e(o)})}),"streamCollector"),d8=class extends dBe.Writable{static{i(this,"Collector")}bufferedBytes=[];_write(e,r,n){this.bufferedBytes.push(e),n()}}});var NQ,pBe,TQ,mBe=g(()=>{NQ=require("node:stream");xd();uBe();p8();pBe="The stream has already been transformed.",TQ=i(t=>{if(!(t instanceof NQ.Readable))try{return lBe(t)}catch{let s=t?.__proto__?.constructor?.name||t;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${s}`)}let e=!1,r=i(async()=>{if(e)throw new Error(pBe);return e=!0,await RQ(t)},"transformToByteArray");return Object.assign(t,{transformToByteArray:r,transformToString:i(async n=>{let s=await r();return n===void 0||Buffer.isEncoding(n)?Xi(s.buffer,s.byteOffset,s.byteLength).toString(n):new TextDecoder(n).decode(s)},"transformToString"),transformToWebStream:i(()=>{if(e)throw new Error(pBe);if(t.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof NQ.Readable.toWeb!="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return e=!0,NQ.Readable.toWeb(t)},"transformToWebStream")})},"sdkStreamMixin")});async function fBe(t){return typeof t.stream=="function"&&(t=t.stream()),t.tee()}var ABe=g(()=>{i(fBe,"splitStream")});async function hBe(t){if($r(t)||Rd(t))return fBe(t);let e=new m8.PassThrough,r=new m8.PassThrough;return t.pipe(e),t.pipe(r),[e,r]}var m8,gBe=g(()=>{m8=require("node:stream");ABe();ea();i(hBe,"splitStream")});var _g={};Dr(_g,{ChecksumStream:()=>Pg,Hash:()=>wQ,LazyJsonString:()=>Qn,NumericValue:()=>Ct,Uint8ArrayBlobAdapter:()=>Zm,_parseEpochTimestamp:()=>Jm,_parseRfc3339DateTimeWithOffset:()=>MP,_parseRfc7231DateTime:()=>FP,calculateBodyLength:()=>Qc,concatBytes:()=>_c,copyDocumentWithTransform:()=>DSe,createBufferedReadable:()=>V0e,createChecksumStream:()=>q0e,dateToUtcString:()=>Zi,deserializerMiddleware:()=>HP,deserializerMiddlewareOption:()=>ZJ,expectBoolean:()=>OSe,expectByte:()=>TP,expectFloat32:()=>ww,expectInt:()=>MSe,expectInt32:()=>RP,expectLong:()=>gg,expectNonNull:()=>FSe,expectNumber:()=>hg,expectObject:()=>$Y,expectShort:()=>NP,expectString:()=>USe,expectUnion:()=>PP,fromArrayBuffer:()=>Xi,fromBase64:()=>Sr,fromHex:()=>GP,fromString:()=>Sd,fromUtf8:()=>Hr,generateIdempotencyToken:()=>ta,getAwsChunkedEncodingStream:()=>K0e,getSerdePlugin:()=>R0e,handleFloat:()=>GSe,headStream:()=>rBe,isArrayBuffer:()=>xP,isBlob:()=>Rd,isReadableStream:()=>$r,limitedParseDouble:()=>_P,limitedParseFloat:()=>HSe,limitedParseFloat32:()=>$Se,logger:()=>yg,nv:()=>qP,parseBoolean:()=>LSe,parseEpochTimestamp:()=>LP,parseRfc3339DateTime:()=>YSe,parseRfc3339DateTimeWithOffset:()=>kP,parseRfc7231DateTime:()=>Ig,quoteHeader:()=>OP,sdkStreamMixin:()=>TQ,serializerMiddleware:()=>IQ,serializerMiddlewareOption:()=>e8,splitEvery:()=>UP,splitHeader:()=>wg,splitStream:()=>hBe,streamCollector:()=>RQ,strictParseByte:()=>DP,strictParseDouble:()=>Sw,strictParseFloat:()=>qSe,strictParseFloat32:()=>QP,strictParseInt:()=>VSe,strictParseInt32:()=>WSe,strictParseLong:()=>zY,strictParseShort:()=>bd,toBase64:()=>Jt,toHex:()=>ui,toUint8Array:()=>as,toUtf8:()=>xr,v4:()=>Qg});var yBe,Zm,xSt,Qg,ta,Pe=g(()=>{yBe=require("node:crypto");NSe();GY();vSe();bP();PSe();_Se();kSe();JSe();jSe();VY();KSe();exe();txe();rxe();sxe();ZY();ixe();eJ();bw();xd();qY();rJ();N0e();XJ();v0e();t8();G0e();W0e();X0e();nBe();mBe();gBe();ea();p8();Zm=class extends TSe(xr,Hr,Jt,Sr){static{i(this,"Uint8ArrayBlobAdapter")}},xSt=yBe.getRandomValues,Qg=QSe(xSt),ta=Qg});var us,vQ=g(()=>{Pe();us=i(async(t=new Uint8Array,e)=>{if(t instanceof Uint8Array)return Zm.mutate(t);if(!t)return Zm.mutate(new Uint8Array);let r=e.streamCollector(t);return Zm.mutate(await r)},"collectBody")});function ra(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}var PQ=g(()=>{i(ra,"extendedEncodeURIComponent"
Line truncated
|
|
|
|
|
`));return r(s)},"httpAuthSchemeMiddleware")});var d_,ia,HRe=g(()=>{u_();d_={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},ia=i((t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:i(n=>{n.addRelativeTo(sf(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),d_)},"applyToStack")}),"getHttpAuthSchemeEndpointRuleSetPlugin")});var p_,h5,$Re=g(()=>{u_();p_={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"serializerMiddleware"},h5=i((t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r})=>({applyToStack:i(n=>{n.addRelativeTo(sf(t,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:r}),p_)},"applyToStack")}),"getHttpAuthSchemePlugin")});var zRe=g(()=>{u_();HRe();$Re()});var cxt,lxt,Ww,g5=g(()=>{Re();Et();cxt=i(t=>e=>{throw e},"defaultErrorHandler"),lxt=i((t,e)=>{},"defaultSuccessHandler"),Ww=i(t=>(e,r)=>async n=>{if(!$e.isInstance(n.request))return e(n);let o=Bt(r).selectedHttpAuthScheme;if(!o)throw new Error("No HttpAuthScheme was selected: unable to sign request");let{httpAuthOption:{signingProperties:a={}},identity:c,signer:l}=o,u=await e({...n,request:await l.sign(n.request,c,a)}).catch((l.errorHandler||cxt)(a));return(l.successHandler||lxt)(u.response,a),u},"httpSigningMiddleware")});var m_,aa,VRe=g(()=>{g5();m_={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},aa=i(t=>({applyToStack:i(e=>{e.addRelativeTo(Ww(t),m_)},"applyToStack")}),"getHttpSigningPlugin")});var WRe=g(()=>{g5();VRe()});var ca,YRe=g(()=>{ca=i(t=>{if(typeof t=="function")return t;let e=Promise.resolve(t);return()=>e},"normalizeProvider")});function JRe(t,e,r,n,s){return i(async function*(a,c,...l){let u=c,d=a.startingToken??u[r],p=!0,m;for(;p;){if(u[r]=d,s&&(u[s]=u[s]??a.pageSize),a.client instanceof t)m=await uxt(e,a.client,c,a.withCommand,...l);else throw new Error(`Invalid client, expected instance of ${t.name}`);yield m;let f=d;d=dxt(m,n),p=!!(d&&(!a.stopOnSameToken||d!==f))}return void 0},"paginateOperation")}var uxt,dxt,jRe=g(()=>{uxt=i(async(t,e,r,n=o=>o,...s)=>{let o=new t(r);return o=n(o)??o,await e.send(o,...s)},"makePagedClientRequest");i(JRe,"createPaginator");dxt=i((t,e)=>{let r=t,n=e.split(".");for(let s of n){if(!r||typeof r!="object")return;r=r[s]}return r},"get")});function KRe(t,e,r){t.__smithy_context?t.__smithy_context.features||(t.__smithy_context.features={}):t.__smithy_context={features:{}},t.__smithy_context.features[e]=r}var XRe=g(()=>{i(KRe,"setFeature")});var To,ZRe=g(()=>{To=class{static{i(this,"DefaultIdentityProviderConfig")}authSchemes=new Map;constructor(e){for(let r in e){let n=e[r];n!==void 0&&this.authSchemes.set(r,n)}}getIdentityProvider(e){return this.authSchemes.get(e)}}});var y5,Kg,eNe=g(()=>{Re();y5=R(xc()),Kg=class{static{i(this,"HttpApiKeyAuthSigner")}async sign(e,r,n){if(!n)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!n.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!n.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!r.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");let s=$e.clone(e);if(n.in===y5.HttpApiKeyAuthLocation.QUERY)s.query[n.name]=r.apiKey;else if(n.in===y5.HttpApiKeyAuthLocation.HEADER)s.headers[n.name]=n.scheme?`${n.scheme} ${r.apiKey}`:r.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+n.in+"`");return s}}});var Xg,tNe=g(()=>{Re();Xg=class{static{i(this,"HttpBearerAuthSigner")}async sign(e,r,n){let s=$e.clone(e);if(!r.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return s.headers.Authorization=`Bearer ${r.token}`,s}}});var Dn,rNe=g(()=>{Dn=class{static{i(this,"NoAuthSigner")}async sign(e,r,n){return e}}});var nNe=g(()=>{eNe();tNe();rNe()});var f_,A_,Yw,Zg,Jw,sNe=g(()=>{f_=i(t=>i(function(r){return Zg(r)&&r.expiration.getTime()-Date.now()<t},"isIdentityExpired"),"createIsIdentityExpiredFunction"),A_=3e5,Yw=f_(A_),Zg=i(t=>t.expiration!==void 0,"doesIdentityRequireRefresh"),Jw=i((t,e,r)=>{if(t===void 0)return;let n=typeof t!="function"?async()=>Promise.resolve(t):t,s,o,a,c=!1,l=i(async u=>{o||(o=n(u));try{s=await o,a=!0,c=!1}finally{o=void 0}return s},"coalesceProvider");return e===void 0?async u=>((!a||u?.forceRefresh)&&(s=await l(u)),s):async u=>((!a||u?.forceRefresh)&&(s=await l(u)),c?s:r(s)?(e(s)&&await l(u),s):(c=!0,s))},"memoizeIdentityProvider")});var oNe=g(()=>{ZRe();nNe();sNe()});var E5={};Dr(E5,{DefaultIdenti
Line truncated
|
|
|
|
|
${this.getCanonicalPath(e)}
|
|
|
|
|
${SEe(e)}
|
|
|
|
|
${hTe(e)}
|
|
|
|
|
${s.map(o=>`${o}:${r[o]}`).join(`
|
|
|
|
|
`)}
|
|
|
|
|
|
|
|
|
|
${s.join(";")}
|
|
|
|
|
${n}`}async createStringToSign(e,r,n,s){let o=new this.sha256;o.update(nA.toUint8Array(n));let i=await o.digest();return`${s}
|
|
|
|
|
${n}`}async createStringToSign(e,r,n,s){let o=new this.sha256;o.update(nS(n));let a=await o.digest();return`${s}
|
|
|
|
|
${e}
|
|
|
|
|
${r}
|
|
|
|
|
${qu.toHex(i)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let r=[];for(let o of e.split("/"))o?.length!==0&&o!=="."&&(o===".."?r.pop():r.push(o));let n=`${e?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&e?.endsWith("/")?"/":""}`;return cT.escapeUri(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){let r=Iut(e).replace(/[\-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}},LV=class extends mT{headerFormatter=new vV;constructor({applyChecksum:e,credentials:r,region:n,service:s,sha256:o,uriEscapePath:i=!0}){super({applyChecksum:e,credentials:r,region:n,service:s,sha256:o,uriEscapePath:i})}async presign(e,r={}){let{signingDate:n=new Date,expiresIn:s=3600,unsignableHeaders:o,unhoistableHeaders:i,signableHeaders:a,hoistableHeaders:c,signingRegion:l,signingService:u}=r,d=await this.credentialProvider();this.validateResolvedCredentials(d);let p=l??await this.regionProvider(),{longDate:A,shortDate:g}=this.formatDate(n);if(s>bEe)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let E=dT(g,p,u??this.service),I=BEe(kV(e),{unhoistableHeaders:i,hoistableHeaders:c});d.sessionToken&&(I.query[MV]=d.sessionToken),I.query[cEe]=lT,I.query[lEe]=`${d.accessKeyId}/${E}`,I.query[OV]=A,I.query[dEe]=s.toString(10);let x=_V(I,o,a);return I.query[uEe]=this.getCanonicalHeaderList(x),I.query[FV]=await this.getSignature(A,E,this.getSigningKey(d,p,g,u),this.createCanonicalRequest(I,x,await pT(e,this.sha256))),I}async sign(e,r){return typeof e=="string"?this.signString(e,r):e.headers&&e.payload?this.signEvent(e,r):e.message?this.signMessage(e,r):this.signRequest(e,r)}async signEvent({headers:e,payload:r},{signingDate:n=new Date,priorSignature:s,signingRegion:o,signingService:i}){let a=o??await this.regionProvider(),{shortDate:c,longDate:l}=this.formatDate(n),u=dT(c,a,i??this.service),d=await pT({headers:{},body:r},this.sha256),p=new this.sha256;p.update(e);let A=qu.toHex(await p.digest()),g=[EEe,l,u,s,A,d].join(`
|
|
|
|
|
`);return this.signString(g,{signingDate:n,signingRegion:a,signingService:i})}async signMessage(e,{signingDate:r=new Date,signingRegion:n,signingService:s}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:r,signingRegion:n,signingService:s,priorSignature:e.priorSignature}).then(i=>({message:e.message,signature:i}))}async signString(e,{signingDate:r=new Date,signingRegion:n,signingService:s}={}){let o=await this.credentialProvider();this.validateResolvedCredentials(o);let i=n??await this.regionProvider(),{shortDate:a}=this.formatDate(r),c=new this.sha256(await this.getSigningKey(o,i,a,s));return c.update(nA.toUint8Array(e)),qu.toHex(await c.digest())}async signRequest(e,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:s,signingRegion:o,signingService:i}={}){let a=await this.credentialProvider();this.validateResolvedCredentials(a);let c=o??await this.regionProvider(),l=kV(e),{longDate:u,shortDate:d}=this.formatDate(r),p=dT(d,c,i??this.service);l.headers[qV]=u,a.sessionToken&&(l.headers[fEe]=a.sessionToken);let A=await pT(l,this.sha256);!wEe(AT,l.headers)&&this.applyChecksum&&(l.headers[AT]=A);let g=_V(l,s,n),E=await this.getSignature(u,p,this.getSigningKey(a,c,d,i),this.createCanonicalRequest(l,g,A));return l.headers[UV]=`${lT} Credential=${a.accessKeyId}/${p}, SignedHeaders=${this.getCanonicalHeaderList(g)}, Signature=${E}`,l}async getSignature(e,r,n,s){let o=await this.createStringToSign(e,r,s,lT),i=new this.sha256(await n);return i.update(nA.toUint8Array(o)),qu.toHex(await i.digest())}getSigningKey(e,r,n,s){return xEe(this.sha256,e,n,r,s||this.service)}},xut={SignatureV4a:null};et.ALGORITHM_IDENTIFIER=lT;et.ALGORITHM_IDENTIFIER_V4A=yut;et.ALGORITHM_QUERY_PARAM=cEe;et.ALWAYS_UNSIGNABLE_HEADERS=gEe;et.AMZ_DATE_HEADER=qV;et.AMZ_DATE_QUERY_PARAM=OV;et.AUTH_HEADER=UV;et.CREDENTIAL_QUERY_PARAM=lEe;et.DATE_HEADER=pEe;et.EVENT_ALGORITHM_IDENTIFIER=EEe;et.EXPIRES_QUERY_PARAM=dEe;et.GENERATED_HEADERS=AEe;et.HOST_HEADER=gut;et.KEY_TYPE_IDENTIFIER=$V;et.MAX_CACHE_SIZE=IEe;et.MAX_PRESIGNED_TTL=bEe;et.PROXY_HEADER_PATTERN=hEe;et.REGION_SET_PARAM=fut;et.SEC_HEADER_PATTERN=yEe;et.SHA256_HEADER=AT;et.SIGNATURE_HEADER=mEe;et.SIGNATURE_QUERY_PARAM=FV;et.SIGNED_HEADERS_QUERY_PARAM=uEe;et.SignatureV4=LV;et.SignatureV4Base=mT;et.TOKEN_HEADER=fEe;et.TOKEN_QUERY_PARAM=MV;et.UNSIGNABLE_PATTERNS=hut;et.UNSIGNED_PAYLOAD=CEe;et.clearCredentialCache=Eut;et.createScope=dT;et.getCanonicalHeaders=_V;et.getCanonicalQuery=SEe;et.getPayloadHash=pT;et.getSigningKey=xEe;et.hasHeader=wEe;et.moveHeadersToQuery=BEe;et.prepareRequest=kV;et.signatureV4aContainer=xut});function But(t,{credentials:e,credentialDefaultProvider:r}){let n;return e?e?.memoized?n=e:n=Dz(e,vz,$N):r?n=_u(r(Object.assign({},t,{parentClientConfig:t}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function Sut(t,e){if(e.configBound)return e;let r=async n=>e({...n,callerClientConfig:t});return r.memoized=e.memoized,r.configBound=!0,r}var GV,ic,wut,NEe=_(()=>{mn();Un();GV=S(REe()),ic=t=>{let e=t.credentials,r=!!t.credentials,n;Object.defineProperty(t,"credentials",{set(l){l&&l!==e&&l!==n&&(r=!0),e=l;let u=But(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),d=Sut(t,u);if(r&&!d.attributed){let p=typeof e=="object"&&e!==null;n=async A=>{let E=await d(A);return p&&(!E.$source||Object.keys(E.$source).length===0)?Kp(E,"CREDENTIALS_CODE","e"):E},n.memoized=d.memoized,n.configBound=d.configBound,n.attributed=!0}else n=d},get(){return n},enumerable:!0,configurable:!0}),t.credentials=e;let{signingEscapePath:s=!0,systemClockOffset:o=t.systemClockOffset||0,sha256:i}=t,a;return t.signer?a=_u(t.signer):t.regionInfoProvider?a=()=>_u(t.region)().then(async l=>[await t.regionInfoProvider(l,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},l]).then(([l,u])=>{let{signingRegion:d,signingService:p}=l;t.signingRegion=t.signingRegion||d||u,t.signingName=t.signingName||p||t.serviceId;let A={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:i,uriEscapePath:s},g=t.signerConstructor||GV.SignatureV4;return new g(A)}):a=async l=>{l=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await _u(t.region)(),properties:{}},l);let u=l.signingRegion,d=l.signingName;t.signingRegion=t.signingRegion||u,t.signingName=t.signingName||d||t.serviceId;let p={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:i,uriEscapePath:s},A=t.signerConstructor||GV.SignatureV4;return new A(p)},Object.assign(t,{systemClockOffset:o,signingEscapePath:s,signer:a})},wut=ic});var TEe=_(()=>{RV();Xye();rEe();nEe();NEe()});var $u={};hn($u,{AWSSDKSigV4Signer:()=>Jye,AwsSdkSigV4ASigner:()=>aT,AwsSdkSigV4Signer:()=>In,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:()=>gl,NODE_SIGV4A
Line truncated
|
|
|
|
|
For more information, please visit: `+rdt);let s=t.originalExpiration??t.expiration;return{...t,...s?{originalExpiration:s}:{},expiration:n}},ndt=(t,e={})=>{let r=e?.logger||console,n;return async()=>{let s;try{s=await t(),s.expiration&&s.expiration.getTime()<Date.now()&&(s=OEe(s,r))}catch(o){if(n)r.warn("Credential renew failed: ",o),s=OEe(n,r);else throw o}return n=s,s}},zEe="/latest/meta-data/iam/security-credentials/",sdt="/latest/api/token",YV="AWS_EC2_METADATA_V1_DISABLED",FEe="ec2_metadata_v1_disabled",MEe="x-aws-ec2-metadata-token",odt=(t={})=>ndt(idt(t),{logger:t.logger}),idt=(t={})=>{let e=!1,{logger:r,profile:n}=t,{timeout:s,maxRetries:o}=XV(t),i=async(a,c)=>{if(e||c.headers?.[MEe]==null){let d=!1,p=!1,A=await KV.loadConfig({environmentVariableSelector:g=>{let E=g[YV];if(p=!!E&&E!=="false",E===void 0)throw new ac.CredentialsProviderError(`${YV} not set in env, checking config file next.`,{logger:t.logger});return p},configFileSelector:g=>{let E=g[FEe];return d=!!E&&E!=="false",d},default:!1},{profile:n})();if(t.ec2MetadataV1Disabled||A){let g=[];throw t.ec2MetadataV1Disabled&&g.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),d&&g.push(`config file profile (${FEe})`),p&&g.push(`process environment variable (${YV})`),new JV(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${g.join(", ")}].`)}}let u=(await jV(async()=>{let d;try{d=await cdt(c)}catch(p){throw p.statusCode===401&&(e=!1),p}return d},a)).trim();return jV(async()=>{let d;try{d=await ldt(u,c,t)}catch(p){throw p.statusCode===401&&(e=!1),p}return d},a)};return async()=>{let a=await HEe();if(e)return r?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),i(o,{...a,timeout:s});{let c;try{c=(await adt({...a,timeout:s})).toString()}catch(l){if(l?.statusCode===400)throw Object.assign(l,{message:"EC2 Metadata token request returned error"});return(l.message==="TimeoutError"||[403,404,405].includes(l.statusCode))&&(e=!0),r?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),i(o,{...a,timeout:s})}return i(o,{...a,headers:{[MEe]:c},timeout:s})}}},adt=async t=>vC({...t,path:sdt,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),cdt=async t=>(await vC({...t,path:zEe})).toString(),ldt=async(t,e,r)=>{let n=JSON.parse((await vC({...e,path:zEe+t})).toString());if(!UEe(n))throw new ac.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:r.logger});return qEe(n)};zn.DEFAULT_MAX_RETRIES=GEe;zn.DEFAULT_TIMEOUT=$Ee;zn.ENV_CMDS_AUTH_TOKEN=WV;zn.ENV_CMDS_FULL_URI=fT;zn.ENV_CMDS_RELATIVE_URI=gT;zn.fromContainerMetadata=Uut;zn.fromInstanceMetadata=odt;zn.getInstanceMetadataEndpoint=HEe;zn.httpRequest=vC;zn.providerConfigFromInit=XV});var VEe=C(hT=>{"use strict";Object.defineProperty(hT,"__esModule",{value:!0});hT.checkUrl=void 0;var udt=Hn(),ddt="169.254.170.2",pdt="169.254.170.23",Adt="[fd00:ec2::23]",mdt=(t,e)=>{if(t.protocol!=="https:"&&!(t.hostname===ddt||t.hostname===pdt||t.hostname===Adt)){if(t.hostname.includes("[")){if(t.hostname==="[::1]"||t.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(t.hostname==="localhost")return;let r=t.hostname.split("."),n=s=>{let o=parseInt(s,10);return 0<=o&&o<=255};if(r[0]==="127"&&n(r[1])&&n(r[2])&&n(r[3])&&r.length===4)return}throw new udt.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
|
|
|
|
|
${af(a)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){let r=[];for(let o of e.split("/"))o?.length!==0&&o!=="."&&(o===".."?r.pop():r.push(o));let n=`${e?.startsWith("/")?"/":""}${r.join("/")}${r.length>0&&e?.endsWith("/")?"/":""}`;return N_(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){let r=wxt(e).replace(/[-:]/g,"");return{longDate:r,shortDate:r.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}},ty={},v_=[],P_=i((t,e,r)=>`${t}/${e}/${r}/${Z5}`,"createScope"),gTe=i(async(t,e,r,n,s)=>{let o=await ZNe(t,e.secretAccessKey,e.accessKeyId),a=`${r}:${n}:${s}:${af(o)}:${e.sessionToken}`;if(a in ty)return ty[a];for(v_.push(a);v_.length>fTe;)delete ty[v_.shift()];let c=`AWS4${e.secretAccessKey}`;for(let l of[r,n,s,Z5])c=await ZNe(t,c,l);return ty[a]=c},"getSigningKey"),xxt=i(()=>{v_.length=0,Object.keys(ty).forEach(t=>{delete ty[t]})},"clearCredentialCache"),ZNe=i((t,e,r)=>{let n=new t(e);return n.update(nS(r)),n.digest()},"hmac"),z5=i(({headers:t},e,r)=>{let n={};for(let s of Object.keys(t).sort()){if(t[s]==null)continue;let o=s.toLowerCase();(o in lTe||e?.has(o)||uTe.test(o)||dTe.test(o))&&(!r||r&&!r.has(o))||(n[o]=t[s].trim().replace(/\s+/g," "))}return n},"getCanonicalHeaders"),Q_=i(async({headers:t,body:e},r)=>{for(let n of Object.keys(t))if(n.toLowerCase()===__)return t[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||hxt(e)){let n=new r;return n.update(nS(e)),af(await n.digest())}return mTe},"getPayloadHash"),yTe=i((t,e)=>{t=t.toLowerCase();for(let r of Object.keys(e))if(t===r.toLowerCase())return!0;return!1},"hasHeader"),ETe=i((t,e={})=>{let{headers:r,query:n={}}=eTe.clone(t);for(let s of Object.keys(r)){let o=s.toLowerCase();(o.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(o)||e.hoistableHeaders?.has(o))&&(n[s]=r[s],delete r[s])}return{...t,headers:r,query:n}},"moveHeadersToQuery"),V5=i(t=>{t=eTe.clone(t);for(let e of Object.keys(t.headers))iTe.indexOf(e.toLowerCase())>-1&&delete t.headers[e];return t},"prepareRequest"),W5=class extends D_{static{i(this,"SignatureV4")}headerFormatter=new H5;constructor({applyChecksum:e,credentials:r,region:n,service:s,sha256:o,uriEscapePath:a=!0}){super({applyChecksum:e,credentials:r,region:n,service:s,sha256:o,uriEscapePath:a})}async presign(e,r={}){let{signingDate:n=new Date,expiresIn:s=3600,unsignableHeaders:o,unhoistableHeaders:a,signableHeaders:c,hoistableHeaders:l,signingRegion:u,signingService:d}=r,p=await this.credentialProvider();this.validateResolvedCredentials(p);let m=u??await this.regionProvider(),{longDate:f,shortDate:A}=this.formatDate(n);if(s>ATe)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");let h=P_(A,m,d??this.service),E=ETe(V5(e),{unhoistableHeaders:a,hoistableHeaders:l});p.sessionToken&&(E.query[j5]=p.sessionToken),E.query[tTe]=T_,E.query[rTe]=`${p.accessKeyId}/${h}`,E.query[Y5]=f,E.query[sTe]=s.toString(10);let C=z5(E,o,c);return E.query[nTe]=this.getCanonicalHeaderList(C),E.query[J5]=await this.getSignature(f,h,this.getSigningKey(p,m,A,d),this.createCanonicalRequest(E,C,await Q_(e,this.sha256))),E}async sign(e,r){return typeof e=="string"?this.signString(e,r):e.headers&&e.payload?this.signEvent(e,r):e.message?this.signMessage(e,r):this.signRequest(e,r)}async signEvent({headers:e,payload:r},{signingDate:n=new Date,priorSignature:s,signingRegion:o,signingService:a,eventStreamCredentials:c}){let l=o??await this.regionProvider(),{shortDate:u,longDate:d}=this.formatDate(n),p=P_(u,l,a??this.service),m=await Q_({headers:{},body:r},this.sha256),f=new this.sha256;f.update(e);let A=af(await f.digest()),h=[pTe,d,p,s,A,m].join(`
|
|
|
|
|
`);return this.signString(h,{signingDate:n,signingRegion:l,signingService:a,eventStreamCredentials:c})}async signMessage(e,{signingDate:r=new Date,signingRegion:n,signingService:s,eventStreamCredentials:o}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:r,signingRegion:n,signingService:s,priorSignature:e.priorSignature,eventStreamCredentials:o}).then(c=>({message:e.message,signature:c}))}async signString(e,{signingDate:r=new Date,signingRegion:n,signingService:s,eventStreamCredentials:o}={}){let a=o??await this.credentialProvider();this.validateResolvedCredentials(a);let c=n??await this.regionProvider(),{shortDate:l}=this.formatDate(r),u=new this.sha256(await this.getSigningKey(a,c,l,s));return u.update(nS(e)),af(await u.digest())}async signRequest(e,{signingDate:r=new Date,signableHeaders:n,unsignableHeaders:s,signingRegion:o,signingService:a}={}){let c=await this.credentialProvider();this.validateResolvedCredentials(c);let l=o??await this.regionProvider(),u=V5(e),{longDate:d,shortDate:p}=this.formatDate(r),m=P_(p,l,a??this.service);u.headers[X5]=d,c.sessionToken&&(u.headers[cTe]=c.sessionToken);let f=await Q_(u,this.sha256);!yTe(__,u.headers)&&this.applyChecksum&&(u.headers[__]=f);let A=z5(u,s,n),h=await this.getSignature(d,m,this.getSigningKey(c,l,p,a),this.createCanonicalRequest(u,A,f));return u.headers[K5]=`${T_} Credential=${c.accessKeyId}/${m}, SignedHeaders=${this.getCanonicalHeaderList(A)}, Signature=${h}`,u}async getSignature(e,r,n,s){let o=await this.createStringToSign(e,r,s,T_),a=new this.sha256(await n);return a.update(nS(o)),af(await a.digest())}getSigningKey(e,r,n,s){return gTe(this.sha256,e,n,r,s||this.service)}},bxt={SignatureV4a:null};Ge.ALGORITHM_IDENTIFIER=T_;Ge.ALGORITHM_IDENTIFIER_V4A=Ixt;Ge.ALGORITHM_QUERY_PARAM=tTe;Ge.ALWAYS_UNSIGNABLE_HEADERS=lTe;Ge.AMZ_DATE_HEADER=X5;Ge.AMZ_DATE_QUERY_PARAM=Y5;Ge.AUTH_HEADER=K5;Ge.CREDENTIAL_QUERY_PARAM=rTe;Ge.DATE_HEADER=oTe;Ge.EVENT_ALGORITHM_IDENTIFIER=pTe;Ge.EXPIRES_QUERY_PARAM=sTe;Ge.GENERATED_HEADERS=iTe;Ge.HOST_HEADER=Ext;Ge.KEY_TYPE_IDENTIFIER=Z5;Ge.MAX_CACHE_SIZE=fTe;Ge.MAX_PRESIGNED_TTL=ATe;Ge.PROXY_HEADER_PATTERN=uTe;Ge.REGION_SET_PARAM=yxt;Ge.SEC_HEADER_PATTERN=dTe;Ge.SHA256_HEADER=__;Ge.SIGNATURE_HEADER=aTe;Ge.SIGNATURE_QUERY_PARAM=J5;Ge.SIGNED_HEADERS_QUERY_PARAM=nTe;Ge.SignatureV4=W5;Ge.SignatureV4Base=D_;Ge.TOKEN_HEADER=cTe;Ge.TOKEN_QUERY_PARAM=j5;Ge.UNSIGNABLE_PATTERNS=Cxt;Ge.UNSIGNED_PAYLOAD=mTe;Ge.clearCredentialCache=xxt;Ge.createScope=P_;Ge.getCanonicalHeaders=z5;Ge.getCanonicalQuery=hTe;Ge.getPayloadHash=Q_;Ge.getSigningKey=gTe;Ge.hasHeader=yTe;Ge.moveHeadersToQuery=ETe;Ge.prepareRequest=V5;Ge.signatureV4aContainer=bxt});function Bxt(t,{credentials:e,credentialDefaultProvider:r}){let n;return e?e?.memoized?n=e:n=Jw(e,Yw,Zg):r?n=ca(r(Object.assign({},t,{parentClientConfig:t}))):n=i(async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},"credentialsProvider"),n.memoized=!0,n}function Rxt(t,e){if(e.configBound)return e;let r=i(async n=>e({...n,callerClientConfig:t}),"fn");return r.memoized=e.memoized,r.configBound=!0,r}var tj,hi,rj,CTe=g(()=>{pt();ds();tj=R(ej()),hi=i(t=>{let e=t.credentials,r=!!t.credentials,n;Object.defineProperty(t,"credentials",{set(u){u&&u!==e&&u!==n&&(r=!0),e=u;let d=Bxt(t,{credentials:e,credentialDefaultProvider:t.credentialDefaultProvider}),p=Rxt(t,d);if(r&&!p.attributed){let m=typeof e=="object"&&e!==null;n=i(async f=>{let h=await p(f);return m&&(!h.$source||Object.keys(h.$source).length===0)?Ed(h,"CREDENTIALS_CODE","e"):h},"resolvedCredentials"),n.memoized=p.memoized,n.configBound=p.configBound,n.attributed=!0}else n=p},get(){return n},enumerable:!0,configurable:!0}),t.credentials=e;let{signingEscapePath:s=!0,systemClockOffset:o=t.systemClockOffset||0,sha256:a}=t,c;return t.signer?c=ca(t.signer):t.regionInfoProvider?c=i(()=>ca(t.region)().then(async u=>[await t.regionInfoProvider(u,{useFipsEndpoint:await t.useFipsEndpoint(),useDualstackEndpoint:await t.useDualstackEndpoint()})||{},u]).then(([u,d])=>{let{signingRegion:p,signingService:m}=u;t.signingRegion=t.signingRegion||p||d,t.signingName=t.signingName||m||t.serviceId;let f={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:a,uriEscapePath:s},A=t.signerConstructor||tj.SignatureV4;return new A(f)}),"signer"):c=i(async u=>{u=Object.assign({},{name:"sigv4",signingName:t.signingName||t.defaultSigningName,signingRegion:await ca(t.region)(),properties:{}},u);let d=u.signingRegion,p=u.signingName;t.signingRegion=t.signingRegion||d,t.signingName=t.signingName||p||t.serviceId;let m={...t,credentials:t.credentials,region:t.signingRegion,service:t.signingName,sha256:a,uriEscapePath:s},f=t.signerConstructor||tj.SignatureV4;return new f(m)},"signer"),Object.assign(t,{systemClockOffset:o,signingEscapePath:s,signer:c})},"resolveAwsSdkSigV4Config"),rj=hi;i(Bxt,"normalizeCreden
Line truncated
|
|
|
|
|
For more information, please visit: `+Jxt);let s=t.originalExpiration??t.expiration;return{...t,...s?{originalExpiration:s}:{},expiration:n}},"getExtendedInstanceMetadataCredentials"),jxt=i((t,e={})=>{let r=e?.logger||console,n;return async()=>{let s;try{s=await t(),s.expiration&&s.expiration.getTime()<Date.now()&&(s=NTe(s,r))}catch(o){if(n)r.warn("Credential renew failed: ",o),s=NTe(n,r);else throw o}return n=s,s}},"staticStabilityProvider"),LTe="/latest/meta-data/iam/security-credentials/",Kxt="/latest/api/token",oj="AWS_EC2_METADATA_V1_DISABLED",TTe="ec2_metadata_v1_disabled",vTe="x-aws-ec2-metadata-token",Xxt=i((t={})=>jxt(Zxt(t),{logger:t.logger}),"fromInstanceMetadata"),Zxt=i((t={})=>{let e=!1,{logger:r,profile:n}=t,{timeout:s,maxRetries:o}=uj(t),a=i(async(c,l)=>{if(e||l.headers?.[vTe]==null){let p=!1,m=!1,f=await lj({environmentVariableSelector:i(A=>{let h=A[oj];if(m=!!h&&h!=="false",h===void 0)throw new $d(`${oj} not set in env, checking config file next.`,{logger:t.logger});return m},"environmentVariableSelector"),configFileSelector:i(A=>{let h=A[TTe];return p=!!h&&h!=="false",p},"configFileSelector"),default:!1},{profile:n})();if(t.ec2MetadataV1Disabled||f){let A=[];throw t.ec2MetadataV1Disabled&&A.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),p&&A.push(`config file profile (${TTe})`),m&&A.push(`process environment variable (${oj})`),new cj(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${A.join(", ")}].`)}}let d=(await ij(async()=>{let p;try{p=await tbt(l)}catch(m){throw m.statusCode===401&&(e=!1),m}return p},c)).trim();return ij(async()=>{let p;try{p=await rbt(d,l,t)}catch(m){throw m.statusCode===401&&(e=!1),m}return p},c)},"getCredentials");return async()=>{let c=await kTe();if(e)return r?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),a(o,{...c,timeout:s});{let l;try{l=(await ebt({...c,timeout:s})).toString()}catch(u){if(u?.statusCode===400)throw Object.assign(u,{message:"EC2 Metadata token request returned error"});return(u.message==="TimeoutError"||[403,404,405].includes(u.statusCode))&&(e=!0),r?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),a(o,{...c,timeout:s})}return a(o,{...c,headers:{[vTe]:l},timeout:s})}}},"getInstanceMetadataProvider"),ebt=i(async t=>iS({...t,path:Kxt,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),"getMetadataToken"),tbt=i(async t=>(await iS({...t,path:LTe})).toString(),"getProfile"),rbt=i(async(t,e,r)=>{let n=JSON.parse((await iS({...e,path:LTe+t})).toString());if(!PTe(n))throw new $d("Invalid response received from instance metadata service.",{logger:r.logger});return QTe(n)},"getCredentialsFromProfile");gi.DEFAULT_MAX_RETRIES=DTe;gi.DEFAULT_TIMEOUT=_Te;gi.ENV_CMDS_AUTH_TOKEN=aj;gi.ENV_CMDS_FULL_URI=sS;gi.ENV_CMDS_RELATIVE_URI=L_;gi.Endpoint=oS;gi.fromContainerMetadata=_xt;gi.fromInstanceMetadata=Xxt;gi.getInstanceMetadataEndpoint=kTe;gi.httpRequest=iS;gi.providerConfigFromInit=uj});var lu=I(cS=>{var{buildQueryString:GTe,HttpResponse:HTe}=(Re(),ee(Od)),M_=require("node:https"),{Readable:nbt}=require("node:stream"),dj=require("node:http2"),{streamCollector:sbt}=(Pe(),ee(_g));cS.streamCollector=sbt;function U_(t){let e=t&&typeof t=="object"&&"reason"in t?t.reason:void 0;if(e){if(e instanceof Error){let s=new Error("Request aborted");return s.name="AbortError",s.cause=e,s}let n=new Error(String(e));return n.name="AbortError",n}let r=new Error("Request aborted");return r.name="AbortError",r}i(U_,"buildAbortError");var obt=["ECONNRESET","EPIPE","ETIMEDOUT"],$Te=i(t=>{let e={};for(let r in t){let n=t[r];e[r]=Array.isArray(n)?n.join(","):n}return e},"getTransformedHeaders"),gn={setTimeout:i((t,e)=>setTimeout(t,e),"setTimeout"),clearTimeout:i(t=>clearTimeout(t),"clearTimeout")},OTe=1e3,ibt=i((t,e,r=0)=>{if(!r)return-1;let n=i(s=>{let o=gn.setTimeout(()=>{t.destroy(),e(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${r} ms.`),{name:"TimeoutError"}))},r-s),a=i(c=>{c?.connecting?c.on("connect",()=>{gn.clearTimeout(o)}):gn.clearTimeout(o)},"doWithSocket");t.socket?a(t.socket):t.on("socket",a)},"registerTimeout");return r<2e3?(n(0),0):gn.setTimeout(n.bind(null,OTe),OTe)},"setConnectionTimeout"),abt=i((t,e,r=0,n,s)=>r?gn.setTimeout(()=>{let o=`@smithy/node-http-handler - [${n?"ERROR":"WARN"}] a request has exceeded the configured ${r} ms requestTimeout.`;if(n){let a=Object.assign(new Error(o),{name:"TimeoutError",code:"ETIMEDOUT"});t.destroy(a),e(a)}else o+=" Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.",s?.warn?.(o)},r):-1,"setRequestTimeout"),cbt=3e3,lbt=i((t,{keepAlive:e,keepAliveMsecs:r},n=cbt)=>{if(e!==!0)return-1;let s=i(()=>{t.socket?t.socket.setKeepAlive(e,r||0):t.on("socket",o=>{o.setKeepAlive(e,r||0)})},"registerListener");return n===0?(s(),0):gn.setTimeout(s,n)},"setSocketKeepA
Line truncated
|
|
|
|
|
See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
|
|
|
|
|
or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return r}constructor(e){this.configProvider=new Promise((r,n)=>{typeof e=="function"?e().then(s=>{r(this.resolveDefaultConfig(s))}).catch(n):r(this.resolveDefaultConfig(e))})}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:r,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);let s=this.config,o=e.protocol==="https:";return!o&&!this.config.httpAgent&&(this.config.httpAgent=await this.config.httpAgentProvider()),new Promise((a,c)=>{let l,u=-1,d=-1,p=-1,m=-1,f=-1,A=i(()=>{gn.clearTimeout(u),gn.clearTimeout(d),gn.clearTimeout(p),gn.clearTimeout(m),gn.clearTimeout(f)},"clearTimeouts"),h=i(async K=>{await l,A(),a(K)},"resolve"),E=i(async K=>{await l,A(),c(K)},"reject");if(r?.aborted){let K=U_(r);E(K);return}let C=e.headers,w=C?(C.Expect??C.expect)==="100-continue":!1,x=o?s.httpsAgent:s.httpAgent;w&&!this.externalAgent&&(x=new(o?M_.Agent:F_)({keepAlive:!1,maxSockets:1/0})),u=gn.setTimeout(()=>{this.socketWarningTimestamp=t.checkSocketUsage(x,this.socketWarningTimestamp,s.logger)},s.socketAcquisitionWarningTimeout??(s.requestTimeout??2e3)+(s.connectionTimeout??1e3));let b=e.query?GTe(e.query):"",N;if(e.username!=null||e.password!=null){let K=e.username??"",U=e.password??"";N=`${K}:${U}`}let P=e.path;b&&(P+=`?${b}`),e.fragment&&(P+=`#${e.fragment}`);let _=e.hostname??"";_[0]==="["&&_.endsWith("]")?_=e.hostname.slice(1,-1):_=e.hostname;let re={headers:e.headers,host:_,method:e.method,path:P,port:e.port,agent:x,auth:N},ae=(o?M_.request:UTe)(re,K=>{let U=new HTe({statusCode:K.statusCode||-1,reason:K.statusMessage,headers:$Te(K.headers),body:K});h({response:U})});if(ae.on("error",K=>{obt.includes(K.code)?E(Object.assign(K,{name:"TimeoutError"})):E(K)}),r){let K=i(()=>{ae.destroy();let U=U_(r);E(U)},"onAbort");if(typeof r.addEventListener=="function"){let U=r;U.addEventListener("abort",K,{once:!0}),ae.once("close",()=>U.removeEventListener("abort",K))}else r.onabort=K}let qe=n??s.requestTimeout;d=ibt(ae,E,s.connectionTimeout),p=abt(ae,E,qe,s.throwOnRequestTimeout,s.logger??console),m=ubt(ae,E,s.socketTimeout);let ne=re.agent;typeof ne=="object"&&"keepAlive"in ne&&(f=lbt(ae,{keepAlive:ne.keepAlive,keepAliveMsecs:ne.keepAliveMsecs})),l=zTe(ae,e,qe,this.externalAgent).catch(K=>(A(),c(K)))})}updateHttpClientConfig(e,r){this.config=void 0,this.configProvider=this.configProvider.then(n=>({...n,[e]:r}))}httpHandlerConfigs(){return this.config??{}}resolveDefaultConfig(e){let{requestTimeout:r,connectionTimeout:n,socketTimeout:s,socketAcquisitionWarningTimeout:o,httpAgent:a,httpsAgent:c,throwOnRequestTimeout:l,logger:u}=e||{},d=!0,p=50;return{connectionTimeout:n,requestTimeout:r,socketTimeout:s,socketAcquisitionWarningTimeout:o,throwOnRequestTimeout:l,httpAgentProvider:i(async()=>{let m=require("node:http"),{Agent:f,request:A}=m.default??m;return UTe=A,F_=f,a instanceof F_||typeof a?.destroy=="function"?(this.externalAgent=!0,a):new F_({keepAlive:d,maxSockets:p,...a})},"httpAgentProvider"),httpsAgent:c instanceof M_.Agent||typeof c?.destroy=="function"?(this.externalAgent=!0,c):new M_.Agent({keepAlive:d,maxSockets:p,...c}),logger:u}}},mbt=new Uint16Array(1),aS=class{static{i(this,"ClientHttp2SessionRef")}id=mbt[0]++;total=0;max=0;session;refs=0;constructor(e){e.unref(),this.session=e}retain(){if(this.session.destroyed)throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");this.refs+=1,this.total+=1,this.max=Math.max(this.refs,this.max),this.session.ref()}free(){if(!this.session.destroyed&&(this.refs-=1,this.refs===0&&this.session.unref(),this.refs<0))throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.")}deref(){return this.session}close(){this.session.closed||this.session.close()}destroy(){this.refs=0,this.session.destroyed||this.session.destroy()}useCount(){return this.refs}},mj=class{static{i(this,"NodeHttp2ConnectionPool")}sessions=[];maxConcurrency=0;constructor(e){this.sessions=(e??[]).map(r=>new aS(r))}poll(){let e=!1;for(let r of this.sessions){if(r.deref().destroyed){e=!0;continue}if(!this.maxConcurrency||r.useCount()<this.maxConcurrency)return r}if(e)for(let r of this.sessions)r.deref().destroyed&&this.remove(r)}offerLast(e){this.sessions.push(e)}remove(e){let r=this.sessions.indexOf(e);r>-1&&this.sessions.splice(r,1)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}setMaxConcurrency(e){this.maxConcurrency=e}destroy(e){this.remove(e),e.destroy()}},fj=class{static{i(this,"NodeHttp2ConnectionManager")}config;connectOptions;connectionPools=new Map;constructor(e){if(this.config=e,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(e,r){let n=this.getUrlString(e),s=this.getPool(n);if(!this.config.disableConcurrency&&!r.isEventStream){let u=s.poll();if(u)return u.retain(),u}let
Line truncated
|
|
|
|
|
- loopback CIDR 127.0.0.0/8 or [::1/128]
|
|
|
|
|
- ECS container host 169.254.170.2
|
|
|
|
|
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:e})}};hT.checkUrl=mdt});var YEe=C(yT=>{"use strict";Object.defineProperty(yT,"__esModule",{value:!0});yT.createGetRequest=ydt;yT.getCredentials=Edt;var ZV=Hn(),fdt=St(),gdt=_e(),hdt=hN();function ydt(t){return new fdt.HttpRequest({protocol:t.protocol,hostname:t.hostname,port:Number(t.port),path:t.pathname,query:Array.from(t.searchParams.entries()).reduce((e,[r,n])=>(e[r]=n,e),{}),fragment:t.hash})}async function Edt(t,e){let n=await(0,hdt.sdkStreamMixin)(t.body).transformToString();if(t.statusCode===200){let s=JSON.parse(n);if(typeof s.AccessKeyId!="string"||typeof s.SecretAccessKey!="string"||typeof s.Token!="string"||typeof s.Expiration!="string")throw new ZV.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:e});return{accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.Token,expiration:(0,gdt.parseRfc3339DateTime)(s.Expiration)}}if(t.statusCode>=400&&t.statusCode<500){let s={};try{s=JSON.parse(n)}catch{}throw Object.assign(new ZV.CredentialsProviderError(`Server responded with status: ${t.statusCode}`,{logger:e}),{Code:s.Code,Message:s.Message})}throw new ZV.CredentialsProviderError(`Server responded with status: ${t.statusCode}`,{logger:e})}});var jEe=C(ET=>{"use strict";Object.defineProperty(ET,"__esModule",{value:!0});ET.retryWrapper=void 0;var Cdt=(t,e,r)=>async()=>{for(let n=0;n<e;++n)try{return await t()}catch{await new Promise(o=>setTimeout(o,r))}return await t()};ET.retryWrapper=Cdt});var KEe=C(CT=>{"use strict";Object.defineProperty(CT,"__esModule",{value:!0});CT.fromHttp=void 0;var Idt=(xC(),Ze(bC)),bdt=(mn(),Ze(ni)),xdt=tc(),WEe=Hn(),wdt=Idt.__importDefault(require("node:fs/promises")),Bdt=VEe(),JEe=YEe(),Sdt=jEe(),Rdt="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Ndt="http://169.254.170.2",Tdt="AWS_CONTAINER_CREDENTIALS_FULL_URI",Pdt="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Qdt="AWS_CONTAINER_AUTHORIZATION_TOKEN",_dt=(t={})=>{t.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let e,r=t.awsContainerCredentialsRelativeUri??process.env[Rdt],n=t.awsContainerCredentialsFullUri??process.env[Tdt],s=t.awsContainerAuthorizationToken??process.env[Qdt],o=t.awsContainerAuthorizationTokenFile??process.env[Pdt],i=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?.warn?console.warn:t.logger.warn.bind(t.logger);if(r&&n&&(i("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),i("awsContainerCredentialsFullUri will take precedence.")),s&&o&&(i("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),i("awsContainerAuthorizationToken will take precedence.")),n)e=n;else if(r)e=`${Ndt}${r}`;else throw new WEe.CredentialsProviderError(`No HTTP credential provider host provided.
|
|
|
|
|
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:t.logger});let a=new URL(e);(0,Bdt.checkUrl)(a,t.logger);let c=xdt.NodeHttpHandler.create({requestTimeout:t.timeout??1e3,connectionTimeout:t.timeout??1e3});return(0,Sdt.retryWrapper)(async()=>{let l=(0,JEe.createGetRequest)(a);s?l.headers.Authorization=s:o&&(l.headers.Authorization=(await wdt.default.readFile(o)).toString());try{let u=await c.handle(l);return(0,JEe.getCredentials)(u.response).then(d=>(0,bdt.setCredentialFeature)(d,"CREDENTIALS_HTTP","z"))}catch(u){throw new WEe.CredentialsProviderError(String(u),{logger:t.logger})}},t.maxRetries??3,t.timeout??1e3)};CT.fromHttp=_dt});var eY=C(IT=>{"use strict";Object.defineProperty(IT,"__esModule",{value:!0});IT.fromHttp=void 0;var vdt=KEe();Object.defineProperty(IT,"fromHttp",{enumerable:!0,get:function(){return vdt.fromHttp}})});function Ddt(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:t.region},propertiesExtractor:(e,r)=>({signingProperties:{config:e,context:r}})}}function kdt(t){return{schemeId:"smithy.api#noAuth"}}var kC,XEe,ZEe,eCe,tY=_(()=>{Ur();kC=S(Fn()),XEe=async(t,e,r)=>({operation:(0,kC.getSmithyContext)(e).operation,region:await(0,kC.normalizeProvider)(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});ZEe=t=>{let e=[];return t.operation==="CreateToken"?e.push(kdt(t)):e.push(Ddt(t)),e},eCe=t=>{let e=ic(t);return Object.assign(e,{authSchemePreference:(0,kC.normalizeProvider)(t.authSchemePreference??[])})}});var tCe,rCe,rY=_(()=>{tCe=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),rCe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var zu,LC=_(()=>{zu={name:"@aws-sdk/nested-clients",version:"3.996.18",description:"Nested clients for AWS SDK packages.",main:"./dist-cjs/index.js",module:"./dist-es/index.js",types:"./dist-types/index.d.ts",scripts:{build:"yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_package_name"',"build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",lint:"node ../../scripts/validation/submodules-linter.js --pkg nested-clients",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},engines:{node:">=20.0.0"},sideEffects:!1,author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.26","@aws-sdk/middleware-host-header":"^3.972.8","@aws-sdk/middleware-logger":"^3.972.8","@aws-sdk/middleware-recursion-detection":"^3.972.9","@aws-sdk/middleware-user-agent":"^3.972.28","@aws-sdk/region-config-resolver":"^3.972.10","@aws-sdk/types":"^3.973.6","@aws-sdk/util-endpoints":"^3.996.5","@aws-sdk/util-user-agent-browser":"^3.972.8","@aws-sdk/util-user-agent-node":"^3.973.14","@smithy/config-resolver":"^4.4.13","@smithy/core":"^3.23.13","@smithy/fetch-http-handler":"^5.3.15","@smithy/hash-node":"^4.2.12","@smithy/invalid-dependency":"^4.2.12","@smithy/middleware-content-length":"^4.2.12","@smithy/middleware-endpoint":"^4.4.28","@smithy/middleware-retry":"^4.4.46","@smithy/middleware-serde":"^4.2.16","@smithy/middleware-stack":"^4.2.12","@smithy/node-config-provider":"^4.3.12","@smithy/node-http-handler":"^4.5.1","@smithy/protocol-http":"^5.3.12","@smithy/smithy-client":"^4.12.8","@smithy/types":"^4.13.1","@smithy/url-parser":"^4.2.12","@smithy/util-base64":"^4.3.2","@smithy/util-body-length-browser":"^4.2.2","@smithy/util-body-length-node":"^4.2.3","@smithy/util-defaults-mode-browser":"^4.3.44","@smithy/util-defaults-mode-node":"^4.2.48","@smithy/util-endpoints":"^3.3.3","@smithy/util-middleware":"^4.2.12","@smithy/util-retry":"^4.2.13","@smithy/util-utf8":"^4.2.2",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",premove:"4.0.0",typescript:"~5.8.3"},typesVersions:{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["./cognito-identity.d.ts","./cognito-identity.js","./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sso.d.ts","./sso.js","./sts.d.ts","./sts.js","dist-*/**"],browser:{"./dist-es/submodules/cognito-identity/runtimeConfig":"./dist-es/submodules/cognito-identity/runtimeConfig.browser","./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso
Line truncated
|
|
|
|
|
`&&y[N]!=="\r";N++)D+=y[N];if(D=D.trim(),D[D.length-1]==="/"&&(D=D.substring(0,D.length-1),N--),!F(D)){let ce;return ce=D.trim().length===0?"Invalid space after '<'.":"Tag '"+D+"' is an invalid name.",P("InvalidTag",ce,q(y,N))}let M=E(y,N);if(M===!1)return P("InvalidAttr","Attributes for '"+D+"' have open quote.",q(y,N));let H=M.value;if(N=M.index,H[H.length-1]==="/"){let ce=N-H.length;H=H.substring(0,H.length-1);let it=x(H,f);if(it!==!0)return P(it.err.code,it.err.msg,q(y,ce+it.err.line));B=!0}else if(Q){if(!M.tagClosed)return P("InvalidTag","Closing tag '"+D+"' doesn't have proper closing.",q(y,N));if(H.trim().length>0)return P("InvalidTag","Closing tag '"+D+"' can't have attributes or invalid starting.",q(y,L));if(h.length===0)return P("InvalidTag","Closing tag '"+D+"' has not been opened.",q(y,L));{let ce=h.pop();if(D!==ce.tagName){let it=q(y,ce.tagStartPos);return P("InvalidTag","Expected closing tag '"+ce.tagName+"' (opened in line "+it.line+", col "+it.col+") instead of closing tag '"+D+"'.",q(y,L))}h.length==0&&(T=!0)}}else{let ce=x(H,f);if(ce!==!0)return P(ce.err.code,ce.err.msg,q(y,N-H.length+ce.err.line));if(T===!0)return P("InvalidXml","Multiple possible root nodes found.",q(y,N));f.unpairedTags.indexOf(D)!==-1||h.push({tagName:D,tagStartPos:L}),B=!0}for(N++;N<y.length;N++)if(y[N]==="<"){if(y[N+1]==="!"){N++,N=p(y,N);continue}if(y[N+1]!=="?")break;if(N=d(y,++N),N.err)return N}else if(y[N]==="&"){let ce=b(y,N);if(ce==-1)return P("InvalidChar","char '&' is not expected.",q(y,N));N=ce}else if(T===!0&&!u(y[N]))return P("InvalidXml","Extra text at the end",q(y,N));y[N]==="<"&&N--}}}return B?h.length==1?P("InvalidTag","Unclosed tag '"+h[0].tagName+"'.",q(y,h[0].tagStartPos)):!(h.length>0)||P("InvalidXml","Invalid '"+JSON.stringify(h.map(N=>N.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):P("InvalidXml","Start tag expected.",1)}function u(y){return y===" "||y===" "||y===`
|
|
|
|
|
`||y==="\r"}function d(y,f){let h=f;for(;f<y.length;f++)if(y[f]=="?"||y[f]==" "){let B=y.substr(h,f-h);if(f>5&&B==="xml")return P("InvalidXml","XML declaration allowed only at the start of the document.",q(y,f));if(y[f]=="?"&&y[f+1]==">"){f++;break}continue}return f}function p(y,f){if(y.length>f+5&&y[f+1]==="-"&&y[f+2]==="-"){for(f+=3;f<y.length;f++)if(y[f]==="-"&&y[f+1]==="-"&&y[f+2]===">"){f+=2;break}}else if(y.length>f+8&&y[f+1]==="D"&&y[f+2]==="O"&&y[f+3]==="C"&&y[f+4]==="T"&&y[f+5]==="Y"&&y[f+6]==="P"&&y[f+7]==="E"){let h=1;for(f+=8;f<y.length;f++)if(y[f]==="<")h++;else if(y[f]===">"&&(h--,h===0))break}else if(y.length>f+9&&y[f+1]==="["&&y[f+2]==="C"&&y[f+3]==="D"&&y[f+4]==="A"&&y[f+5]==="T"&&y[f+6]==="A"&&y[f+7]==="["){for(f+=8;f<y.length;f++)if(y[f]==="]"&&y[f+1]==="]"&&y[f+2]===">"){f+=2;break}}return f}let A='"',g="'";function E(y,f){let h="",B="",T=!1;for(;f<y.length;f++){if(y[f]===A||y[f]===g)B===""?B=y[f]:B!==y[f]||(B="");else if(y[f]===">"&&B===""){T=!0;break}h+=y[f]}return B===""&&{value:h,index:f,tagClosed:T}}let I=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function x(y,f){let h=s(y,I),B={};for(let T=0;T<h.length;T++){if(h[T][1].length===0)return P("InvalidAttr","Attribute '"+h[T][2]+"' has no space in starting.",X(h[T]));if(h[T][3]!==void 0&&h[T][4]===void 0)return P("InvalidAttr","Attribute '"+h[T][2]+"' is without value.",X(h[T]));if(h[T][3]===void 0&&!f.allowBooleanAttributes)return P("InvalidAttr","boolean attribute '"+h[T][2]+"' is not allowed.",X(h[T]));let N=h[T][2];if(!v(N))return P("InvalidAttr","Attribute '"+N+"' is an invalid name.",X(h[T]));if(Object.prototype.hasOwnProperty.call(B,N))return P("InvalidAttr","Attribute '"+N+"' is repeated.",X(h[T]));B[N]=1}return!0}function b(y,f){if(y[++f]===";")return-1;if(y[f]==="#")return(function(B,T){let N=/\d/;for(B[T]==="x"&&(T++,N=/[\da-fA-F]/);T<B.length;T++){if(B[T]===";")return T;if(!B[T].match(N))break}return-1})(y,++f);let h=0;for(;f<y.length;f++,h++)if(!(y[f].match(/\w/)&&h<20)){if(y[f]===";")break;return-1}return f}function P(y,f,h){return{err:{code:y,msg:f,line:h.line||h,col:h.col}}}function v(y){return o(y)}function F(y){return o(y)}function q(y,f){let h=y.substring(0,f).split(/\r?\n/);return{line:h.length,col:h[h.length-1].length+1}}function X(y){return y.startIndex+y[1].length}let V=y=>i.includes(y)?"__"+y:y,Ee={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(y,f){return f},attributeValueProcessor:function(y,f){return f},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(y,f,h){return y},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:V};function Ne(y,f){if(typeof y!="string")return;let h=y.toLowerCase();if(i.some(B=>h===B.toLowerCase()))throw new Error(`[SECURITY] Invalid ${f}: "${y}" is a reserved JavaScript keyword that could cause prototype pollution`);if(a.some(B=>h===B.toLowerCase()))throw new Error(`[SECURITY] Invalid ${f}: "${y}" is a reserved JavaScript keyword that could cause prototype pollution`)}function ee(y){return typeof y=="boolean"?{enabled:y,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof y=="object"&&y!==null?{enabled:y.enabled!==!1,maxEntitySize:Math.max(1,y.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,y.maxExpansionDepth??10),maxTotalExpansions:Math.max(1,y.maxTotalExpansions??1e3),maxExpandedLength:Math.max(1,y.maxExpandedLength??1e5),maxEntityCount:Math.max(1,y.maxEntityCount??100),allowedTags:y.allowedTags??null,tagFilter:y.tagFilter??null}:ee(!0)}let Ge=function(y){let f=Object.assign({},Ee,y),h=[{value:f.attributeNamePrefix,name:"attributeNamePrefix"},{value:f.attributesGroupName,name:"attributesGroupName"},{value:f.textNodeName,name:"textNodeName"},{value:f.cdataPropName,name:"cdataPropName"},{value:f.commentPropName,name:"commentPropName"}];for(let{value:B,name:T}of h)B&&Ne(B,T);return f.onDangerousProperty===null&&(f.onDangerousProperty=V),f.processEntities=ee(f.processEntities),f.stopNodes&&Array.isArray(f.stopNodes)&&(f.stopNodes=f.stopNodes.map(B=>typeof B=="string"&&B.startsWith("*.")?".."+B.substring(2):B)),f},ae;ae=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class ut{constructor(f){this.tagname=f,this.child=[],this[":@"]=Object.create(null)}add(f,h){f==="__proto__"&&(f="#__proto__"),this.child.push({[f]:h})}addChild(f,h){f.tagname==="__proto__"&&(f.tagname="#__proto__"),f[":@"]&&Object.keys(f[":@"]).length>0?this.child.push({[f.tagname]:f.child,":@":f[":@"]}):this.child.push({[Line truncated
|
|
|
|
|
`);let f=new ut("!xml"),h=f,B="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let T=new nn(this.options.processEntities);for(let N=0;N<y.length;N++)if(y[N]==="<")if(y[N+1]==="/"){let L=Ed(y,">",N,"Closing Tag is not closed."),Q=y.substring(N+2,L).trim();if(this.options.removeNSPrefix){let M=Q.indexOf(":");M!==-1&&(Q=Q.substr(M+1))}Q=bv(this.options.transformTagName,Q,"",this.options).tagName,h&&(B=this.saveTextToParentTag(B,h,this.readonlyMatcher));let D=this.matcher.getCurrentTag();if(Q&&this.options.unpairedTags.indexOf(Q)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${Q}>`);D&&this.options.unpairedTags.indexOf(D)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,h=this.tagsNodeStack.pop(),B="",N=L}else if(y[N+1]==="?"){let L=Iv(y,N,!1,"?>");if(!L)throw new Error("Pi Tag is not closed.");if(B=this.saveTextToParentTag(B,h,this.readonlyMatcher),!(this.options.ignoreDeclaration&&L.tagName==="?xml"||this.options.ignorePiTags)){let Q=new ut(L.tagName);Q.add(this.options.textNodeName,""),L.tagName!==L.tagExp&&L.attrExpPresent&&(Q[":@"]=this.buildAttributesMap(L.tagExp,this.matcher,L.tagName)),this.addChild(h,Q,this.readonlyMatcher,N)}N=L.closeIndex+1}else if(y.substr(N+1,3)==="!--"){let L=Ed(y,"-->",N+4,"Comment is not closed.");if(this.options.commentPropName){let Q=y.substring(N+4,L-2);B=this.saveTextToParentTag(B,h,this.readonlyMatcher),h.add(this.options.commentPropName,[{[this.options.textNodeName]:Q}])}N=L}else if(y.substr(N+1,2)==="!D"){let L=T.readDocType(y,N);this.docTypeEntities=L.entities,N=L.i}else if(y.substr(N+1,2)==="!["){let L=Ed(y,"]]>",N,"CDATA is not closed.")-2,Q=y.substring(N+9,L);B=this.saveTextToParentTag(B,h,this.readonlyMatcher);let D=this.parseTextData(Q,h.tagname,this.readonlyMatcher,!0,!1,!0,!0);D==null&&(D=""),this.options.cdataPropName?h.add(this.options.cdataPropName,[{[this.options.textNodeName]:Q}]):h.add(this.options.textNodeName,D),N=L+2}else{let L=Iv(y,N,this.options.removeNSPrefix);if(!L){let Is=y.substring(Math.max(0,N-50),Math.min(y.length,N+50));throw new Error(`readTagExp returned undefined at position ${N}. Context: "${Is}"`)}let Q=L.tagName,D=L.rawTagName,M=L.tagExp,H=L.attrExpPresent,ce=L.closeIndex;if({tagName:Q,tagExp:M}=bv(this.options.transformTagName,Q,M,this.options),this.options.strictReservedNames&&(Q===this.options.commentPropName||Q===this.options.cdataPropName||Q===this.options.textNodeName||Q===this.options.attributesGroupName))throw new Error(`Invalid tag name: ${Q}`);h&&B&&h.tagname!=="!xml"&&(B=this.saveTextToParentTag(B,h,this.readonlyMatcher,!1));let it=h;it&&this.options.unpairedTags.indexOf(it.tagname)!==-1&&(h=this.tagsNodeStack.pop(),this.matcher.pop());let Xe=!1;M.length>0&&M.lastIndexOf("/")===M.length-1&&(Xe=!0,Q[Q.length-1]==="/"?(Q=Q.substr(0,Q.length-1),M=Q):M=M.substr(0,M.length-1),H=Q!==M);let nt,yt=null,na={};nt=ZNe(D),Q!==f.tagname&&this.matcher.push(Q,{},nt),Q!==M&&H&&(yt=this.buildAttributesMap(M,this.matcher,Q),yt&&(na=XNe(yt,this.options))),Q!==f.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));let sn=N;if(this.isCurrentNodeStopNode){let Is="";if(Xe)N=L.closeIndex;else if(this.options.unpairedTags.indexOf(Q)!==-1)N=L.closeIndex;else{let Sv=this.readStopNodeData(y,D,ce+1);if(!Sv)throw new Error(`Unexpected end of ${D}`);N=Sv.i,Is=Sv.tagContent}let Bv=new ut(Q);yt&&(Bv[":@"]=yt),Bv.add(this.options.textNodeName,Is),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(h,Bv,this.readonlyMatcher,sn)}else{if(Xe){({tagName:Q,tagExp:M}=bv(this.options.transformTagName,Q,M,this.options));let Is=new ut(Q);yt&&(Is[":@"]=yt),this.addChild(h,Is,this.readonlyMatcher,sn),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(this.options.unpairedTags.indexOf(Q)!==-1){let Is=new ut(Q);yt&&(Is[":@"]=yt),this.addChild(h,Is,this.readonlyMatcher,sn),this.matcher.pop(),this.isCurrentNodeStopNode=!1,N=L.closeIndex;continue}{let Is=new ut(Q);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(h),yt&&(Is[":@"]=yt),this.addChild(h,Is,this.readonlyMatcher,sn),h=Is}}B="",N=ce}}else B+=y[N];return f.child};function aTe(y,f,h,B){this.options.captureMetaData||(B=void 0);let T=this.options.jPath?h.toString():h,N=this.options.updateTag(f.tagname,T,f[":@"]);N===!1||(typeof N=="string"&&(f.tagname=N),y.addChild(f,B))}function cTe(y,f,h){let B=this.options.processEntities;if(!B||!B.enabled)return y;if(B.allowedTags){let T=this.options.jPath?h.toString():h;if(!(Array.isArray(B.allowedTags)?B.allowedTags.includes(f):B.allowedTags(f,T)))return y}if(B.tagFilter){let T=this.options.jPath?h.toString():h;if(!B.tagFilter(f,T))return y}for(let T of Object.keys(this.docTypeEntities)){let N=this.docTypeEntities[T],L=y.match(N.regx);if(L){if(this.entityExpansionCount+=L.length,B.maxTotalExpansions&&this.entityExpansionCount>B.maxTotalExpansiLine truncated
|
|
|
|
|
`);let B=[];if(f.stopNodes&&Array.isArray(f.stopNodes))for(let T=0;T<f.stopNodes.length;T++){let N=f.stopNodes[T];typeof N=="string"?B.push(new kA(N)):N instanceof kA&&B.push(N)}return u3(y,f,h,new Cv,B)}function u3(y,f,h,B,T){let N="",L=!1;if(f.maxNestedTags&&B.getDepth()>f.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(y)){if(y!=null){let Q=y.toString();return Q=wv(Q,f),Q}return""}for(let Q=0;Q<y.length;Q++){let D=y[Q],M=p3(D);if(M===void 0)continue;let H=ETe(D[":@"],f);B.push(M,H);let ce=ITe(B,T);if(M===f.textNodeName){let yt=D[M];ce||(yt=f.tagValueProcessor(M,yt),yt=wv(yt,f)),L&&(N+=h),N+=yt,L=!1,B.pop();continue}if(M===f.cdataPropName){L&&(N+=h),N+=`<![CDATA[${D[M][0][f.textNodeName]}]]>`,L=!1,B.pop();continue}if(M===f.commentPropName){N+=h+`<!--${D[M][0][f.textNodeName]}-->`,L=!0,B.pop();continue}if(M[0]==="?"){let yt=A3(D[":@"],f,ce),na=M==="?xml"?"":h,sn=D[M][0][f.textNodeName];sn=sn.length!==0?" "+sn:"",N+=na+`<${M}${sn}${yt}?>`,L=!0,B.pop();continue}let it=h;it!==""&&(it+=f.indentBy);let Xe=h+`<${M}${A3(D[":@"],f,ce)}`,nt;nt=ce?d3(D[M],f):u3(D[M],f,it,B,T),f.unpairedTags.indexOf(M)!==-1?f.suppressUnpairedNode?N+=Xe+">":N+=Xe+"/>":nt&&nt.length!==0||!f.suppressEmptyNode?nt&&nt.endsWith(">")?N+=Xe+`>${nt}${h}</${M}>`:(N+=Xe+">",nt&&h!==""&&(nt.includes("/>")||nt.includes("</"))?N+=h+f.indentBy+nt+h:N+=nt,N+=`</${M}>`):N+=Xe+"/>",L=!0,B.pop()}return N}function ETe(y,f){if(!y||f.ignoreAttributes)return null;let h={},B=!1;for(let T in y)Object.prototype.hasOwnProperty.call(y,T)&&(h[T.startsWith(f.attributeNamePrefix)?T.substr(f.attributeNamePrefix.length):T]=y[T],B=!0);return B?h:null}function d3(y,f){if(!Array.isArray(y))return y!=null?y.toString():"";let h="";for(let B=0;B<y.length;B++){let T=y[B],N=p3(T);if(N===f.textNodeName)h+=T[N];else if(N===f.cdataPropName)h+=T[N][0][f.textNodeName];else if(N===f.commentPropName)h+=T[N][0][f.textNodeName];else{if(N&&N[0]==="?")continue;if(N){let L=CTe(T[":@"],f),Q=d3(T[N],f);Q&&Q.length!==0?h+=`<${N}${L}>${Q}</${N}>`:h+=`<${N}${L}/>`}}}return h}function CTe(y,f){let h="";if(y&&!f.ignoreAttributes)for(let B in y){if(!Object.prototype.hasOwnProperty.call(y,B))continue;let T=y[B];T===!0&&f.suppressBooleanAttributes?h+=` ${B.substr(f.attributeNamePrefix.length)}`:h+=` ${B.substr(f.attributeNamePrefix.length)}="${T}"`}return h}function p3(y){let f=Object.keys(y);for(let h=0;h<f.length;h++){let B=f[h];if(Object.prototype.hasOwnProperty.call(y,B)&&B!==":@")return B}}function A3(y,f,h){let B="";if(y&&!f.ignoreAttributes)for(let T in y){if(!Object.prototype.hasOwnProperty.call(y,T))continue;let N;h?N=y[T]:(N=f.attributeValueProcessor(T,y[T]),N=wv(N,f)),N===!0&&f.suppressBooleanAttributes?B+=` ${T.substr(f.attributeNamePrefix.length)}`:B+=` ${T.substr(f.attributeNamePrefix.length)}="${N}"`}return B}function ITe(y,f){if(!f||f.length===0)return!1;for(let h=0;h<f.length;h++)if(y.matches(f[h]))return!0;return!1}function wv(y,f){if(y&&y.length>0&&f.processEntities)for(let h=0;h<f.entities.length;h++){let B=f.entities[h];y=y.replace(B.regex,B.val)}return y}let bTe={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(y,f){return f},attributeValueProcessor:function(y,f){return f},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};function Bo(y){if(this.options=Object.assign({},bTe,y),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(h=>typeof h=="string"&&h.startsWith("*.")?".."+h.substring(2):h)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let h=0;h<this.options.stopNodes.length;h++){let B=this.options.stopNodes[h];typeof B=="string"?this.stopNodeExpressions.push(new kA(B)):B instanceof kA&&this.stopNodeExpressions.push(B)}var f;this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=typeof(f=this.options.ignoreAttributes)=="function"?f:Array.isArray(f)?h=>{for(let B of f)if(typeof B=="string"&&h===B||B instanceof RegExp&&B.test(h))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=BTe),this.processTextOrObjNode=xTe,this.options.format?(this.indentate=wTe,this.tagEndChar=`>
|
|
|
|
|
`,this.newLine=`
|
|
|
|
|
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function xTe(y,f,h,B){let T=this.extractAttributes(y);if(B.push(f,T),this.checkStopNode(B)){let L=this.buildRawContent(y),Q=this.buildAttributesForStopNode(y);return B.pop(),this.buildObjectNode(L,f,Q,h)}let N=this.j2x(y,h+1,B);return B.pop(),y[this.options.textNodeName]!==void 0&&Object.keys(y).length===1?this.buildTextValNode(y[this.options.textNodeName],f,N.attrStr,h,B):this.buildObjectNode(N.val,f,N.attrStr,h)}function wTe(y){return this.options.indentBy.repeat(y)}function BTe(y){return!(!y.startsWith(this.options.attributeNamePrefix)||y===this.options.textNodeName)&&y.substr(this.attrPrefixLen)}Bo.prototype.build=function(y){if(this.options.preserveOrder)return yTe(y,this.options);{Array.isArray(y)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(y={[this.options.arrayNodeName]:y});let f=new Cv;return this.j2x(y,0,f).val}},Bo.prototype.j2x=function(y,f,h){let B="",T="";if(this.options.maxNestedTags&&h.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let N=this.options.jPath?h.toString():h,L=this.checkStopNode(h);for(let Q in y)if(Object.prototype.hasOwnProperty.call(y,Q))if(y[Q]===void 0)this.isAttribute(Q)&&(T+="");else if(y[Q]===null)this.isAttribute(Q)||Q===this.options.cdataPropName?T+="":Q[0]==="?"?T+=this.indentate(f)+"<"+Q+"?"+this.tagEndChar:T+=this.indentate(f)+"<"+Q+"/"+this.tagEndChar;else if(y[Q]instanceof Date)T+=this.buildTextValNode(y[Q],Q,"",f,h);else if(typeof y[Q]!="object"){let D=this.isAttribute(Q);if(D&&!this.ignoreAttributesFn(D,N))B+=this.buildAttrPairStr(D,""+y[Q],L);else if(!D)if(Q===this.options.textNodeName){let M=this.options.tagValueProcessor(Q,""+y[Q]);T+=this.replaceEntitiesValue(M)}else{h.push(Q);let M=this.checkStopNode(h);if(h.pop(),M){let H=""+y[Q];T+=H===""?this.indentate(f)+"<"+Q+this.closeTag(Q)+this.tagEndChar:this.indentate(f)+"<"+Q+">"+H+"</"+Q+this.tagEndChar}else T+=this.buildTextValNode(y[Q],Q,"",f,h)}}else if(Array.isArray(y[Q])){let D=y[Q].length,M="",H="";for(let ce=0;ce<D;ce++){let it=y[Q][ce];if(it!==void 0)if(it===null)Q[0]==="?"?T+=this.indentate(f)+"<"+Q+"?"+this.tagEndChar:T+=this.indentate(f)+"<"+Q+"/"+this.tagEndChar;else if(typeof it=="object")if(this.options.oneListGroup){h.push(Q);let Xe=this.j2x(it,f+1,h);h.pop(),M+=Xe.val,this.options.attributesGroupName&&it.hasOwnProperty(this.options.attributesGroupName)&&(H+=Xe.attrStr)}else M+=this.processTextOrObjNode(it,Q,f,h);else if(this.options.oneListGroup){let Xe=this.options.tagValueProcessor(Q,it);Xe=this.replaceEntitiesValue(Xe),M+=Xe}else{h.push(Q);let Xe=this.checkStopNode(h);if(h.pop(),Xe){let nt=""+it;M+=nt===""?this.indentate(f)+"<"+Q+this.closeTag(Q)+this.tagEndChar:this.indentate(f)+"<"+Q+">"+nt+"</"+Q+this.tagEndChar}else M+=this.buildTextValNode(it,Q,"",f,h)}}this.options.oneListGroup&&(M=this.buildObjectNode(M,Q,H,f)),T+=M}else if(this.options.attributesGroupName&&Q===this.options.attributesGroupName){let D=Object.keys(y[Q]),M=D.length;for(let H=0;H<M;H++)B+=this.buildAttrPairStr(D[H],""+y[Q][D[H]],L)}else T+=this.processTextOrObjNode(y[Q],Q,f,h);return{attrStr:B,val:T}},Bo.prototype.buildAttrPairStr=function(y,f,h){return h||(f=this.options.attributeValueProcessor(y,""+f),f=this.replaceEntitiesValue(f)),this.options.suppressBooleanAttributes&&f==="true"?" "+y:" "+y+'="'+f+'"'},Bo.prototype.extractAttributes=function(y){if(!y||typeof y!="object")return null;let f={},h=!1;if(this.options.attributesGroupName&&y[this.options.attributesGroupName]){let B=y[this.options.attributesGroupName];for(let T in B)Object.prototype.hasOwnProperty.call(B,T)&&(f[T.startsWith(this.options.attributeNamePrefix)?T.substring(this.options.attributeNamePrefix.length):T]=B[T],h=!0)}else for(let B in y){if(!Object.prototype.hasOwnProperty.call(y,B))continue;let T=this.isAttribute(B);T&&(f[T]=y[B],h=!0)}return h?f:null},Bo.prototype.buildRawContent=function(y){if(typeof y=="string")return y;if(typeof y!="object"||y===null)return String(y);if(y[this.options.textNodeName]!==void 0)return y[this.options.textNodeName];let f="";for(let h in y){if(!Object.prototype.hasOwnProperty.call(y,h)||this.isAttribute(h)||this.options.attributesGroupName&&h===this.options.attributesGroupName)continue;let B=y[h];if(h===this.options.textNodeName)f+=B;else if(Array.isArray(B)){for(let T of B)if(typeof T=="string"||typeof T=="number")f+=`<${h}>${T}</${h}>`;else if(typeof T=="object"&&T!==null){let N=this.buildRawContent(T),L=this.buildAttributesForStopNode(T);f+=N===""?`<${h}${L}/>`:`<${h}${L}>${N}</${h}>`}}else if(typeof B=="object"&&B!==null){let T=this.buildRawContent(B),N=this.buildAttributesForStopNode(B);f+=T===""?`<${h}${N}/>`:`<${h}${N}>${T}</${h}>`}else f+=`<${h}>${B}</${h}>`}return f},Bo.prototype.buildAttributesForStopNode=function(y){if(!y||typeof y!="object")return"";let f="";if(this.options.attributesGroupName&&y[this.options.attributesGroupName]){let h=y[this.options.attributesGroupName];
Line truncated
|
|
|
|
|
`)?"":void 0,maxNestedTags:1/0});QY.addEntity("#xD","\r");QY.addEntity("#10",`
|
|
|
|
|
`);function Qpt(t){return QY.parse(t,!0)}});var FT=C(OT=>{"use strict";var _pt=WCe(),vpt=/[&<>"]/g,Dpt={"&":"&","<":"<",">":">",'"':"""};function kpt(t){return t.replace(vpt,e=>Dpt[e])}var Lpt=/[&"'<>\r\n\u0085\u2028]/g,Opt={"&":"&",'"':""","'":"'","<":"<",">":">","\r":"
","\n":"
","\x85":"…","\u2028":"
"};function Fpt(t){return t.replace(Lpt,e=>Opt[e])}var LT=class{value;constructor(e){this.value=e}toString(){return Fpt(""+this.value)}},vY=class t{name;children;attributes={};static of(e,r,n){let s=new t(e);return r!==void 0&&s.addChildNode(new LT(r)),n!==void 0&&s.withName(n),s}constructor(e,r=[]){this.name=e,this.children=r}withName(e){return this.name=e,this}addAttribute(e,r){return this.attributes[e]=r,this}addChildNode(e){return this.children.push(e),this}removeAttribute(e){return delete this.attributes[e],this}n(e){return this.name=e,this}c(e){return this.children.push(e),this}a(e,r){return r!=null&&(this.attributes[e]=r),this}cc(e,r,n=r){if(e[r]!=null){let s=t.of(r,e[r]).withName(n);this.c(s)}}l(e,r,n,s){e[r]!=null&&s().map(i=>{i.withName(n),this.c(i)})}lc(e,r,n,s){if(e[r]!=null){let o=s(),i=new t(n);o.map(a=>{i.c(a)}),this.c(i)}}toString(){let e=!!this.children.length,r=`<${this.name}`,n=this.attributes;for(let s of Object.keys(n)){let o=n[s];o!=null&&(r+=` ${s}="${kpt(""+o)}"`)}return r+=e?`>${this.children.map(s=>s.toString()).join("")}</${this.name}>`:"/>"}};OT.parseXML=_pt.parseXML;OT.XmlNode=vY;OT.XmlText=LT});var JCe,KCe,XCe,dA,MT=_(()=>{JCe=S(FT());qs();lt();KCe=S(_e()),XCe=S(Jr());Ju();wY();dA=class extends Vn{settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new Yp(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,r,n){let s=me.of(e),o=s.getMemberSchemas();if(s.isStructSchema()&&s.isMemberSchema()&&!!Object.values(o).find(l=>!!l.getMemberTraits().eventPayload)){let l={},u=Object.keys(o)[0];return o[u].isBlobSchema()?l[u]=r:l[u]=this.read(o[u],r),l}let a=(this.serdeContext?.utf8Encoder??XCe.toUtf8)(r),c=this.parseXml(a);return this.readSchema(e,n?c[n]:c)}readSchema(e,r){let n=me.of(e);if(n.isUnitSchema())return;let s=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(r))return this.readSchema(n,[r]);if(r==null)return r;if(typeof r=="object"){let o=!!s.xmlFlattened;if(n.isListSchema()){let a=n.getValueSchema(),c=[],l=a.getMergedTraits().xmlName??"member",u=o?r:(r[0]??r)[l];if(u==null)return c;let d=Array.isArray(u)?u:[u];for(let p of d)c.push(this.readSchema(a,p));return c}let i={};if(n.isMapSchema()){let a=n.getKeySchema(),c=n.getValueSchema(),l;o?l=Array.isArray(r)?r:[r]:l=Array.isArray(r.entry)?r.entry:[r.entry];let u=a.getMergedTraits().xmlName??"key",d=c.getMergedTraits().xmlName??"value";for(let p of l){let A=p[u],g=p[d];i[A]=this.readSchema(c,g)}return i}if(n.isStructSchema()){let a=n.isUnionSchema(),c;a&&(c=new Ig(r,i));for(let[l,u]of n.structIterator()){let d=u.getMergedTraits(),p=d.httpPayload?d.xmlName??u.getName():u.getMemberTraits().xmlName??l;a&&c.mark(p),r[p]!=null&&(i[l]=this.readSchema(u,r[p]))}return a&&c.writeUnknown(),i}if(n.isDocumentSchema())return r;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(!0)}`)}return n.isListSchema()?[]:n.isMapSchema()||n.isStructSchema()?{}:this.stringDeserializer.read(n,r)}parseXml(e){if(e.length){let r;try{r=(0,JCe.parseXML)(e)}catch(i){throw i&&typeof i=="object"&&Object.defineProperty(i,"$responseBodyText",{value:e}),i}let n="#text",s=Object.keys(r)[0],o=r[s];return o[n]&&(o[s]=o[n],delete o[n]),(0,KCe.getValueFromTextNode)(o)}return{}}}});var ZCe,eIe,VC,DY=_(()=>{qs();lt();hs();ZCe=S(_e()),eIe=S(Kr());Ju();VC=class extends Vn{settings;buffer;constructor(e){super(),this.settings=e}write(e,r,n=""){this.buffer===void 0&&(this.buffer="");let s=me.of(e);if(n&&!n.endsWith(".")&&(n+="."),s.isBlobSchema())(typeof r=="string"||r instanceof Uint8Array)&&(this.writeKey(n),this.writeValue((this.serdeContext?.base64Encoder??eIe.toBase64)(r)));else if(s.isBooleanSchema()||s.isNumericSchema()||s.isStringSchema())r!=null?(this.writeKey(n),this.writeValue(String(r))):s.isIdempotencyToken()&&(this.writeKey(n),this.writeValue((0,ri.v4)()));else if(s.isBigIntegerSchema())r!=null&&(this.writeKey(n),this.writeValue(String(r)));else if(s.isBigDecimalSchema())r!=null&&(this.writeKey(n),this.writeValue(r instanceof Ut?r.string:String(r)));else if(s.isTimestampSchema()){if(r instanceof Date)switch(this.writeKey(n),ho(s,this.settings)){case 5:this.writeValue(r.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue((0,ZCe.dateToUtcString)(r));break;case 7:this.writeValue(String(r.getTime()/1e3));break}}else if(s.isDocumentSchema())Array.isArray(r)?this.write(79,r,n):r instanceof Date?this.write(4,r,n):r instanceof Uint8Array?this.write(21,r,n):r&&typeof r=="object"?this.write(143,r,n):(this.writeKey(n),this.writeValue(String(r)));else if(s.isListSchema()){if(ArraLine truncated
|
|
|
|
|
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:e});return t},bmt=(t={})=>async({callerClientConfig:e}={})=>{t.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:s,ssoRoleName:o,ssoSession:i}=t,{ssoClient:a}=t,c=bP.getProfileName({profile:t.profile??e?.profile});if(!r&&!n&&!s&&!o&&!i){let u=(await bP.parseKnownFiles(t))[c];if(!u)throw new Ki.CredentialsProviderError(`Profile ${c} was not found.`,{logger:t.logger});if(!kxe(u))throw new Ki.CredentialsProviderError(`Profile ${c} is not configured with SSO credentials.`,{logger:t.logger});if(u?.sso_session){let x=(await bP.loadSsoSessionData(t))[u.sso_session],b=` configurations in profile ${c} and sso-session ${u.sso_session}`;if(s&&s!==x.sso_region)throw new Ki.CredentialsProviderError("Conflicting SSO region"+b,{tryNextLink:!1,logger:t.logger});if(r&&r!==x.sso_start_url)throw new Ki.CredentialsProviderError("Conflicting SSO start_url"+b,{tryNextLink:!1,logger:t.logger});u.sso_region=x.sso_region,u.sso_start_url=x.sso_start_url}let{sso_start_url:d,sso_account_id:p,sso_region:A,sso_role_name:g,sso_session:E}=Lxe(u,t.logger);return Dxe({ssoStartUrl:d,ssoSession:E,ssoAccountId:p,ssoRegion:A,ssoRoleName:g,ssoClient:a,clientConfig:t.clientConfig,parentClientConfig:t.parentClientConfig,callerClientConfig:t.callerClientConfig,profile:c,filepath:t.filepath,configFilepath:t.configFilepath,ignoreCache:t.ignoreCache,logger:t.logger})}else{if(!r||!n||!s||!o)throw new Ki.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:t.logger});return Dxe({ssoStartUrl:r,ssoSession:i,ssoAccountId:n,ssoRegion:s,ssoRoleName:o,ssoClient:a,clientConfig:t.clientConfig,parentClientConfig:t.parentClientConfig,callerClientConfig:t.callerClientConfig,profile:c,filepath:t.filepath,configFilepath:t.configFilepath,ignoreCache:t.ignoreCache,logger:t.logger})}};xP.fromSSO=bmt;xP.isSsoProfile=kxe;xP.validateSsoProfile=Lxe});function xmt(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"signin",region:t.region},propertiesExtractor:(e,r)=>({signingProperties:{config:e,context:r}})}}function wmt(t){return{schemeId:"smithy.api#noAuth"}}var bI,Oxe,Fxe,Mxe,fj=_(()=>{Ur();bI=S(Fn()),Oxe=async(t,e,r)=>({operation:(0,bI.getSmithyContext)(e).operation,region:await(0,bI.normalizeProvider)(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});Fxe=t=>{let e=[];return t.operation==="CreateOAuth2Token"?e.push(wmt(t)):e.push(xmt(t)),e},Mxe=t=>{let e=ic(t);return Object.assign(e,{authSchemePreference:(0,bI.normalizeProvider)(t.authSchemePreference??[])})}});var Uxe,qxe,gj=_(()=>{Uxe=t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"signin"}),qxe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var Wxe,jn,$xe,fA,Tg,rd,Xi,SP,hj,Gxe,Hxe,zxe,yj,Ej,Yn,Cj,wP,BP,Vxe,Yxe,jxe,Bmt,Jxe,Kxe=_(()=>{Wxe="required",jn="argv",$xe="isSet",fA="booleanEquals",Tg="error",rd="endpoint",Xi="tree",SP="PartitionResult",hj="stringEquals",Gxe={[Wxe]:!0,default:!1,type:"boolean"},Hxe={[Wxe]:!1,type:"string"},zxe={ref:"Endpoint"},yj={fn:fA,[jn]:[{ref:"UseFIPS"},!0]},Ej={fn:fA,[jn]:[{ref:"UseDualStack"},!0]},Yn={},Cj={fn:"getAttr",[jn]:[{ref:SP},"name"]},wP={fn:fA,[jn]:[{ref:"UseFIPS"},!1]},BP={fn:fA,[jn]:[{ref:"UseDualStack"},!1]},Vxe={fn:"getAttr",[jn]:[{ref:SP},"supportsFIPS"]},Yxe={fn:fA,[jn]:[!0,{fn:"getAttr",[jn]:[{ref:SP},"supportsDualStack"]}]},jxe=[{ref:"Region"}],Bmt={version:"1.0",parameters:{UseDualStack:Gxe,UseFIPS:Gxe,Endpoint:Hxe,Region:Hxe},rules:[{conditions:[{fn:$xe,[jn]:[zxe]}],rules:[{conditions:[yj],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Tg},{rules:[{conditions:[Ej],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Tg},{endpoint:{url:zxe,properties:Yn,headers:Yn},type:rd}],type:Xi}],type:Xi},{rules:[{conditions:[{fn:$xe,[jn]:jxe}],rules:[{conditions:[{fn:"aws.partition",[jn]:jxe,assign:SP}],rules:[{conditions:[{fn:hj,[jn]:[Cj,"aws"]},wP,BP],endpoint:{url:"https://{Region}.signin.aws.amazon.com",properties:Yn,headers:Yn},type:rd},{conditions:[{fn:hj,[jn]:[Cj,"aws-cn"]},wP,BP],endpoint:{url:"https://{Region}.signin.amazonaws.cn",properties:Yn,headers:Yn},type:rd},{conditions:[{fn:hj,[jn]:[Cj,"aws-us-gov"]},wP,BP],endpoint:{url:"https://{Region}.signin.amazonaws-us-gov.com",properties:Yn,headers:Yn},type:rd},{conditions:[yj,Ej],rules:[{conditions:[{fn:fA,[jn]:[!0,Vxe]},Yxe],rules:[{endpoint:{url:"https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Yn,headers:Yn},type:rd}],type:Xi},{error:"FIPS and DualStac
Line truncated
|
|
|
|
|
- EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:e})}},"checkUrl");function xbt(t){return new gbt({protocol:t.protocol,hostname:t.hostname,port:Number(t.port),path:t.pathname,query:Array.from(t.searchParams.entries()).reduce((e,[r,n])=>(e[r]=n,e),{}),fragment:t.hash})}i(xbt,"createGetRequest");async function bbt(t,e){let n=await ybt(t.body).transformToString();if(t.statusCode===200){let s=JSON.parse(n);if(typeof s.AccessKeyId!="string"||typeof s.SecretAccessKey!="string"||typeof s.Token!="string"||typeof s.Expiration!="string")throw new cf("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:e});return{accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.Token,expiration:Ebt(s.Expiration)}}if(t.statusCode>=400&&t.statusCode<500){let s={};try{s=JSON.parse(n)}catch{}throw Object.assign(new cf(`Server responded with status: ${t.statusCode}`,{logger:e}),{Code:s.Code,Message:s.Message})}throw new cf(`Server responded with status: ${t.statusCode}`,{logger:e})}i(bbt,"getCredentials");var Bbt=i((t,e,r)=>async()=>{for(let n=0;n<e;++n)try{return await t()}catch{await new Promise(o=>setTimeout(o,r))}return await t()},"retryWrapper"),Rbt="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Nbt="http://169.254.170.2",Tbt="AWS_CONTAINER_CREDENTIALS_FULL_URI",vbt="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Pbt="AWS_CONTAINER_AUTHORIZATION_TOKEN",Qbt=i((t={})=>{t.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let e,r=t.awsContainerCredentialsRelativeUri??process.env[Rbt],n=t.awsContainerCredentialsFullUri??process.env[Tbt],s=t.awsContainerAuthorizationToken??process.env[Pbt],o=t.awsContainerAuthorizationTokenFile??process.env[vbt],a=t.logger?.constructor?.name==="NoOpLogger"||!t.logger?.warn?console.warn:t.logger.warn.bind(t.logger);if(r&&n&&(a("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),a("awsContainerCredentialsRelativeUri will take precedence.")),s&&o&&(a("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),a("awsContainerAuthorizationTokenFile will take precedence.")),r)e=`${Nbt}${r}`;else if(n)e=n;else throw new cf(`No HTTP credential provider host provided.
|
|
|
|
|
Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:t.logger});let c=new URL(e);Sbt(c,t.logger);let l=Abt.create({connectionTimeout:t.timeout??1e3}),u=t.timeout??1e3,d=Bbt(async()=>{let p=xbt(c);o?p.headers.Authorization=VTe((await hbt.readFile(o)).toString()):s&&(p.headers.Authorization=VTe(s));try{let m=await l.handle(p,{requestTimeout:u});return bbt(m.response).then(f=>fbt(f,"CREDENTIALS_HTTP","z"))}catch(m){throw new cf(String(m),{logger:t.logger})}},t.maxRetries??3,t.timeout??1e3);return async()=>{try{return await d()}finally{l.destroy?.()}}},"fromHttp"),VTe=i(t=>{if(t.includes(`\r
|
|
|
|
|
`))throw new cf("Authorization token contains invalid \\r\\n sequence.");return t},"validateToken");WTe.fromHttp=Qbt});function _bt(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:t.region},propertiesExtractor:i((e,r)=>({signingProperties:{config:e,context:r}}),"propertiesExtractor")}}function Dbt(t){return{schemeId:"smithy.api#noAuth"}}var YTe,JTe,jTe,gj=g(()=>{kn();we();YTe=i(async(t,e,r)=>({operation:Bt(e).operation,region:await ht(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultSSOOIDCHttpAuthSchemeParametersProvider");i(_bt,"createAwsAuthSigv4HttpAuthOption");i(Dbt,"createSmithyApiNoAuthHttpAuthOption");JTe=i(t=>{let e=[];return t.operation==="CreateToken"?e.push(Dbt(t)):e.push(_bt(t)),e},"defaultSSOOIDCHttpAuthSchemeProvider"),jTe=i(t=>{let e=hi(t);return Object.assign(e,{authSchemePreference:ht(t.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig")});var KTe,XTe,yj=g(()=>{KTe=i(t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),"resolveClientEndpointParameters"),XTe={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var zd,lS=g(()=>{zd={name:"@aws-sdk/nested-clients",version:"3.997.33",description:"Nested clients for AWS SDK packages.",homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",license:"Apache-2.0",author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/sdk-for-javascript/"},repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/nested-clients"},files:["./cognito-identity.d.ts","./cognito-identity.js","./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sso.d.ts","./sso.js","./sts.d.ts","./sts.js","dist-*/**"],sideEffects:!1,main:"./dist-cjs/index.js",module:"./dist-es/index.js",browser:{"./dist-es/submodules/cognito-identity/runtimeConfig":"./dist-es/submodules/cognito-identity/runtimeConfig.browser","./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sso/runtimeConfig":"./dist-es/submodules/sso/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},types:"./dist-types/index.d.ts",typesVersions:{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"],"*":["dist-types/ts3.4/submodules/*/index.d.ts"]}},"react-native":{},exports:{"./package.json":"./package.json","./sso-oidc":{types:"./dist-types/submodules/sso-oidc/index.d.ts",module:"./dist-es/submodules/sso-oidc/index.js",node:"./dist-cjs/submodules/sso-oidc/index.js",import:"./dist-es/submodules/sso-oidc/index.js",require:"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{types:"./dist-types/submodules/sts/index.d.ts",module:"./dist-es/submodules/sts/index.js",node:"./dist-cjs/submodules/sts/index.js",import:"./dist-es/submodules/sts/index.js",require:"./dist-cjs/submodules/sts/index.js"},"./signin":{types:"./dist-types/submodules/signin/index.d.ts",module:"./dist-es/submodules/signin/index.js",node:"./dist-cjs/submodules/signin/index.js",import:"./dist-es/submodules/signin/index.js",require:"./dist-cjs/submodules/signin/index.js"},"./cognito-identity":{types:"./dist-types/submodules/cognito-identity/index.d.ts",module:"./dist-es/submodules/cognito-identity/index.js",node:"./dist-cjs/submodules/cognito-identity/index.js",import:"./dist-es/submodules/cognito-identity/index.js",require:"./dist-cjs/submodules/cognito-identity/index.js"},"./sso":{types:"./dist-types/submodules/sso/index.d.ts",module:"./dist-es/submodules/sso/index.js",node:"./dist-cjs/submodules/sso/index.js",import:"./dist-es/submodules/sso/index.js",require:"./dist-cjs/submodules/sso/index.js"}},scripts:{build:"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline","build:es":"premove dist-es && tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_package_name"',"build:types":"premove dist-types && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types",lint:"node ../../scripts/validation/submodules-linter.js",prebuild:"yarn lint",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},dependencies:{"@aws-sdk/core":"^3.975.3","@aws-sdk/signature-v4-multi-region":"^3.996.41","@aws-sdk/types":"^3.974.2","@smithy/core":"^3.29.4","@smithy/fetch-http-handler":"^5.6.6","@smithy/node-http-handler":"^4.9.6","@smithy/types":"^4.16.1",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",premove:"4.0.0",typescript:"~5.8.3"},engines:{node
Line truncated
|
|
|
|
|
`),this.z=this.x.length}parse(){let e=this,{z:r}=e;for(;e.i<r&&(e.trim(),!(e.i>=r));)if(e.isNext("<?"))e.readTo("?>"),e.trim();else if(e.isNext("<!--"))e.readTo("-->"),e.trim();else if(e.isNext("<!DOCTYPE",!1))e.skipDoctype(),e.trim();else if(e.x[e.i]==="<"){let n=e.parseTag();return{[n.tag]:n.value}}else throw new Error("@aws-sdk XML parse error: unexpected content.");throw new Error("@aws-sdk XML parse error: no root element.")}isNext(e,r=!0){let n=this;return r?n.x.startsWith(e,n.i):n.x.toLowerCase().startsWith(e.toLowerCase(),n.i)}readTo(e){let r=this,n=r.x.indexOf(e,r.i);if(n===-1)throw new Error(`@aws-sdk XML parse error: expected "${e}" not found.`);let s=r.x.slice(r.i,n);return r.i=n+e.length,s}trim(){let e=this;for(;e.i<e.z&&` \r
|
|
|
|
|
`.includes(e.x[e.i]);)++e.i}readAttrValue(){let e=this,r=e.x[e.i];++e.i;let n="";for(;e.i<e.z&&e.x[e.i]!==r;)n+=e.x[e.i++];return++e.i,e.decodeEntities(n)}parseTag(){let e=this;++e.i;let r="";for(;e.i<e.z&&!` \r
|
|
|
|
|
>/`.includes(e.x[e.i]);)r+=e.x[e.i++];let n=!1,s=Object.create(null);for(;e.i<e.z&&(e.trim(),!">/".includes(e.x[e.i]));){let d="";for(;e.i<e.z&&!`= \r
|
|
|
|
|
>/?`.includes(e.x[e.i]);)d+=e.x[e.i++];if(e.trim(),e.x[e.i]!=="=")break;++e.i,e.trim(),s[d]=e.readAttrValue(),n=!0}if(e.i>=e.z)throw new Error("@aws-sdk XML parse error: unexpected end of input.");if(e.x[e.i]==="/"){if(++e.i,e.i>=e.z||e.x[e.i]!==">")throw new Error("@aws-sdk XML parse error: expected > at the end of self-closing tag.");return++e.i,Object.setPrototypeOf(s,Object.prototype),{tag:r,value:n?s:""}}if(e.x[e.i]!==">")throw new Error("@aws-sdk XML parse error: expected > at the end of opening tag.");++e.i;let o=[],a=[],c=!1;for(;e.i<e.z&&!e.isNext("</");)if(e.x[e.i]==="<")e.isNext("<!--")?e.readTo("-->"):e.isNext("<![CDATA[")?(e.i+=9,o.push(e.readTo("]]>"))):e.isNext("<?")?e.readTo("?>"):(c=!0,a.push(e.parseTag()));else{let d="";for(;e.i<e.z&&e.x[e.i]!=="<";)d+=e.x[e.i++];o.push(e.decodeEntities(d))}if(!e.isNext("</"))throw new Error(`@aws-sdk XML parse error: missing closing tag </${r}>.`);e.i+=2;let l=e.readTo(">").trim();if(l!==r)throw new Error(`@aws-sdk XML parse error: mismatched tags <${r}> and </${l}>.`);if(!n&&o.length===0&&!c)return{tag:r,value:""};if(!n&&!c){let d=o.length===1?o[0]:o.join("");return d.trim()===""&&d.includes(`
|
|
|
|
|
`)?{tag:r,value:""}:{tag:r,value:d}}let u=Object.create(null);for(let d of o)d.trim()===""&&d.includes(`
|
|
|
|
|
`)||(u["#text"]="#text"in u?u["#text"]+d:d);for(let d of a)d.tag in u?Array.isArray(u[d.tag])?u[d.tag].push(d.value):u[d.tag]=[u[d.tag],d.value]:u[d.tag]=d.value;for(let[d,p]of Object.entries(s))u[d]=p;return Object.setPrototypeOf(u,Object.prototype),{tag:r,value:u}}static ENTITIES={amp:"&",lt:"<",gt:">",quot:'"',apos:"'"};skipDoctype(){let e=this;e.i+=9;let r=0;for(;e.i<e.z;){let n=e.x[e.i];if(n==="[")++r;else if(n==="]")--r;else if(n===">"&&r===0){++e.i;return}++e.i}throw new Error("@aws-sdk XML parse error: unclosed DOCTYPE.")}decodeEntities(e){return e.replace(/&(?:#x([0-9a-fA-F]{1,6})|#(\d{1,7})|([a-zA-Z][a-zA-Z0-9]{0,30}));/g,(r,n,s,o)=>n?String.fromCharCode(parseInt(n,16)):s?String.fromCharCode(parseInt(s,10)):t.ENTITIES[o]??"")}};oD.XmlNode=qj;oD.XmlText=sD;oD.parseXML=i0t});var vve,Kd,aD=g(()=>{vve=R(iD());we();Re();st();Pe();Yd();Lj();Kd=class extends Ln{static{i(this,"XmlShapeDeserializer")}settings;stringDeserializer;constructor(e){super(),this.settings=e,this.stringDeserializer=new _d(e)}setSerdeContext(e){this.serdeContext=e,this.stringDeserializer.setSerdeContext(e)}read(e,r,n){let s=te.of(e),o=s.getMemberSchemas();if(s.isStructSchema()&&s.isMemberSchema()&&!!Object.values(o).find(u=>!!u.getMemberTraits().eventPayload)){let u={},d=Object.keys(o)[0];return o[d].isBlobSchema()?u[d]=r:u[d]=this.read(o[d],r),u}let c=(this.serdeContext?.utf8Encoder??xr)(r),l=this.parseXml(c);return this.readSchema(e,n?l[n]:l)}readSchema(e,r){let n=te.of(e);if(n.isUnitSchema())return;let s=n.getMergedTraits();if(n.isListSchema()&&!Array.isArray(r))return this.readSchema(n,[r]);if(r==null)return r;if(typeof r=="object"){let o=!!s.xmlFlattened;if(n.isListSchema()){let c=n.getValueSchema(),l=[],u=c.getMergedTraits().xmlName??"member",d=o?r:(r[0]??r)[u];if(d==null)return l;let p=Array.isArray(d)?d:[d];for(let m of p)l.push(this.readSchema(c,m));return l}let a={};if(n.isMapSchema()){let c=n.getKeySchema(),l=n.getValueSchema(),u;o?u=Array.isArray(r)?r:[r]:u=Array.isArray(r.entry)?r.entry:[r.entry];let d=c.getMergedTraits().xmlName??"key",p=l.getMergedTraits().xmlName??"value";for(let m of u){let f=m[d],A=m[p];a[f]=this.readSchema(l,A)}return a}if(n.isStructSchema()){let c=n.isUnionSchema(),l;c&&(l=new ay(r,a));for(let[u,d]of n.structIterator()){let p=d.getMergedTraits(),m=p.httpPayload?p.xmlName??d.getName():d.getMemberTraits().xmlName??u;c&&l.mark(m),r[m]!=null&&(a[u]=this.readSchema(d,r[m]))}return c&&l.writeUnknown(),a}if(n.isDocumentSchema())return r;throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${n.getName(!0)}`)}return n.isListSchema()?[]:n.isMapSchema()||n.isStructSchema()?{}:this.stringDeserializer.read(n,r)}parseXml(e){if(e.length){let r;try{r=(0,vve.parseXML)(e)}catch(a){throw a&&typeof a=="object"&&Object.defineProperty(a,"$responseBodyText",{value:e}),a}let n="#text",s=Object.keys(r)[0],o=r[s];return o[n]&&(o[s]=o[n],delete o[n]),Ym(o)}return{}}}});var uy,Hj=g(()=>{Re();st();Pe();Pe();Yd();uy=class extends Ln{static{i(this,"QueryShapeSerializer")}settings;buffer;constructor(e){super(),this.settings=e}write(e,r,n=""){this.buffer===void 0&&(this.buffer="");let s=te.of(e);if(n&&!n.endsWith(".")&&(n+="."),s.isBlobSchema())(typeof r=="string"||r instanceof Uint8Array)&&(this.writeKey(n),this.writeValue((this.serdeContext?.base64Encoder??Jt)(r)));else if(s.isBooleanSchema()||s.isNumericSchema()||s.isStringSchema())r!=null?(this.writeKey(n),this.writeValue(String(r))):s.isIdempotencyToken()&&(this.writeKey(n),this.writeValue(ta()));else if(s.isBigIntegerSchema())r!=null&&(this.writeKey(n),this.writeValue(String(r)));else if(s.isBigDecimalSchema())r!=null&&(this.writeKey(n),this.writeValue(r instanceof Ct?r.string:String(r)));else if(s.isTimestampSchema()){if(r instanceof Date)switch(this.writeKey(n),Ms(s,this.settings)){case 5:this.writeValue(r.toISOString().replace(".000Z","Z"));break;case 6:this.writeValue(Zi(r));break;case 7:this.writeValue(String(r.getTime()/1e3));break}}else if(s.isDocumentSchema())Array.isArray(r)?this.write(79,r,n):r instanceof Date?this.write(4,r,n):r instanceof Uint8Array?this.write(21,r,n):r&&typeof r=="object"?this.write(143,r,n):(this.writeKey(n),this.writeValue(String(r)));else if(s.isListSchema()){if(Array.isArray(r))if(r.length===0)this.settings.serializeEmptyLists&&(this.writeKey(n),this.writeValue(""));else{let o=s.getValueSchema(),a=this.settings.flattenLists||s.getMergedTraits().xmlFlattened,c=1;for(let l of r){if(l==null)continue;let u=o.getMergedTraits(),d=this.getKey("member",u.xmlName,u.ec2QueryName),p=a?`${n}${c}`:`${n}${d}.${c}`;this.write(o,l,p),++c}}}else if(s.isMapSchema()){if(r&&typeof r=="object"){let o=s.getKeySchema(),a=s.getValueSchema(),c=s.getMergedTraits().xmlFlattened,l=1;for(let u in r){let d=r[u];if(d==null)continue;let p=o.getMergedTraits(),m=this.getKey("key",p.xmlName,p.ec2QueryName),f=c?`${n}${l}.${m}`:`${n}entry.${l}.${m}`,A=a.getMergedTraits(),h=this.getKey("value",A.xmlName,A.ec2QueryName),E=c?`${n}${l}.${h}`:`${nLine truncated
|
|
|
|
|
Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:e});return t},"validateSsoProfile"),eRt=i((t={})=>async({callerClientConfig:e}={})=>{t.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:s,ssoRoleName:o,ssoSession:a}=t,{ssoClient:c}=t,l=jBt({profile:t.profile??e?.profile});if(!r&&!n&&!s&&!o&&!a){let d=(await KBt(t))[l];if(!d)throw new ya(`Profile ${l} was not found.`,{logger:t.logger});if(!wQe(d))throw new ya(`Profile ${l} is not configured with SSO credentials.`,{logger:t.logger});if(d?.sso_session){let C=(await XBt(t))[d.sso_session],w=` configurations in profile ${l} and sso-session ${d.sso_session}`;if(s&&s!==C.sso_region)throw new ya("Conflicting SSO region"+w,{tryNextLink:!1,logger:t.logger});if(r&&r!==C.sso_start_url)throw new ya("Conflicting SSO start_url"+w,{tryNextLink:!1,logger:t.logger});d.sso_region=C.sso_region,d.sso_start_url=C.sso_start_url}let{sso_start_url:p,sso_account_id:m,sso_region:f,sso_role_name:A,sso_session:h}=SQe(d,t.logger);return IQe({ssoStartUrl:p,ssoSession:h,ssoAccountId:m,ssoRegion:f,ssoRoleName:A,ssoClient:c,clientConfig:t.clientConfig,parentClientConfig:t.parentClientConfig,callerClientConfig:t.callerClientConfig,profile:l,filepath:t.filepath,configFilepath:t.configFilepath,ignoreCache:t.ignoreCache,logger:t.logger})}else{if(!r||!n||!s||!o)throw new ya('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:t.logger});return IQe({ssoStartUrl:r,ssoSession:a,ssoAccountId:n,ssoRegion:s,ssoRoleName:o,ssoClient:c,clientConfig:t.clientConfig,parentClientConfig:t.parentClientConfig,callerClientConfig:t.callerClientConfig,profile:l,filepath:t.filepath,configFilepath:t.configFilepath,ignoreCache:t.ignoreCache,logger:t.logger})}},"fromSSO");RD.fromSSO=eRt;RD.isSsoProfile=wQe;RD.validateSsoProfile=SQe});var E6=I(TD=>{var{SignatureV4:tRt,signatureV4aContainer:xQe}=ej(),VS={CrtSignerV4:null},g6="X-Amz-S3session-Token",bQe=g6.toLowerCase(),ND=class extends tRt{static{i(this,"SignatureV4SignWithCredentials")}async signWithCredentials(e,r,n){let s=BQe(r);e.headers[bQe]=r.sessionToken;let o=this;return RQe(o,s),o.signRequest(e,n??{})}async presignWithCredentials(e,r,n){let s=BQe(r);return delete e.headers[bQe],e.headers[g6]=r.sessionToken,e.query=e.query??{},e.query[g6]=r.sessionToken,RQe(this,s),this.presign(e,n)}};function BQe(t){return{accessKeyId:t.accessKeyId,secretAccessKey:t.secretAccessKey,expiration:t.expiration}}i(BQe,"getCredentialsWithoutSessionToken");function RQe(t,e){let r=t.credentialProvider;t.credentialProvider=()=>(t.credentialProvider=r,Promise.resolve(e))}i(RQe,"setSingleOverride");var y6=class{static{i(this,"SignatureV4MultiRegion")}sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return typeof VS.CrtSignerV4=="function"?"crt":typeof xQe.SignatureV4a=="function"?"js":"none"}constructor(e){this.sigv4Signer=new ND(e),this.signerOptions=e}async sign(e,r={}){return r.signingRegion==="*"?this.getSigv4aSigner().sign(e,r):this.sigv4Signer.sign(e,r)}async signWithCredentials(e,r,n={}){if(n.signingRegion==="*"){let s=this.getSigv4aSigner(),o=VS.CrtSignerV4;if(o&&s instanceof o)return s.signWithCredentials(e,r,n);throw new Error(`signWithCredentials with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.signWithCredentials(e,r,n)}async presign(e,r={}){if(r.signingRegion==="*"){let n=this.getSigv4aSigner(),s=VS.CrtSignerV4;if(s&&n instanceof s)return n.presign(e,r);throw new Error(`presign with signingRegion '*' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`)}return this.sigv4Signer.presign(e,r)}async presignWithCredentials(e,r,n={}){if(n.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(e,r,n)}getSigv4aSigner(){if(!this.sigv4aSigner){let e=VS.CrtSignerV4,r=xQe.SignatureV4a;if(this.signerOptions.runtime==="node"){if(!e&&!r)throw new Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sd
Line truncated
|
|
|
|
|
Multiple credential sources detected:
|
|
|
|
|
Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
|
|
|
|
|
This SDK will proceed with the AWS_PROFILE value.
|
|
|
|
@@ -120,92 +142,85 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht
|
|
|
|
|
However, a future version may change this behavior to prefer the ENV static credentials.
|
|
|
|
|
Please ensure that your environment only sets either the AWS_PROFILE or the
|
|
|
|
|
AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
|
|
|
|
|
`),JSe=!0)),new qI.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:t.logger,tryNextLink:!0});return t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),rW.fromEnv(t)()},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:s,ssoRoleName:o,ssoSession:i}=t;if(!r&&!n&&!s&&!o&&!i)throw new qI.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:t.logger});let{fromSSO:a}=await Promise.resolve().then(()=>S(mj()));return a(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:r}=await Promise.resolve().then(()=>S(jSe()));return r(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:r}=await Promise.resolve().then(()=>S(Kj()));return r(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:r}=await Promise.resolve().then(()=>S(Zj()));return r(t)(e)},async()=>(t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await Tgt(t))()),async()=>{throw new qI.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:t.logger})}],KSe),vgt=t=>t?.expiration!==void 0,KSe=t=>t?.expiration!==void 0&&t.expiration.getTime()-Date.now()<3e5;pQ.credentialsTreatedAsExpired=KSe;pQ.credentialsWillNeedRefresh=vgt;pQ.defaultProvider=_gt});var aRe=C(IQ=>{"use strict";Object.defineProperty(IQ,"__esModule",{value:!0});IQ.ruleSet=void 0;var iRe="required",Qt="fn",_t="argv",Jn="ref",xA="url",wA="properties",BA="headers",XSe=!0,ZSe="isSet",SA="booleanEquals",vg="error",ot="endpoint",ea="tree",ta="PartitionResult",eRe={[iRe]:!0,default:!1,type:"boolean"},tRe={[iRe]:!1,type:"string"},rRe={[Jn]:"Endpoint"},tn={[Qt]:SA,[_t]:[{[Jn]:"UseFIPS"},!0]},rn={[Qt]:SA,[_t]:[{[Jn]:"UseDualStack"},!0]},Dg={},AQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:ta},"name"]},"aws"]},wn={[Qt]:SA,[_t]:[{[Jn]:"UseFIPS"},!1]},Bn={[Qt]:SA,[_t]:[{[Jn]:"UseDualStack"},!1]},Rl={[xA]:"https://api.ecr.{Region}.{PartitionResult#dnsSuffix}",[wA]:{},[BA]:{}},dd={[xA]:"https://ecr.{Region}.{PartitionResult#dualStackDnsSuffix}",[wA]:{},[BA]:{}},Nl={[xA]:"https://api.ecr-fips.{Region}.{PartitionResult#dnsSuffix}",[wA]:{},[BA]:{}},pd={[xA]:"https://ecr-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",[wA]:{},[BA]:{}},mQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:ta},"name"]},"aws-us-gov"]},fQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:ta},"name"]},"aws-cn"]},gQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:ta},"name"]},"aws-iso"]},hQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:ta},"name"]},"aws-iso-b"]},yQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:ta},"name"]},"aws-iso-e"]},EQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:ta},"name"]},"aws-iso-f"]},CQ={[Qt]:"stringEquals",[_t]:[{[Qt]:"getAttr",[_t]:[{[Jn]:ta},"name"]},"aws-eusc"]},nRe={[Qt]:"getAttr",[_t]:[{[Jn]:ta},"supportsFIPS"]},sRe={[Qt]:SA,[_t]:[!0,{[Qt]:"getAttr",[_t]:[{[Jn]:ta},"supportsDualStack"]}]},oRe=[{[Jn]:"Region"}],Dgt={version:"1.0",parameters:{UseDualStack:eRe,UseFIPS:eRe,Endpoint:tRe,Region:tRe},rules:[{conditions:[{[Qt]:ZSe,[_t]:[rRe]}],rules:[{conditions:[tn],error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:vg},{rules:[{conditions:[rn],error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:vg},{endpoint:{[xA]:rRe,[wA]:Dg,[BA]:Dg},type:ot}],type:ea}],type:ea},{rules:[{conditions:[{[Qt]:ZSe,[_t]:oRe}],rules:[{conditions:[{[Qt]:"aws.partition",[_t]:oRe,assign:ta}],rules:[{conditions:[AQ,wn,Bn],endpoint:Rl,type:ot},{conditions:[AQ,wn,rn],endpoint:dd,type:ot},{conditions:[AQ,tn,Bn],endpoint:Nl,type:ot},{conditions:[AQ,tn,rn],endpoint:pd,type:ot},{conditions:[mQ,wn,Bn],endpoint:Rl,type:ot},{conditions:[mQ,wn,rn],endpoint:dd,type:ot},{conditions:[mQ,tn,Bn],endpoint:Nl,type:ot},{conditions:[mQ,tn,rn],endpoint:pd,type:ot},{conditions:[fQ,wn,Bn],endpoint:Rl,type:ot},{conditions:[fQ,wn,rn],endpoint:dd,type:ot},{conditions:[fQ,tn,Bn],endpoint:Nl,type:ot},{conditions:[fQ,tn,rn],endpoint:pd,type:ot},{conditions:[gQ,wn,Bn],endpoint:Rl,type:ot},{conditions:[gQ,wn,rn],endpoint:dd,type:ot},{conditions:[gQ,tn,Bn],endpoint:Nl,type:ot},{conditions:[gQ,tn,rn],endpoint:pd,type:ot},{conditions:[hQ,wn,Bn],endpoint:Rl,type:ot},{conditions:[hQ,wn,rn],endpoint:dd,type:ot},{conditions:[hQ,tn,Bn],endpoint:Nl,type:ot},{conditions:[hQ,tn,rn],endpoint:pd,type:ot},{conditions:[yQ,wn,Bn],endpoint:Rl,type:ot},{conditions:[yQ,wn,rn],endpoint:dd,type:ot},{conditions:[yQ,tn,Bn],endpoint:Nl,type:ot},{conditions:[yQ,tn,rn],endpoint:pd,type:ot},{conditions:[EQ,wn,Bn],endpoint:Rl,type:ot},{conditions:[EQ,wn,rn],endpoint:dd,type:ot},{conditions:[EQ,tn,Bn],endpoint:Nl,type:o
Line truncated
|
|
|
|
|
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}function f7(t){process.exitCode=gO.Failure,Dm(t)}function ru(){return process.env.RUNNER_DEBUG==="1"}function k(t){Cd("debug",{},t)}function Dm(t,e={}){Cd("error",Rv(e),t instanceof Error?t.toString():t)}function Rr(t,e={}){Cd("warning",Rv(e),t instanceof Error?t.toString():t)}function Ue(t){process.stdout.write(t+A7.EOL)}function h$e(t){Tv("group",t)}function y$e(){Tv("endgroup")}function ny(t,e){return g$e(this,void 0,void 0,function*(){h$e(t);let r;try{r=yield e()}finally{y$e()}return r})}function jd(t,e){if(process.env.GITHUB_STATE||"")return y3("STATE",E3(t,e));Cd("save-state",{name:t},vl(e))}function g7(t){return process.env[`STATE_${t}`]||""}var s0=S(require("fs"),1),zG=S(require("os"),1),VG=S(require("path"),1);var Ts=S(require("fs"),1);var m2e=S(LO(),1);var bw=S(require("os"),1),nu=S(require("path"),1);var ko=S(LO(),1);var ite=require("assert");var ote=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};var rvt=process.platform==="win32",nvt=process.platform==="darwin";function OO(t,e,r,n){return ote(this,void 0,void 0,function*(){if(r=ko.clean(r)||r,n=n||bw.arch(),k(`Caching tool ${e} ${r} ${n}`),k(`source dir: ${t}`),!Ts.statSync(t).isDirectory())throw new Error("sourceDir is not a directory");let s=yield h2e(e,r,n);for(let o of Ts.readdirSync(t)){let i=nu.join(t,o);yield s7(i,s,{recursive:!0})}return y2e(e,r,n),s})}function ate(t,e,r){if(!t)throw new Error("toolName parameter is required");if(!e)throw new Error("versionSpec parameter is required");if(r=r||bw.arch(),!cte(e)){let s=g2e(t,r);e=E2e(s,e)}let n="";if(e){e=ko.clean(e)||"";let s=nu.join(xw(),t,e,r);k(`checking cache: ${s}`),Ts.existsSync(s)&&Ts.existsSync(`${s}.complete`)?(k(`Found tool in cache ${t} ${e} ${r}`),n=s):k("not found")}return n}function g2e(t,e){let r=[];e=e||bw.arch();let n=nu.join(xw(),t);if(Ts.existsSync(n)){let s=Ts.readdirSync(n);for(let o of s)if(cte(o)){let i=nu.join(n,o,e||"");Ts.existsSync(i)&&Ts.existsSync(`${i}.complete`)&&r.push(o)}}return r}function h2e(t,e,r){return ote(this,void 0,void 0,function*(){let n=nu.join(xw(),t,ko.clean(e)||e,r||"");k(`destination ${n}`);let s=`${n}.complete`;return yield lO(n),yield lO(s),yield Yd(n),n})}function y2e(t,e,r){let s=`${nu.join(xw(),t,ko.clean(e)||e,r||"")}.complete`;Ts.writeFileSync(s,""),k("finished caching tool")}function cte(t){let e=ko.clean(t)||"";k(`isExplicit: ${e}`);let r=ko.valid(e)!=null;return k(`explicit? ${r}`),r}function E2e(t,e){let r="";k(`evaluating ${t.length} versions`),t=t.sort((n,s)=>ko.gt(n,s)?1:-1);for(let n=t.length-1;n>=0;n--){let s=t[n];if(ko.satisfies(s,e)){r=s;break}}return r?k(`matched: ${r}`):k("match not found"),r}function xw(){let t=process.env.RUNNER_TOOL_CACHE||"";return(0,ite.ok)(t,"Expected RUNNER_TOOL_CACHE to be defined"),t}var $E=S(require("path"),1);var Um=S(require("fs"),1);function FO(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,matchDirectories:!0,omitBrokenSymbolicLinks:!0,excludeHiddenFiles:!1};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,k(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,k(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.matchDirectories=="boolean"&&(e.matchDirectories=t.matchDirectories,k(`matchDirectories '${e.matchDirectories}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,k(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`)),typeof t.excludeHiddenFiles=="boolean"&&(e.excludeHiddenFiles=t.excludeHiddenFiles,k(`excludeHiddenFiles '${e.excludeHiddenFiles}'`))),e}var Nw=S(require("path"),1);var Lm=S(require("path"),1),su=S(require("assert"),1),ou=process.platform==="win32";function kc(t){if(t=Dc(t),ou&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=Lm.dirname(t);return ou&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=Dc(e)),e}function ww(t,e){if((0,su.default)(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),(0,su.default)(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),dy(e))return e;if(ou){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let r=process.cwd();return(0,su.default)(r.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${r}'`),e[0].toUpperCase()===r[0].toUpperCase()?e.length===2?`${e[0]}:\\${r.substr(3)}`:(r.endsWith("\\")||(r+="\\"),`${e[0]}:\\${r.substr(3)}${e.substr(2)}`):`${e[0]}:\\${e.substr(2)}`}else if(Pi(e).match(/^\\$|^\\[^\\]/)){let r=process.cwd();return(0,su.default)(r.match(/^[A-Z]:\\/i),`Expected current directory to start with an absolute drive root. Actual '${r}'`),`${r[0]}:\\${e.substrLine truncated
|
|
|
|
|
`),ske=!0)),new JD("AWS_PROFILE is set, skipping fromEnv provider.",{logger:t.logger,tryNextLink:!0});return t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),NTt(t)()},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");let{ssoStartUrl:r,ssoAccountId:n,ssoRegion:s,ssoRoleName:o,ssoSession:a}=t;if(!r&&!n&&!s&&!o&&!a)throw new JD("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:t.logger});let{fromSSO:c}=h6();return c(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");let{fromIni:r}=rke();return r(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");let{fromProcess:r}=o9();return r(t)(e)},async e=>{t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");let{fromTokenFile:r}=a9();return r(t)(e)},async()=>(t.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await PTt(t))()),async()=>{throw new JD("Could not load credentials from any providers",{tryNextLink:!1,logger:t.logger})}],oke),"defaultProvider"),kTt=i(t=>t?.expiration!==void 0,"credentialsWillNeedRefresh"),oke=i(t=>t?.expiration!==void 0&&t.expiration.getTime()-Date.now()<3e5,"credentialsTreatedAsExpired");jD.credentialsTreatedAsExpired=oke;jD.credentialsWillNeedRefresh=kTt;jD.defaultProvider=DTt});var tUe=I(y=>{var{awsEndpointFunctions:LTt,emitWarningIfUnsupportedVersion:OTt,createDefaultUserAgentProvider:MTt,NODE_APP_ID_CONFIG_OPTIONS:FTt,getAwsRegionExtensionConfiguration:UTt,resolveAwsRegionExtensionConfiguration:qTt,resolveUserAgentConfig:GTt,resolveHostHeaderConfig:HTt,getUserAgentPlugin:$Tt,getHostHeaderPlugin:zTt,getLoggerPlugin:VTt,getRecursionDetectionPlugin:WTt}=(pt(),ee(da)),{getHttpAuthSchemeEndpointRuleSetPlugin:YTt,DefaultIdentityProviderConfig:JTt,getHttpSigningPlugin:jTt,createPaginator:Rf}=(ds(),ee(E5)),{normalizeProvider:dke,getSmithyContext:KTt,ServiceException:XTt,NoOpLogger:ZTt,emitWarningIfUnsupportedVersion:evt,loadConfigsForDefaultMode:tvt,getDefaultExtensionConfiguration:rvt,resolveDefaultRuntimeConfig:nvt,Client:pke,makeBuilder:svt,createWaiter:$L,checkExceptions:mke,WaiterState:Ey,createAggregatedClient:ovt}=(we(),ee(Ag)),{Command:ivt}=(we(),ee(Ag));y.$Command=ivt;y.__Client=pke;var{resolveDefaultsModeConfig:avt,loadConfig:xf,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS:cvt,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS:lvt,NODE_REGION_CONFIG_OPTIONS:uvt,NODE_REGION_CONFIG_FILE_OPTIONS:dvt,resolveRegionConfig:pvt}=(It(),ee(bo)),{BinaryDecisionDiagram:mvt,EndpointCache:fvt,decideEndpoint:Avt,customEndpointFunctions:hvt,resolveEndpointConfig:gvt,getEndpointPlugin:yvt}=(Rt(),ee(KJ)),{parseUrl:Evt,getHttpHandlerExtensionConfiguration:Cvt,resolveHttpHandlerRuntimeConfig:Ivt,getContentLengthPlugin:wvt}=(Re(),ee(Od)),{DEFAULT_RETRY_MODE:Svt,NODE_RETRY_MODE_CONFIG_OPTIONS:xvt,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:bvt,resolveRetryConfig:Bvt,getRetryPlugin:Rvt}=(No(),ee(n5)),{TypeRegistry:fke,getSchemaSerdePlugin:Nvt}=(st(),ee(PY)),{resolveAwsSdkSigV4Config:Tvt,AwsSdkSigV4Signer:vvt,NODE_AUTH_SCHEME_PREFERENCE_OPTIONS:Pvt}=(kn(),ee(k_)),{defaultProvider:Qvt}=l9(),{toUtf8:_vt,fromUtf8:Dvt,toBase64:kvt,fromBase64:Lvt,calculateBodyLength:Ovt}=(Pe(),ee(_g)),{streamCollector:Mvt,NodeHttpHandler:Fvt}=lu(),{AwsJson1_1Protocol:Uvt}=(pf(),ee(Jj)),{Sha256:qvt}=(iu(),ee(w8)),Gvt=i(async(t,e,r)=>({operation:KTt(e).operation,region:await dke(t.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),"defaultECRHttpAuthSchemeParametersProvider");function Hvt(t){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"ecr",region:t.region},propertiesExtractor:i((e,r)=>({signingProperties:{config:e,context:r}}),"propertiesExtractor")}}i(Hvt,"createAwsAuthSigv4HttpAuthOption");var $vt=i(t=>{let e=[];switch(t.operation){default:e.push(Hvt(t))}return e},"defaultECRHttpAuthSchemeProvider"),zvt=i(t=>{let e=Tvt(t);return Object.assign(e,{authSchemePreference:dke(t.authSchemePreference??[])})},"resolveHttpAuthSchemeConfig"),Vvt=i(t=>Object.assign(t,{useDualstackEndpoint:t.useDualstackEndpoint??!1,useFipsEndpoint:t.useFipsEndpoint??!1,defaultSigningName:"ecr"}),"resolveClientEndpointParameters"),Wvt={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},Yvt="3.1090.0",Jvt={version:Yvt},Cy="ref",bf=-1,KD=!0,ike="isSet",d9="PartitionResult",ip="stringEquals",XD="booleanEquals",u9="getAttr",ake={[Cy]:"Endpoint"},ap={fn:u9,argv:[{[Cy]:d9},"name"]},cke={[Cy]:d9},Bf={},lke=[{[Cy]:"Region"}],uke={conditions:[[ike,[ake]],[ike,lke],["aws.partition",lke,d9],[ip,[ap,"aws-eusc"]],[ip,[ap,"aws-iso-f"]],[ip,[ap,"aws-iso-e"]],[ip,[ap,"aws-iso-b"]],[ip,[ap,"aws-iso"]],[ip,[ap,"aws-cn"]],[ip,[ap,"aws-us-gov"]],[ip,[ap,"aws"]],[XD,[{[Cy]:"
Line truncated
|
|
|
|
|
|
|
|
|
|
Error Code : ${a.statusCode}
|
|
|
|
|
|
|
|
|
|
Error Message: ${a.message}`)})).result)===null||r===void 0?void 0:r.value;if(!o)throw new Error("Response json body do not have ID Token field");return o})}static getIDToken(e){return Dse(this,void 0,void 0,function*(){try{let r=t.getIDTokenUrl();if(e){let s=encodeURIComponent(e);r=`${r}&audience=${s}`}v(`ID token url is ${r}`);let n=yield t.getCall(r);return xn(n),n}catch(r){throw new Error(`Error message: ${r.message}`)}})}};var Lse=require("os"),ME=require("fs");var zU=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},{access:U6e,appendFile:q6e,writeFile:G6e}=ME.promises,kse="GITHUB_STEP_SUMMARY";var VU=class{static{i(this,"Summary")}constructor(){this._buffer=""}filePath(){return zU(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[kse];if(!e)throw new Error(`Unable to find environment variable for $${kse}. Check if your runtime environment supports job summaries.`);try{yield U6e(e,ME.constants.R_OK|ME.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(([o,a])=>` ${o}="${a}"`).join("");return r?`<${e}${s}>${r}</${e}>`:`<${e}${s}>`}write(e){return zU(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?G6e:q6e)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return zU(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(Lse.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(""),o=this.wrap(n,s);return this.addRaw(o).addEOL()}addTable(e){let r=e.map(s=>{let o=s.map(a=>{if(typeof a=="string")return this.wrap("td",a);let{header:c,data:l,colspan:u,rowspan:d}=a,p=c?"th":"td",m=Object.assign(Object.assign({},u&&{colspan:u}),d&&{rowspan:d});return this.wrap(p,l,m)}).join("");return this.wrap("tr",o)}).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:o}=n||{},a=Object.assign(Object.assign({},s&&{width:s}),o&&{height:o}),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",o=this.wrap(s,e);return this.addRaw(o).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()}addLink(e,r){let n=this.wrap("a",e,{href:r});return this.addRaw(n).addEOL()}},Y3t=new VU;var r2=R(require("os"),1);var t2=require("string_decoder");var UE=R(require("os"),1),e2=R(require("events"),1),Jse=R(require("child_process"),1),jse=R(require("path"),1);var $se=require("assert"),to=R(require("path"),1);var FE=R(require("fs"),1),Ou=R(require("path"),1);var WU=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},{chmod:YU,copyFile:Mse,lstat:k0,mkdir:Fse,open:Z3t,readdir:JU,rename:H6e,rm:Use,rmdir:eVt,stat:qp,symlink:qse,unlink:jU}=FE.promises,_a=process.platform==="win32";function Gse(t){return WU(this,void 0,void 0,function*(){let e=yield FE.promises.readlink(t);return _a&&!e.endsWith("\\")?`${e}\\`:e})}i(Gse,"readlink");var tVt=FE.constants.O_RDONLY;function _A(t){return WU(this,void 0,void 0,function*(){try{yield qp(t)}catch(e){if(e.code==="ENOENT")return!1;throw e}return!0})}i(_A,"exists");function L0(t){if(t=$6e(t),!t)throw new Error('isRooted() parameter "p" cannot be empty');return _a?t.startsWith("\\")||/^[A-Z]:/i.test(t):t.startsWith("/")}i(L0,"isRooted");function KU(t,e){return WU(this,void 0,void 0,function*(){let r;try{r=yield qp(t)}catch(s){s.code!=="ENOENT"&&console.log(`Unexpected error attempting to determine if executable file exists '${t}': ${s}`)}if(r&&r.isFile()){if(_a){let s=Ou.extname(t).toUpperCase();if(e.some(o=>o.toULine truncated
|
|
|
|
|
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}i(roe,"getBooleanInput");function noe(t){process.exitCode=n2.Failure,kA(t)}i(noe,"setFailed");function $p(){return process.env.RUNNER_DEBUG==="1"}i($p,"isDebug");function v(t){mp("debug",{},t)}i(v,"debug");function kA(t,e={}){mp("error",mM(e),t instanceof Error?t.toString():t)}i(kA,"error");function Ar(t,e={}){mp("warning",mM(e),t instanceof Error?t.toString():t)}i(Ar,"warning");function be(t){process.stdout.write(t+toe.EOL)}i(be,"info");function J6e(t){AM("group",t)}i(J6e,"startGroup");function j6e(){AM("endgroup")}i(j6e,"endGroup");function HE(t,e){return eoe(this,void 0,void 0,function*(){J6e(t);let r;try{r=yield e()}finally{j6e()}return r})}i(HE,"group");function zp(t,e){if(process.env.GITHUB_STATE||"")return eK("STATE",tK(t,e));mp("save-state",{name:t},gu(e))}i(zp,"saveState");function soe(t){return process.env[`STATE_${t}`]||""}i(soe,"getState");function ooe(t){return eoe(this,void 0,void 0,function*(){return yield D0.getIDToken(t)})}i(ooe,"getIDToken");var $T=R(require("fs"),1),i4=R(require("os"),1),a4=R(require("path"),1);var aoe=R(require("os"),1);function $E(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}i($E,"toCommandValue");function coe(t,e,r){let n=new s2(t,e,r);process.stdout.write(n.toString()+aoe.EOL)}i(coe,"issueCommand");var ioe="::",s2=class{static{i(this,"Command")}constructor(e,r,n){e||(e="missing.command"),this.command=e,this.properties=r,this.message=n}toString(){let e=ioe+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}=${X6e(s)}`)}}return e+=`${ioe}${K6e(this.message)}`,e}};function K6e(t){return $E(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}i(K6e,"escapeData");function X6e(t){return $E(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}i(X6e,"escapeProperty");var F0=R(Of(),1),e9e=R(Up(),1);var Da;(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"})(Da||(Da={}));var loe;(function(t){t.Accept="accept",t.ContentType="content-type"})(loe||(loe={}));var uoe;(function(t){t.ApplicationJson="application/json"})(uoe||(uoe={}));var _Vt=[Da.MovedPermanently,Da.ResourceMoved,Da.SeeOther,Da.TemporaryRedirect,Da.PermanentRedirect],DVt=[Da.BadGateway,Da.ServiceUnavailable,Da.GatewayTimeout];var poe=require("os"),zE=require("fs");var o2=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},{access:n9e,appendFile:s9e,writeFile:o9e}=zE.promises,doe="GITHUB_STEP_SUMMARY";var i2=class{static{i(this,"Summary")}constructor(){this._buffer=""}filePath(){return o2(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[doe];if(!e)throw new Error(`Unable to find environment variable for $${doe}. Check if your runtime environment supports job summaries.`);try{yield n9e(e,zE.constants.R_OK|zE.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(([o,a])=>` ${o}="${a}"`).join("");return r?`<${e}${s}>${r}</${e}>`:`<${e}${s}>`}write(e){return o2(this,void 0,void 0,function*(){let r=!!e?.overwrite,n=yield this.filePath();return yield(r?o9e:s9e)(n,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return o2(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return thisLine truncated
|
|
|
|
|
`),e=e.replace(/\r/g,`
|
|
|
|
|
`));let s=e.split(`
|
|
|
|
|
`).map(o=>o.trim());for(let o of s)!o||o.startsWith("#")||n.patterns.push(new my(o));return n.searchPaths.push(...UO(n.patterns)),n})}static stat(e,r,n){return zO(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield Um.promises.stat(e.path)}catch(o){if(o.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){k(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw o}else s=yield Um.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let o=yield Um.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(i=>i===o)){k(`Symlink cycle detected for path '${e.path}' and realpath '${o}'`);return}n.push(o)}return s})}};var W2e=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};function kte(t,e){return W2e(this,void 0,void 0,function*(){return yield Rw.create(t,e)})}var Gw=S(require("crypto"),1),Gm=S(require("fs"),1),ep=S(require("path"),1),Sne=S(wne(),1),Rne=S(require("util"),1);var xy;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(xy||(xy={}));var is;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(is||(is={}));var ro;(function(t){t.GNU="gnu",t.BSD="bsd"})(ro||(ro={}));var qw=2,$w=5e3,dF=5e3,pF=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,Bne=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,wy="cache.tar",AF="manifest.txt",ADt=10*Math.pow(1024,3);var $m=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},VYe=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(o){r[o]=t[o]&&function(i){return new Promise(function(a,c){i=t[o](i),s(a,c,i.done,i.value)})}}function s(o,i,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},i)}},YYe="1.0";function By(){return $m(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=ep.join(n,"actions","temp")}let r=ep.join(e,Gw.randomUUID());return yield Yd(r),r})}function Ea(t){return Gm.statSync(t).size}function mF(t){return $m(this,void 0,void 0,function*(){var e,r,n,s,o;let i=[],a=(o=process.env.GITHUB_WORKSPACE)!==null&&o!==void 0?o:process.cwd(),c=yield kte(t.join(`
|
|
|
|
|
`),{implicitDescendants:!1});try{for(var l=!0,u=VYe(c.globGenerator()),d;d=yield u.next(),e=d.done,!e;l=!0){s=d.value,l=!1;let A=ep.relative(a,s).replace(new RegExp(`\\${ep.sep}`,"g"),"/");k(`Matched: ${A}`),A===""?i.push("."):i.push(`${A}`)}}catch(p){r={error:p}}finally{try{!l&&!e&&(n=u.return)&&(yield n.call(u))}finally{if(r)throw r.error}}return i})}function Sy(t){return $m(this,void 0,void 0,function*(){return Rne.promisify(Gm.unlink)(t)})}function Nne(t){return $m(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),k(`Checking ${e} ${r.join(" ")}`);try{yield tu(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:s=>n+=s.toString(),stderr:s=>n+=s.toString()}})}catch(s){k(s.message)}return n=n.trim(),k(n),n})}function Ry(){return $m(this,void 0,void 0,function*(){let t=yield Nne("zstd",["--quiet"]),e=Sne.clean(t);return k(`zstd version: ${e}`),t===""?is.Gzip:is.ZstdWithoutLong})}function lu(t){return t===is.Gzip?xy.Gzip:xy.Zstd}function Tne(){return $m(this,void 0,void 0,function*(){return Gm.existsSync(pF)?pF:(yield Nne("tar")).toLowerCase().includes("gnu tar")?Ns("tar"):""})}function fF(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}function Hm(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(YYe),Gw.createHash("sha256").update(n.join("|")).digest("hex")}function Pne(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}var Ef=S(require("fs"),1),Mce=require("url");var Ca=class extends Error{constructor(e){super(e),this.name="AbortError"}};var Qne=require("node:os"),_ne=S(require("node:util"),1),vne=S(require("node:process"),1);function Dne(t,...e){vne.default.stderr.write(`${_ne.default.format(t,...e)}${Qne.EOL}`)}var kne=typeof process<"u"&&process.env&&process.env.DEBUG||void 0,One,gF=[],hF=[],zw=[];kne&&yF(kne);var Fne=Object.assign(t=>Mne(t),{enable:yF,enabled:EF,disable:jYe,log:Dne});function yF(t){One=t,gF=[],hF=[];let e=t.split(",").map(r=>r.trim());for(let r of e)r.startsWith("-")?hF.push(r.substring(1)):gF.push(r);for(let r of zw)r.enabled=EF(r.namespace)}function EF(t){if(t.endsWith("*"))return!0;for(let e of hF)if(Lne(t,e))return!1;for(let e of gF)if(Lne(t,e))return!0;return!1}function Lne(t,e){if(e.indexOf("*")===-1)return t===e;let r=e;if(e.indexOf("**")!==-1){let p=[],A="";for(let g of e)g==="*"&&A==="*"||(A=g,p.push(g));r=p.join("")}let n=0,s=0,o=r.length,i=t.length,a=-1,c=-1;for(;n<i&&s<o;)if(r[s]==="*"){if(a=s,s++,s===o)return!0;for(;t[n]!==r[s];)if(n++,n===i)return!1;c=n,n++,s++;continue}else if(r[s]===t[n])s++,n++;else if(a>=0){if(s=a+1,n=c+1,n===i)return!1;for(;t[n]!==r[s];)if(n++,n===i)return!1;c=n,n++,s++;continue}else return!1;let l=n===t.length,u=s===r.length,d=s===r.length-1&&r[s]==="*";return l&&(u||d)}function jYe(){let t=One||"";return yF(""),t}function Mne(t){let e=Object.assign(r,{enabled:EF(t),destroy:WYe,log:Fne.log,namespace:t,extend:JYe});function r(...n){e.enabled&&(n.length>0&&(n[0]=`${t} ${n[0]}`),e.log(...n))}return zw.push(e),e}function WYe(){let t=zw.indexOf(this);return t>=0?(zw.splice(t,1),!0):!1}function JYe(t){let e=Mne(`${this.namespace}:${t}`);return e.log=this.log,e}var zm=Fne;var CF=["verbose","info","warning","error"],Une={verbose:400,info:300,warning:200,error:100};function qne(t,e){e.log=(...r)=>{t.log(...r)}}function $ne(t){return CF.includes(t)}function Vw(t){let e=new Set,r=typeof process<"u"&&process.env&&process.env[t.logLevelEnvVarName]||void 0,n,s=zm(t.namespace);s.log=(...u)=>{zm.log(...u)};function o(u){if(u&&!$ne(u))throw new Error(`Unknown log level '${u}'. Acceptable values: ${CF.join(",")}`);n=u;let d=[];for(let p of e)i(p)&&d.push(p.namespace);zm.enable(d.join(","))}r&&($ne(r)?o(r):console.error(`${t.logLevelEnvVarName} set to unknown log level '${r}'; logging is not enabled. Acceptable values: ${CF.join(", ")}.`));function i(u){return!!(n&&Une[u.level]<=Une[n])}function a(u,d){let p=Object.assign(u.extend(d),{level:d});if(qne(u,p),i(p)){let A=zm.disable();zm.enable(A+","+p.namespace)}return e.add(p),p}function c(){return n}function l(u){let d=s.extend(u);return qne(s,d),{error:a(d,"error"),warning:a(d,"warning"),info:a(d,"info"),verbose:a(d,"verbose")}}return{setLogLevel:o,getLogLevel:c,createClientLogger:l,logger:s}}var Gne=Vw({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"}),KYe=Gne.logger;function Ny(t){return Gne.createClientLogger(t)}function Yw(t){return t.toLowerCase()}function*XYe(t){for(let e of t.values())yield[e.name,e.value]}var IF=class{_headersMap;constructor(e){if(this._headersMap=new Map,e)for(let r of Object.keys(e))this.set(r,e[r])}set(e,r){this._headersMap.set(Yw(e),{name:e,value:String(r).trim()})}get(e){return this._headersMap.get(Yw(e))?.value}has(e){return this._headersMap.has(Yw(e))}delete(e){this._headersMap.delete(Yw(e))}toJSON(e={}){let r={};if(e.preserveCase)for(let n of this._headersMap.value
Line truncated
|
|
|
|
|
${tje.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function Jw(t){return t instanceof as?!0:rp(t)&&t.name==="RestError"}function Ps(t,e){return Buffer.from(t,e)}var Kw=S(require("node:http"),1),Xw=S(require("node:https"),1),BF=S(require("node:zlib"),1),jne=require("node:stream");var Fo=Ny("ts-http-runtime");var rje={};function Ty(t){return t&&typeof t.pipe=="function"}function Yne(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=()=>{e(),t.removeListener("close",r),t.removeListener("end",r),t.removeListener("error",r)};t.on("close",r),t.on("end",r),t.on("error",r)})}function Wne(t){return t&&typeof t.byteLength=="number"}var Zw=class extends jne.Transform{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}},SF=class{cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Ca("The operation was aborted. Request has already been canceled.");n=l=>{l.type==="abort"&&r.abort()},e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let l=new _i;Fo.info(`request to '${l.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let o=e.headers.get("Accept-Encoding"),i=o?.includes("gzip")||o?.includes("deflate"),a=typeof e.body=="function"?e.body():e.body;if(a&&!e.headers.has("Content-Length")){let l=ije(a);l!==null&&e.headers.set("Content-Length",l)}let c;try{if(a&&e.onUploadProgress){let g=e.onUploadProgress,E=new Zw(g);E.on("error",I=>{Fo.error("Error in upload progress",I)}),Ty(a)?a.pipe(E):E.end(a),a=E}let l=await this.makeRequest(e,r,a);s!==void 0&&clearTimeout(s);let u=nje(l),p={status:l.statusCode??0,headers:u,request:e};if(e.method==="HEAD")return l.resume(),p;c=i?sje(l,u):l;let A=e.onDownloadProgress;if(A){let g=new Zw(A);g.on("error",E=>{Fo.error("Error in download progress",E)}),c.pipe(g),c=g}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(p.status)?p.readableStreamBody=c:p.bodyAsText=await oje(c),p}finally{if(e.abortSignal&&n){let l=Promise.resolve();Ty(a)&&(l=Yne(a));let u=Promise.resolve();Ty(c)&&(u=Yne(c)),Promise.all([l,u]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(d=>{Fo.warning("Error when cleaning up abortListener on httpRequest",d)})}}}makeRequest(e,r,n){let s=new URL(e.url),o=s.protocol!=="https:";if(o&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let a={agent:e.agent??this.getOrCreateAgent(e,o),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((c,l)=>{let u=o?Kw.default.request(a,c):Xw.default.request(a,c);u.once("error",d=>{l(new as(d.message,{code:d.code??as.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let d=new Ca("The operation was aborted. Rejecting from abort signal callback while making request.");u.destroy(d),l(d)}),n&&Ty(n)?n.pipe(u):n?typeof n=="string"||Buffer.isBuffer(n)?u.end(n):Wne(n)?u.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Fo.error("Unrecognized body type",n),l(new as("Unrecognized body type"))):u.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?Kw.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new Kw.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return Xw.default.globalAgent;let s=e.tlsSettings??rje,o=this.cachedHttpsAgents.get(s);return o&&o.options.keepAlive===!n||(Fo.info("No cached TLS Agent exist, creating a new Agent"),o=new Xw.default.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,o)),o}}};function nje(t){let e=no();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}function sje(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=BF.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=BF.default.createInflate();return t.pipe(n),n}return t}function oje(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 as(`Error reading response as text: ${s.message}`,{code:as.PARSE_ERROR}))})})}function ije(t){return t?Buffer.isBuffer(t)?t.length:Ty(t)?null:Wne(t)?t.byteLength:typeof t=="string"?Buffer.from(t).length:null:0}function Jne(){return new SF}function eB(){return Jne()}var RF="logPolicy";function tB(t={}){let e=t.logger??Fo.info,r=new _i({additionalAllowedHeaderNames:t.additionalAllowedHeaderNames,additionalAllowedQueryParameters:t.additional
Line truncated
|
|
|
|
|
`;return e}function OWe(t){return t instanceof Uint8Array?t.byteLength:bB(t)?t.size===-1?void 0:t.size:void 0}function FWe(t){let e=0;for(let r of t){let n=OWe(r);if(n===void 0)return;e+=n}return e}async function MWe(t,e,r){let n=[Ps(`--${r}`,"utf-8"),...e.flatMap(o=>[Ps(`\r
|
|
|
|
|
`,"utf-8"),Ps(LWe(o.headers),"utf-8"),Ps(`\r
|
|
|
|
|
`,"utf-8"),o.body,Ps(`\r
|
|
|
|
|
--${r}`,"utf-8")]),Ps(`--\r
|
|
|
|
|
`).map(o=>o.trim());for(let o of s)!o||o.startsWith("#")||n.patterns.push(new oC(o));return n.searchPaths.push(...L2(n.patterns)),n})}static stat(e,r,n){return q2(this,void 0,void 0,function*(){let s;if(r.followSymbolicLinks)try{s=yield UA.promises.stat(e.path)}catch(o){if(o.code==="ENOENT"){if(r.omitBrokenSymbolicLinks){Uo(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw o}else s=yield UA.promises.lstat(e.path);if(s.isDirectory()&&r.followSymbolicLinks){let o=yield UA.promises.realpath(e.path);for(;n.length>=e.level;)n.pop();if(n.some(a=>a===o)){Uo(`Symlink cycle detected for path '${e.path}' and realpath '${o}'`);return}n.push(o)}return s})}};var z7e=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function qae(t,e){return z7e(this,void 0,void 0,function*(){return yield sB.create(t,e)})}i(qae,"create");var IB=R(require("crypto"),1),$A=R(require("fs"),1),jp=R(require("path"),1),Dle=R(Qle(),1),kle=R(require("util"),1);var pC;(function(t){t.Gzip="cache.tgz",t.Zstd="cache.tzst"})(pC||(pC={}));var Yn;(function(t){t.Gzip="gzip",t.ZstdWithoutLong="zstd-without-long",t.Zstd="zstd"})(Yn||(Yn={}));var no;(function(t){t.GNU="gnu",t.BSD="bsd"})(no||(no={}));var yB=2,EB=5e3,cq=5e3,lq=`${process.env.PROGRAMFILES}\\Git\\usr\\bin\\tar.exe`,_le=`${process.env.SYSTEMDRIVE}\\Windows\\System32\\tar.exe`,mC="cache.tar",uq="manifest.txt",f5t=10*Math.pow(1024,3),CB="cache read denied:";var HA=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},ert=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(o){r[o]=t[o]&&function(a){return new Promise(function(c,l){a=t[o](a),s(c,l,a.done,a.value)})}}function s(o,a,c,l){Promise.resolve(l).then(function(u){o({value:u,done:c})},a)}},trt="1.0";function fC(){return HA(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=jp.join(n,"actions","temp")}let r=jp.join(e,IB.randomUUID());return yield Hp(r),r})}i(fC,"createTempDirectory");function Ma(t){return $A.statSync(t).size}i(Ma,"getArchiveFileSizeInBytes");function dq(t){return HA(this,void 0,void 0,function*(){var e,r,n,s,o;let a=[],c=(o=process.env.GITHUB_WORKSPACE)!==null&&o!==void 0?o:process.cwd(),l=yield qae(t.join(`
|
|
|
|
|
`),{implicitDescendants:!1});try{for(var u=!0,d=ert(l.globGenerator()),p;p=yield d.next(),e=p.done,!e;u=!0){s=p.value,u=!1;let f=jp.relative(c,s).replace(new RegExp(`\\${jp.sep}`,"g"),"/");v(`Matched: ${f}`),f===""?a.push("."):a.push(`${f}`)}}catch(m){r={error:m}}finally{try{!u&&!e&&(n=d.return)&&(yield n.call(d))}finally{if(r)throw r.error}}return a})}i(dq,"resolvePaths");function AC(t){return HA(this,void 0,void 0,function*(){return kle.promisify($A.unlink)(t)})}i(AC,"unlinkFile");function Lle(t){return HA(this,arguments,void 0,function*(e,r=[]){let n="";r.push("--version"),v(`Checking ${e} ${r.join(" ")}`);try{yield Mu(`${e}`,r,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i(s=>n+=s.toString(),"stdout"),stderr:i(s=>n+=s.toString(),"stderr")}})}catch(s){v(s.message)}return n=n.trim(),v(n),n})}i(Lle,"getVersion");function hC(){return HA(this,void 0,void 0,function*(){let t=yield Lle("zstd",["--quiet"]),e=Dle.clean(t);return v(`zstd version: ${e}`),t===""?Yn.Gzip:Yn.ZstdWithoutLong})}i(hC,"getCompressionMethod");function Vu(t){return t===Yn.Gzip?pC.Gzip:pC.Zstd}i(Vu,"getCacheFileName");function Ole(){return HA(this,void 0,void 0,function*(){return $A.existsSync(lq)?lq:(yield Lle("tar")).toLowerCase().includes("gnu tar")?Es("tar"):""})}i(Ole,"getGnuTarPathOnWindows");function pq(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}i(pq,"assertDefined");function zA(t,e,r=!1){let n=t.slice();return e&&n.push(e),process.platform==="win32"&&!r&&n.push("windows-only"),n.push(trt),IB.createHash("sha256").update(n.join("|")).digest("hex")}i(zA,"getCacheVersion");function Mle(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}i(Mle,"getRuntimeToken");var yC=R(require("http"),1),Aq=R(require("https"),1);function mq(t){let e=t.protocol==="https:";if(rrt(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 SB(r)}catch{if(!r.startsWith("http://")&&!r.startsWith("https://"))return new SB(`http://${r}`)}else return}i(mq,"getProxyUrl");function rrt(t){if(!t.hostname)return!1;let e=t.hostname;if(nrt(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 o of r.split(",").map(a=>a.trim().toUpperCase()).filter(a=>a))if(o==="*"||s.some(a=>a===o||a.endsWith(`.${o}`)||o.startsWith(".")&&a.endsWith(`${o}`)))return!0;return!1}i(rrt,"checkBypass");function nrt(t){let e=t.toLowerCase();return e==="localhost"||e.startsWith("127.")||e.startsWith("[::1]")||e.startsWith("[0:0:0:0:0:0:0:1]")}i(nrt,"isLoopbackAddress");var SB=class extends URL{static{i(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 Wu=R(Of(),1),Fle=R(Up(),1);var hr=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},ft;(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"})(ft||(ft={}));var Jn;(function(t){t.Accept="accept",t.ContentType="content-type"})(Jn||(Jn={}));var Tl;(function(t){t.ApplicationJson="application/json"})(Tl||(Tl={}));var ort=[ft.MovedPermanently,ft.ResourceMoved,ft.SeeOther,ft.TemporaryRedirect,ft.PermanentRedirect],irt=[ft.BadGateway,ft.ServiceUnavailable,ft.GatewayTimeout],art=["OPTIONS","GET","DELETE","HEAD"],crt=10,lrt=5,Fa=class t extends Error{static{i(this,"HttpClientError")}const
Line truncated
|
|
|
|
|
${yrt.sanitize({...this,request:{...this.request,agent:n},response:this.response})}`,"value"),enumerable:!1}),Object.setPrototypeOf(this,t.prototype)}};function TB(t){return t instanceof jn?!0:Xp(t)&&t.name==="RestError"}i(TB,"isRestError");function Is(t,e){return Buffer.from(t,e)}i(Is,"stringToUint8Array");var vB=R(require("node:http"),1),PB=R(require("node:https"),1),bq=R(require("node:zlib"),1),sue=require("node:stream");var Ho=EC("ts-http-runtime");var Ert={};function CC(t){return t&&typeof t.pipe=="function"}i(CC,"isReadableStream");function nue(t){return t.readable===!1?Promise.resolve():new Promise(e=>{let r=i(()=>{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)})}i(nue,"isStreamComplete");function oue(t){return t&&typeof t.byteLength=="number"}i(oue,"isArrayBuffer");var QB=class extends sue.Transform{static{i(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}},Bq=class{static{i(this,"NodeHttpClient")}cachedHttpAgent;cachedHttpsAgents=new WeakMap;async sendRequest(e){let r=new AbortController,n;if(e.abortSignal){if(e.abortSignal.aborted)throw new Ua("The operation was aborted. Request has already been canceled.");n=i(u=>{u.type==="abort"&&r.abort()},"abortListener"),e.abortSignal.addEventListener("abort",n)}let s;e.timeout>0&&(s=setTimeout(()=>{let u=new Li;Ho.info(`request to '${u.sanitizeUrl(e.url)}' timed out. canceling...`),r.abort()},e.timeout));let o=e.headers.get("Accept-Encoding"),a=o?.includes("gzip")||o?.includes("deflate"),c=typeof e.body=="function"?e.body():e.body;if(c&&!e.headers.has("Content-Length")){let u=Srt(c);u!==null&&e.headers.set("Content-Length",u)}let l;try{if(c&&e.onUploadProgress){let A=e.onUploadProgress,h=new QB(A);h.on("error",E=>{Ho.error("Error in upload progress",E)}),CC(c)?c.pipe(h):h.end(c),c=h}let u=await this.makeRequest(e,r,c);s!==void 0&&clearTimeout(s);let d=Crt(u),m={status:u.statusCode??0,headers:d,request:e};if(e.method==="HEAD")return u.resume(),m;l=a?Irt(u,d):u;let f=e.onDownloadProgress;if(f){let A=new QB(f);A.on("error",h=>{Ho.error("Error in download progress",h)}),l.pipe(A),l=A}return e.streamResponseStatusCodes?.has(Number.POSITIVE_INFINITY)||e.streamResponseStatusCodes?.has(m.status)?m.readableStreamBody=l:m.bodyAsText=await wrt(l),m}finally{if(e.abortSignal&&n){let u=Promise.resolve();CC(c)&&(u=nue(c));let d=Promise.resolve();CC(l)&&(d=nue(l)),Promise.all([u,d]).then(()=>{n&&e.abortSignal?.removeEventListener("abort",n)}).catch(p=>{Ho.warning("Error when cleaning up abortListener on httpRequest",p)})}}}makeRequest(e,r,n){let s=new URL(e.url),o=s.protocol!=="https:";if(o&&!e.allowInsecureConnection)throw new Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);let c={agent:e.agent??this.getOrCreateAgent(e,o),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=o?vB.default.request(c,l):PB.default.request(c,l);d.once("error",p=>{u(new jn(p.message,{code:p.code??jn.REQUEST_SEND_ERROR,request:e}))}),r.signal.addEventListener("abort",()=>{let p=new Ua("The operation was aborted. Rejecting from abort signal callback while making request.");d.destroy(p),u(p)}),n&&CC(n)?n.pipe(d):n?typeof n=="string"||Buffer.isBuffer(n)?d.end(n):oue(n)?d.end(ArrayBuffer.isView(n)?Buffer.from(n.buffer):Buffer.from(n)):(Ho.error("Unrecognized body type",n),u(new jn("Unrecognized body type"))):d.end()})}getOrCreateAgent(e,r){let n=e.disableKeepAlive;if(r)return n?vB.default.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new vB.default.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(n&&!e.tlsSettings)return PB.default.globalAgent;let s=e.tlsSettings??Ert,o=this.cachedHttpsAgents.get(s);return o&&o.options.keepAlive===!n||(Ho.info("No cached TLS Agent exist, creating a new Agent"),o=new PB.default.Agent({keepAlive:!n,...s}),this.cachedHttpsAgents.set(s,o)),o}}};function Crt(t){let e=oo();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}i(Crt,"getResponseHeaders");function Irt(t,e){let r=e.get("Content-Encoding");if(r==="gzip"){let n=bq.default.createGunzip();return t.pipe(n),n}else if(r==="deflate"){let n=bq.default.createInflate();return t.pipe(n),n}return t}i(Irt,"getDecodedResponseStream");function wrt(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 jn(`Error reading response as text: ${s.message}`,{code:jn.PARSE_ERROR}))})})}i(wrt,"streamToText");function Srt(t){return t?Buffer.isBuffer(t)?t.length:
Line truncated
|
|
|
|
|
`;return e}i(Znt,"encodeHeaders");function est(t){return t instanceof Uint8Array?t.byteLength:tR(t)?t.size===-1?void 0:t.size:void 0}i(est,"getLength");function tst(t){let e=0;for(let r of t){let n=est(r);if(n===void 0)return;e+=n}return e}i(tst,"getTotalLength");async function rst(t,e,r){let n=[Is(`--${r}`,"utf-8"),...e.flatMap(o=>[Is(`\r
|
|
|
|
|
`,"utf-8"),Is(Znt(o.headers),"utf-8"),Is(`\r
|
|
|
|
|
`,"utf-8"),o.body,Is(`\r
|
|
|
|
|
--${r}`,"utf-8")]),Is(`--\r
|
|
|
|
|
\r
|
|
|
|
|
`,"utf-8")],s=FWe(n);s&&t.headers.set("Content-Length",s),t.body=await Zse(n)}var _y="multipartPolicy",UWe=70,qWe=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function $We(t){if(t.length>UWe)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!qWe.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}function wB(){return{name:_y,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[,o,i]=s;if(i&&r&&i!==r)throw new Error(`Multipart boundary was specified as ${i} in the header, but got ${r} in the request body`);return r??=i,r?$We(r):r=kWe(),t.headers.set("Content-Type",`${o}; boundary=${r}`),await MWe(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}function BB(){return Ww()}var eoe=Vw({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),JOt=eoe.logger;function xa(t){return eoe.createClientLogger(t)}var wa=xa("core-rest-pipeline");function HF(t={}){return tB({logger:wa.info,...t})}var zF=rB;function VF(t={}){return nB(t)}var SB=S(require("node:os"),1),RB=S(require("node:process"),1);function toe(){return"User-Agent"}async function roe(t){if(RB.default&&RB.default.versions){let e=`${SB.default.type()} ${SB.default.release()}; ${SB.default.arch()}`,r=RB.default.versions;r.bun?t.set("Bun",`${r.bun} (${e})`):r.deno?t.set("Deno",`${r.deno} (${e})`):r.node&&t.set("Node",`${r.node} (${e})`)}}var NB="1.22.2";function JWe(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}function noe(){return toe()}async function TB(t){let e=new Map;e.set("core-rest-pipeline",NB),await roe(e);let r=JWe(e);return t?`${t} ${r}`:r}var soe=noe(),ooe="userAgentPolicy";function YF(t={}){let e=TB(t.userAgentPrefix);return{name:ooe,async sendRequest(r,n){return r.headers.has(soe)||r.headers.set(soe,await e),n(r)}}}var ao=class extends Error{constructor(e){super(e),this.name="AbortError"}};function jF(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((o,i)=>{function a(){i(new ao(s??"The operation was aborted."))}function c(){n?.removeEventListener("abort",l)}function l(){r?.(),c(),a()}if(n?.aborted)return a();try{t(u=>{c(),o(u)},u=>{c(),i(u)})}catch(u){i(u)}n?.addEventListener("abort",l)})}var tJe="The delay was aborted.";function vy(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return jF(o=>{r=setTimeout(o,t)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:n,abortErrorMsg:s??tJe})}function du(t){if(rp(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}`}}function ioe(t){return rp(t)}function Xm(){return tp()}var Ct=op;var aoe=Symbol("rawContent");function JF(t){return typeof t[aoe]=="function"}function coe(t){return JF(t)?t[aoe]():t}var PB=_y;function KF(){let t=wB();return{name:PB,sendRequest:async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)JF(n.body)&&(n.body=coe(n.body));return t.sendRequest(e,r)}}}var XF=sB;function ZF(){return oB()}function eM(t={}){return cB(t)}function tM(){return lB()}function pu(t){return MF(t)}function rM(t,e){return EB(t,e)}var loe="setClientRequestIdPolicy";function nM(t="x-ms-client-request-id"){return{name:loe,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}function sM(t){return CB(t)}function oM(t){return IB(t)}var Zm={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function uoe(t={}){let e=new iM(t.parentContext);return t.span&&(e=e.setValue(Zm.span,t.span)),t.namespace&&(e=e.setValue(Zm.namespace,t.namespace)),e}var iM=class t{_contextMap;constructor(e){this._contextMap=e instanceof t?new Map(e._contextMap):new Map}setValue(e,r){let n=new t(this);return n._contextMap.set(e,r),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){let r=new t(this);return r._contextMap.delete(e),r}};var poe=S(doe(),1),_B=poe.state;function rJe(){return{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}}}function nJe(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(t,e)=>({span:rJe(),tracingContext:uoe({parentContext:e.tracingContext})}),withContext(t,e,...r){return e(...r)}}}function Dy(){return _B.instrumenterImplementation||(_B.instrumenterImplementation=nJe()),_B.instrumenterImplementation}function ky(t){let{namespace:e,packageName:r,packageVersion:n}=t;function s(l,u,d){let p=Dy().startSpan(l,{...d,packageName:r,packageVersion:n,tracingContext:u?.tracingOptions?.tracingContext}),A=p.tracingConte
Line truncated
|
|
|
|
|
`&&t[o]!=="\r";o++)c+=t[o];if(c=c.trim(),c[c.length-1]==="/"&&(c=c.substring(0,c.length-1),o--),!B3e(c)){let d;return c.trim().length===0?d="Invalid space after '<'.":d="Tag '"+c+"' is an invalid name.",Nr("InvalidTag",d,cs(t,o))}let l=C3e(t,o);if(l===!1)return Nr("InvalidAttr","Attributes for '"+c+"' have open quote.",cs(t,o));let u=l.value;if(o=l.index,u[u.length-1]==="/"){let d=o-u.length;u=u.substring(0,u.length-1);let p=Yoe(u,e);if(p===!0)n=!0;else return Nr(p.err.code,p.err.msg,cs(t,d+p.err.line))}else if(a)if(l.tagClosed){if(u.trim().length>0)return Nr("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",cs(t,i));if(r.length===0)return Nr("InvalidTag","Closing tag '"+c+"' has not been opened.",cs(t,i));{let d=r.pop();if(c!==d.tagName){let p=cs(t,d.tagStartPos);return Nr("InvalidTag","Expected closing tag '"+d.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+c+"'.",cs(t,i))}r.length==0&&(s=!0)}}else return Nr("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",cs(t,o));else{let d=Yoe(u,e);if(d!==!0)return Nr(d.err.code,d.err.msg,cs(t,o-u.length+d.err.line));if(s===!0)return Nr("InvalidXml","Multiple possible root nodes found.",cs(t,o));e.unpairedTags.indexOf(c)!==-1||r.push({tagName:c,tagStartPos:i}),n=!0}for(o++;o<t.length;o++)if(t[o]==="<")if(t[o+1]==="!"){o++,o=Voe(t,o);continue}else if(t[o+1]==="?"){if(o=zoe(t,++o),o.err)return o}else break;else if(t[o]==="&"){let d=x3e(t,o);if(d==-1)return Nr("InvalidChar","char '&' is not expected.",cs(t,o));o=d}else if(s===!0&&!Hoe(t[o]))return Nr("InvalidXml","Extra text at the end",cs(t,o));t[o]==="<"&&o--}}else{if(Hoe(t[o]))continue;return Nr("InvalidChar","char '"+t[o]+"' is not expected.",cs(t,o))}if(n){if(r.length==1)return Nr("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",cs(t,r[0].tagStartPos));if(r.length>0)return Nr("InvalidXml","Invalid '"+JSON.stringify(r.map(o=>o.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Nr("InvalidXml","Start tag expected.",1);return!0}function Hoe(t){return t===" "||t===" "||t===`
|
|
|
|
|
`||t==="\r"}function zoe(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 Nr("InvalidXml","XML declaration allowed only at the start of the document.",cs(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function Voe(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}var y3e='"',E3e="'";function C3e(t,e){let r="",n="",s=!1;for(;e<t.length;e++){if(t[e]===y3e||t[e]===E3e)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}}var I3e=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Yoe(t,e){let r=qB(t,I3e),n={};for(let s=0;s<r.length;s++){if(r[s][1].length===0)return Nr("InvalidAttr","Attribute '"+r[s][2]+"' has no space in starting.",Hy(r[s]));if(r[s][3]!==void 0&&r[s][4]===void 0)return Nr("InvalidAttr","Attribute '"+r[s][2]+"' is without value.",Hy(r[s]));if(r[s][3]===void 0&&!e.allowBooleanAttributes)return Nr("InvalidAttr","boolean attribute '"+r[s][2]+"' is not allowed.",Hy(r[s]));let o=r[s][2];if(!w3e(o))return Nr("InvalidAttr","Attribute '"+o+"' is an invalid name.",Hy(r[s]));if(!n.hasOwnProperty(o))n[o]=1;else return Nr("InvalidAttr","Attribute '"+o+"' is repeated.",Hy(r[s]))}return!0}function b3e(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}function x3e(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,b3e(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function Nr(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function w3e(t){return rf(t)}function B3e(t){return rf(t)}function cs(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Hy(t){return t.startIndex+t[1].length}var S3e={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1};function joe(t){return typeof t=="boolean"?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,allowedTags:null,tagFilter:null}:typeof t=="object"&&t!==null?{enabled:t.enabled!==!1,maxEntitySize:t.maxEntitySize??1e4,maxExpansionDepth:t.maxExpansionDepth??10,maxTotalExpansions:t.maxTotalExpansions??1e3,maxExpandedLength:t.maxExpandedLength??1e5,allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null}:joe(!0)}var Woe=function(t){let e=Object.assign({},S3e,t);return e.processEntities=joe(e.processEntities),e};var GB;typeof Symbol!="function"?GB="@@xmlMetadata":GB=Symbol("XML Node Metadata");var uo=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),r!==void 0&&(this.child[this.child.length-1][GB]={startIndex:r})}static getMetaDataSymbol(){return GB}};var Vy=class{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,r){let n={};if(e[r+3]==="O"&&e[r+4]==="C"&&e[r+5]==="T"&&e[r+6]==="Y"&&e[r+7]==="P"&&e[r+8]==="E"){r=r+9;let s=1,o=!1,i=!1,a="";for(;r<e.length;r++)if(e[r]==="<"&&!i){if(o&&up(e,"!ENTITY",r)){r+=7;let c,l;if([c,l,r]=this.readEntityExp(e,r+1,this.suppressValidationErr),l.indexOf("&")===-1){let u=c.replace(/[.\-+*:]/g,"\\.");n[c]={regx:RegExp(`&${u};`,"g"),val:l}}}else if(o&&up(e,"!ELEMENT",r)){r+=8;let{index:c}=this.readElementExp(e,r+1);r=c}else if(o&&up(e,"!ATTLIST",r))r+=8;else if(o&&up(e,"!NOTATION",r)){r+=9;let{index:c}=this.readNotationExp(e,r+1,this.suppressValidationErr);r=c}else if(up(e,"!--",r))i=!0;else throw new Error("Invalid DOCTYPE");s++,a=""}else if(e[r]===">"){if(i?e[r-1]==="-"&&e[r-2]==="-"&&(i=!1,s--):s--,s===0)break}else e[r]==="["?o=!0:a+=e[r];if(s!==0)throw new Error("Unclosed DOCTYPE")}elLine truncated
|
|
|
|
|
`);let e=new uo("!xml"),r=e,n="",s="";this.entityExpansionCount=0,this.currentExpandedLength=0;let o=new Vy(this.options.processEntities);for(let i=0;i<t.length;i++)if(t[i]==="<")if(t[i+1]==="/"){let c=dp(t,">",i,"Closing Tag is not closed."),l=t.substring(i+2,c).trim();if(this.options.removeNSPrefix){let p=l.indexOf(":");p!==-1&&(l=l.substr(p+1))}this.options.transformTagName&&(l=this.options.transformTagName(l)),r&&(n=this.saveTextToParentTag(n,r,s));let u=s.substring(s.lastIndexOf(".")+1);if(l&&this.options.unpairedTags.indexOf(l)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${l}>`);let d=0;u&&this.options.unpairedTags.indexOf(u)!==-1?(d=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):d=s.lastIndexOf("."),s=s.substring(0,d),r=this.tagsNodeStack.pop(),n="",i=c}else if(t[i+1]==="?"){let c=BM(t,i,!1,"?>");if(!c)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,s),!(this.options.ignoreDeclaration&&c.tagName==="?xml"||this.options.ignorePiTags)){let l=new uo(c.tagName);l.add(this.options.textNodeName,""),c.tagName!==c.tagExp&&c.attrExpPresent&&(l[":@"]=this.buildAttributesMap(c.tagExp,s,c.tagName)),this.addChild(r,l,s,i)}i=c.closeIndex+1}else if(t.substr(i+1,3)==="!--"){let c=dp(t,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){let l=t.substring(i+4,c-2);n=this.saveTextToParentTag(n,r,s),r.add(this.options.commentPropName,[{[this.options.textNodeName]:l}])}i=c}else if(t.substr(i+1,2)==="!D"){let c=o.readDocType(t,i);this.docTypeEntities=c.entities,i=c.i}else if(t.substr(i+1,2)==="!["){let c=dp(t,"]]>",i,"CDATA is not closed.")-2,l=t.substring(i+9,c);n=this.saveTextToParentTag(n,r,s);let u=this.parseTextData(l,r.tagname,s,!0,!1,!0,!0);u==null&&(u=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:l}]):r.add(this.options.textNodeName,u),i=c+2}else{let c=BM(t,i,this.options.removeNSPrefix),l=c.tagName,u=c.rawTagName,d=c.tagExp,p=c.attrExpPresent,A=c.closeIndex;if(this.options.transformTagName){let I=this.options.transformTagName(l);d===l&&(d=I),l=I}r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,s,!1));let g=r;g&&this.options.unpairedTags.indexOf(g.tagname)!==-1&&(r=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),l!==e.tagname&&(s+=s?"."+l:l);let E=i;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,s,l)){let I="";if(d.length>0&&d.lastIndexOf("/")===d.length-1)l[l.length-1]==="/"?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),d=l):d=d.substr(0,d.length-1),i=c.closeIndex;else if(this.options.unpairedTags.indexOf(l)!==-1)i=c.closeIndex;else{let b=this.readStopNodeData(t,u,A+1);if(!b)throw new Error(`Unexpected end of ${u}`);i=b.i,I=b.tagContent}let x=new uo(l);l!==d&&p&&(x[":@"]=this.buildAttributesMap(d,s,l)),I&&(I=this.parseTextData(I,l,s,!0,p,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),x.add(this.options.textNodeName,I),this.addChild(r,x,s,E)}else{if(d.length>0&&d.lastIndexOf("/")===d.length-1){if(l[l.length-1]==="/"?(l=l.substr(0,l.length-1),s=s.substr(0,s.length-1),d=l):d=d.substr(0,d.length-1),this.options.transformTagName){let x=this.options.transformTagName(l);d===l&&(d=x),l=x}let I=new uo(l);l!==d&&p&&(I[":@"]=this.buildAttributesMap(d,s,l)),this.addChild(r,I,s,E),s=s.substr(0,s.lastIndexOf("."))}else{let I=new uo(l);this.tagsNodeStack.push(r),l!==d&&p&&(I[":@"]=this.buildAttributesMap(d,s,l)),this.addChild(r,I,s,E),r=I}n="",i=A}}else n+=t[i];return e.child};function q3e(t,e,r,n){this.options.captureMetaData||(n=void 0);let s=this.options.updateTag(e.tagname,r,e[":@"]);s===!1||(typeof s=="string"&&(e.tagname=s),t.addChild(e,n))}var $3e=function(t,e,r){if(t.indexOf("&")===-1)return t;let n=this.options.processEntities;if(!n.enabled||n.allowedTags&&!n.allowedTags.includes(e)||n.tagFilter&&!n.tagFilter(e,r))return t;for(let s in this.docTypeEntities){let o=this.docTypeEntities[s],i=t.match(o.regx);if(i){if(this.entityExpansionCount+=i.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);let a=t.length;if(t=t.replace(o.regx,o.val),n.maxExpandedLength&&(this.currentExpandedLength+=t.length-a,this.currentExpandedLength>n.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n.maxExpandedLength}`)}}if(t.indexOf("&")===-1)return t;for(let s in this.lastEntities){let o=this.lastEntities[s];t=t.replace(o.regex,o.val)}if(t.indexOf("&")===-1)return t;if(this.options.htmlEntities)for(let s in this.htmlEntities){let o=this.htmlEntities[s];t=t.replace(o.regex,o.val)}return t=t.replace(this.ampEntity.regex,this.ampEntity.val),t};function G3e(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}function H3e(t,e,r,n){return!!(e&Line truncated
|
|
|
|
|
`),Zoe(t,e,"",r)}function Zoe(t,e,r,n){let s="",o=!1;for(let i=0;i<t.length;i++){let a=t[i],c=J3e(a);if(c===void 0)continue;let l="";if(r.length===0?l=c:l=`${r}.${c}`,c===e.textNodeName){let g=a[c];K3e(l,e)||(g=e.tagValueProcessor(c,g),g=eie(g,e)),o&&(s+=n),s+=g,o=!1;continue}else if(c===e.cdataPropName){o&&(s+=n),s+=`<![CDATA[${a[c][0][e.textNodeName]}]]>`,o=!1;continue}else if(c===e.commentPropName){s+=n+`<!--${a[c][0][e.textNodeName]}-->`,o=!0;continue}else if(c[0]==="?"){let g=Xoe(a[":@"],e),E=c==="?xml"?"":n,I=a[c][0][e.textNodeName];I=I.length!==0?" "+I:"",s+=E+`<${c}${I}${g}?>`,o=!0;continue}let u=n;u!==""&&(u+=e.indentBy);let d=Xoe(a[":@"],e),p=n+`<${c}${d}`,A=Zoe(a[c],e,l,u);e.unpairedTags.indexOf(c)!==-1?e.suppressUnpairedNode?s+=p+">":s+=p+"/>":(!A||A.length===0)&&e.suppressEmptyNode?s+=p+"/>":A&&A.endsWith(">")?s+=p+`>${A}${n}</${c}>`:(s+=p+">",A&&n!==""&&(A.includes("/>")||A.includes("</"))?s+=n+e.indentBy+A+n:s+=A,s+=`</${c}>`),o=!0}return s}function J3e(t){let e=Object.keys(t);for(let r=0;r<e.length;r++){let n=e[r];if(t.hasOwnProperty(n)&&n!==":@")return n}}function Xoe(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let s=e.attributeValueProcessor(n,t[n]);s=eie(s,e),s===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${s}"`}return r}function K3e(t,e){t=t.substr(0,t.length-e.textNodeName.length-1);let r=t.substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1}function eie(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}var X3e={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},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};function vi(t){this.options=Object.assign({},X3e,t),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Yy(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=t4e),this.processTextOrObjNode=Z3e,this.options.format?(this.indentate=e4e,this.tagEndChar=`>
|
|
|
|
|
`,"utf-8")],s=tst(n);s&&t.headers.set("Content-Length",s),t.body=await lde(n)}i(rst,"buildRequestBody");var SC="multipartPolicy",nst=70,sst=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function ost(t){if(t.length>nst)throw new Error(`Multipart boundary "${t}" exceeds maximum length of 70 characters`);if(Array.from(t).some(e=>!sst.has(e)))throw new Error(`Multipart boundary "${t}" contains invalid characters`)}i(ost,"assertValidBoundary");function nR(){return{name:SC,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[,o,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?ost(r):r=Xnt(),t.headers.set("Content-Type",`${o}; boundary=${r}`),await rst(t,t.multipartBody.parts,r),t.multipartBody=void 0,e(t)}}}i(nR,"multipartPolicy");function sR(){return NB()}i(sR,"createEmptyPipeline");var ude=bB({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"}),dXt=ude.logger;function Ha(t){return ude.createClientLogger(t)}i(Ha,"createClientLogger");var $a=Ha("core-rest-pipeline");function $q(t={}){return DB({logger:$a.info,...t})}i($q,"logPolicy");var zq=kB;function Vq(t={}){return LB(t)}i(Vq,"redirectPolicy");var oR=R(require("node:os"),1),iR=R(require("node:process"),1);function dde(){return"User-Agent"}i(dde,"getHeaderName");async function pde(t){if(iR.default&&iR.default.versions){let e=`${oR.default.type()} ${oR.default.release()}; ${oR.default.arch()}`,r=iR.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})`)}}i(pde,"setPlatformSpecificData");var aR="1.22.2";function mst(t){let e=[];for(let[r,n]of t){let s=n?`${r}/${n}`:r;e.push(s)}return e.join(" ")}i(mst,"getUserAgentString");function mde(){return dde()}i(mde,"getUserAgentHeaderName");async function cR(t){let e=new Map;e.set("core-rest-pipeline",aR),await pde(e);let r=mst(e);return t?`${t} ${r}`:r}i(cR,"getUserAgentValue");var fde=mde(),Ade="userAgentPolicy";function Wq(t={}){let e=cR(t.userAgentPrefix);return{name:Ade,async sendRequest(r,n){return r.headers.has(fde)||r.headers.set(fde,await e),n(r)}}}i(Wq,"userAgentPolicy");var lo=class extends Error{static{i(this,"AbortError")}constructor(e){super(e),this.name="AbortError"}};function Yq(t,e){let{cleanupBeforeAbort:r,abortSignal:n,abortErrorMsg:s}=e??{};return new Promise((o,a)=>{function c(){a(new lo(s??"The operation was aborted."))}i(c,"rejectOnAbort");function l(){n?.removeEventListener("abort",u)}i(l,"removeListeners");function u(){r?.(),l(),c()}if(i(u,"onAbort"),n?.aborted)return c();try{t(d=>{l(),o(d)},d=>{l(),a(d)})}catch(d){a(d)}n?.addEventListener("abort",u)})}i(Yq,"createAbortablePromise");var yst="The delay was aborted.";function xC(t,e){let r,{abortSignal:n,abortErrorMsg:s}=e??{};return Yq(o=>{r=setTimeout(o,t)},{cleanupBeforeAbort:i(()=>clearTimeout(r),"cleanupBeforeAbort"),abortSignal:n,abortErrorMsg:s??yst})}i(xC,"delay");function Ju(t){if(Xp(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}`}}i(Ju,"getErrorMessage");function hde(t){return Xp(t)}i(hde,"isError");function eh(){return Kp()}i(eh,"randomUUID");var it=tm;var gde=Symbol("rawContent");function jq(t){return typeof t[gde]=="function"}i(jq,"hasRawContent");function yde(t){return jq(t)?t[gde]():t}i(yde,"getRawContent");var lR=SC;function Kq(){let t=nR();return{name:lR,sendRequest:i(async(e,r)=>{if(e.multipartBody)for(let n of e.multipartBody.parts)jq(n.body)&&(n.body=yde(n.body));return t.sendRequest(e,r)},"sendRequest")}}i(Kq,"multipartPolicy");var Xq=OB;function Zq(){return MB()}i(Zq,"decompressResponsePolicy");function eG(t={}){return qB(t)}i(eG,"defaultRetryPolicy");function tG(){return GB()}i(tG,"formDataPolicy");function ju(t){return Fq(t)}i(ju,"getDefaultProxySettings");function rG(t,e){return XB(t,e)}i(rG,"proxyPolicy");var Ede="setClientRequestIdPolicy";function nG(t="x-ms-client-request-id"){return{name:Ede,async sendRequest(e,r){return e.headers.has(t)||e.headers.set(t,e.requestId),r(e)}}}i(nG,"setClientRequestIdPolicy");function sG(t){return ZB(t)}i(sG,"agentPolicy");function oG(t){return eR(t)}i(oG,"tlsPolicy");var th={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Cde(t={}){let e=new iG(t.parentContext);return t.span&&(e=e.setValue(th.span,t.span)),t.namespace&&(e=e.setValue(th.namespace,t.namespace)),e}i(Cde,"createTracingContext");var iG=class t{static{i(this,"TracingContextImpl")}_contextMap;constructor(e){this._contextMap=e i
Line truncated
|
|
|
|
|
`&&t[o]!=="\r";o++)l+=t[o];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),o--),!Got(l)){let p;return l.trim().length===0?p="Invalid space after '<'.":p="Tag '"+l+"' is an invalid name.",gr("InvalidTag",p,Kn(t,o))}let u=Oot(t,o);if(u===!1)return gr("InvalidAttr","Attributes for '"+l+"' have open quote.",Kn(t,o));let d=u.value;if(o=u.index,d[d.length-1]==="/"){let p=o-d.length;d=d.substring(0,d.length-1);let m=npe(d,e);if(m===!0)n=!0;else return gr(m.err.code,m.err.msg,Kn(t,p+m.err.line))}else if(c)if(u.tagClosed){if(d.trim().length>0)return gr("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",Kn(t,a));if(r.length===0)return gr("InvalidTag","Closing tag '"+l+"' has not been opened.",Kn(t,a));{let p=r.pop();if(l!==p.tagName){let m=Kn(t,p.tagStartPos);return gr("InvalidTag","Expected closing tag '"+p.tagName+"' (opened in line "+m.line+", col "+m.col+") instead of closing tag '"+l+"'.",Kn(t,a))}r.length==0&&(s=!0)}}else return gr("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",Kn(t,o));else{let p=npe(d,e);if(p!==!0)return gr(p.err.code,p.err.msg,Kn(t,o-d.length+p.err.line));if(s===!0)return gr("InvalidXml","Multiple possible root nodes found.",Kn(t,o));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:a}),n=!0}for(o++;o<t.length;o++)if(t[o]==="<")if(t[o+1]==="!"){o++,o=rpe(t,o);continue}else if(t[o+1]==="?"){if(o=tpe(t,++o),o.err)return o}else break;else if(t[o]==="&"){let p=Uot(t,o);if(p==-1)return gr("InvalidChar","char '&' is not expected.",Kn(t,o));o=p}else if(s===!0&&!epe(t[o]))return gr("InvalidXml","Extra text at the end",Kn(t,o));t[o]==="<"&&o--}}else{if(epe(t[o]))continue;return gr("InvalidChar","char '"+t[o]+"' is not expected.",Kn(t,o))}if(n){if(r.length==1)return gr("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",Kn(t,r[0].tagStartPos));if(r.length>0)return gr("InvalidXml","Invalid '"+JSON.stringify(r.map(o=>o.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return gr("InvalidXml","Start tag expected.",1);return!0}i(wR,"validate");function epe(t){return t===" "||t===" "||t===`
|
|
|
|
|
`||t==="\r"}i(epe,"isWhiteSpace");function tpe(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 gr("InvalidXml","XML declaration allowed only at the start of the document.",Kn(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}i(tpe,"readPI");function rpe(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}i(rpe,"readCommentAndCDATA");var kot='"',Lot="'";function Oot(t,e){let r="",n="",s=!1;for(;e<t.length;e++){if(t[e]===kot||t[e]===Lot)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}}i(Oot,"readAttributeStr");var Mot=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function npe(t,e){let r=CR(t,Mot),n={};for(let s=0;s<r.length;s++){if(r[s][1].length===0)return gr("InvalidAttr","Attribute '"+r[s][2]+"' has no space in starting.",LC(r[s]));if(r[s][3]!==void 0&&r[s][4]===void 0)return gr("InvalidAttr","Attribute '"+r[s][2]+"' is without value.",LC(r[s]));if(r[s][3]===void 0&&!e.allowBooleanAttributes)return gr("InvalidAttr","boolean attribute '"+r[s][2]+"' is not allowed.",LC(r[s]));let o=r[s][2];if(!qot(o))return gr("InvalidAttr","Attribute '"+o+"' is an invalid name.",LC(r[s]));if(!Object.prototype.hasOwnProperty.call(n,o))n[o]=1;else return gr("InvalidAttr","Attribute '"+o+"' is repeated.",LC(r[s]))}return!0}i(npe,"validateAttributeString");function Fot(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}i(Fot,"validateNumberAmpersand");function Uot(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,Fot(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}i(Uot,"validateAmpersand");function gr(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}i(gr,"getErrorObject");function qot(t){return xG(t)}i(qot,"validateAttrName");function Got(t){return xG(t)}i(Got,"validateTagName");function Kn(t,e){let r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}i(Kn,"getLineNumberForPosition");function LC(t){return t.startIndex+t[1].length}i(LC,"getPositionFromMatch");var spe={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"},ope={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"},ipe={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:"\Line truncated
|
|
|
|
|
`);let e=new bs("!xml"),r=e,n="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let s=this.options,o=new FC(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=ih(t,">",c,"Closing Tag is not closed."),p=t.substring(c+2,d).trim();if(s.removeNSPrefix){let f=p.indexOf(":");f!==-1&&(p=p.substr(f+1))}p=QG(s.transformTagName,p,"",s).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));let m=this.matcher.getCurrentTag();if(p&&s.unpairedTagsSet.has(p))throw new Error(`Unpaired tag can not be used as closing tag: </${p}>`);m&&s.unpairedTagsSet.has(m)&&(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=_G(t,c,!1,"?>");if(!d)throw new Error("Pi Tag is not closed.");n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let p=this.buildAttributesMap(d.tagExp,this.matcher,d.tagName,!0);if(p){let m=p[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(m)||1),o.setXmlVersion(Number(m)||1)}if(!(s.ignoreDeclaration&&d.tagName==="?xml"||s.ignorePiTags)){let m=new bs(d.tagName);m.add(s.textNodeName,""),d.tagName!==d.tagExp&&d.attrExpPresent&&s.ignoreAttributes!==!0&&(m[":@"]=p),this.addChild(r,m,this.readonlyMatcher,c)}c=d.closeIndex+1}else if(u===33&&t.charCodeAt(c+2)===45&&t.charCodeAt(c+3)===45){let d=ih(t,"-->",c+4,"Comment is not closed.");if(s.commentPropName){let p=t.substring(c+4,d-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(s.commentPropName,[{[s.textNodeName]:p}])}c=d}else if(u===33&&t.charCodeAt(c+2)===68){let d=o.readDocType(t,c);this.entityDecoder.addInputEntities(d.entities),c=d.i}else if(u===33&&t.charCodeAt(c+2)===91){let d=ih(t,"]]>",c,"CDATA is not closed.")-2,p=t.substring(c+9,d);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let m=this.parseTextData(p,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);m==null&&(m=""),s.cdataPropName?r.add(s.cdataPropName,[{[s.textNodeName]:p}]):r.add(s.textNodeName,m),c=d+2}else{let d=_G(t,c,s.removeNSPrefix);if(!d){let P=t.substring(Math.max(0,c-50),Math.min(a,c+50));throw new Error(`readTagExp returned undefined at position ${c}. Context: "${P}"`)}let p=d.tagName,m=d.rawTagName,f=d.tagExp,A=d.attrExpPresent,h=d.closeIndex;if({tagName:p,tagExp:f}=QG(s.transformTagName,p,f,s),s.strictReservedNames&&(p===s.commentPropName||p===s.cdataPropName||p===s.textNodeName||p===s.attributesGroupName))throw new Error(`Invalid tag name: ${p}`);r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));let E=r;E&&s.unpairedTagsSet.has(E.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let C=!1;f.length>0&&f.lastIndexOf("/")===f.length-1&&(C=!0,p[p.length-1]==="/"?(p=p.substr(0,p.length-1),f=p):f=f.substr(0,f.length-1),A=p!==f);let w=null,x={},b;b=dit(m),p!==e.tagname&&this.matcher.push(p,{},b),p!==f&&A&&(w=this.buildAttributesMap(f,this.matcher,p),w&&(x=uit(w,s))),p!==e.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let N=c;if(this.isCurrentNodeStopNode){let P="";if(C)c=d.closeIndex;else if(s.unpairedTagsSet.has(p))c=d.closeIndex;else{let re=this.readStopNodeData(t,m,h+1);if(!re)throw new Error(`Unexpected end of ${m}`);c=re.i,P=re.tagContent}let _=new bs(p);w&&(_[":@"]=w),_.add(s.textNodeName,P),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,_,this.readonlyMatcher,N)}else{if(C){({tagName:p,tagExp:f}=QG(s.transformTagName,p,f,s));let P=new bs(p);w&&(P[":@"]=w),this.addChild(r,P,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(s.unpairedTagsSet.has(p)){let P=new bs(p);w&&(P[":@"]=w),this.addChild(r,P,this.readonlyMatcher,N),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=d.closeIndex;continue}else{let P=new bs(p);if(this.tagsNodeStack.length>s.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),w&&(P[":@"]=w),this.addChild(r,P,this.readonlyMatcher,N),r=P}n="",c=h}}}else n+=t[c];return e.child},"parseXml");function git(t,e,r,n){this.options.captureMetaData||(n=void 0);let s=this.options.jPath?r.toString():r,o=this.options.updateTag(e.tagname,s,e[":@"]);o===!1||(typeof o=="string"&&(e.tagname=o),t.addChild(e,n))}i(git,"addChild");function yit(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)}i(yit,"replaceEntitiesValue");function Eit(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}i(Eit,"saveTextToParentTag");function Cit(){return this.stopNodeExpressionsLine truncated
|
|
|
|
|
`;function Tit(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";let r=t[0];if(FG(r)==="?xml"){let s=r[":@"];if(s){let o=e.attributeNamePrefix+"version";if(s[o])return s[o]}}return"1.0"}i(Tit,"detectXmlVersionFromArray");function Bpe(t,e,r,n,s){return!r.sanitizeName||am(t,{xmlVersion:s})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}i(Bpe,"resolveTagName");function MG(t,e){let r="";e.format&&(r=Nit);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 mo(c)):c instanceof mo&&n.push(c)}let s=Tit(t,e),o=new Wa;return Rpe(t,e,r,o,n,s)}i(MG,"toXml");function Rpe(t,e,r,n,s,o){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=OG(l,e),l}return""}for(let l=0;l<t.length;l++){let u=t[l],d=FG(u);if(d===void 0)continue;let m=d===e.textNodeName||d===e.cdataPropName||d===e.commentPropName||d[0]==="?"?d:Bpe(d,!1,e,n,o),f=vit(u[":@"],e);n.push(m,f);let A=Qit(n,s);if(m===e.textNodeName){let x=u[d];A||(x=e.tagValueProcessor(m,x),x=OG(x,e)),c&&(a+=r),a+=x,c=!1,n.pop();continue}else if(m===e.cdataPropName){c&&(a+=r);let x=u[d][0][e.textNodeName],b=RR(x);a+=`<![CDATA[${b}]]>`,c=!1,n.pop();continue}else if(m===e.commentPropName){let x=u[d][0][e.textNodeName],b=BR(x);a+=r+`<!--${b}-->`,c=!0,n.pop();continue}else if(m[0]==="?"){let x=bpe(u[":@"],e,A,n,o);a+=(m==="?xml"?"":r)+`<${m}${x}?>`,c=!0,n.pop();continue}let h=r;h!==""&&(h+=e.indentBy);let E=bpe(u[":@"],e,A,n,o),C=r+`<${m}${E}`,w;A?w=Npe(u[d],e):w=Rpe(u[d],e,h,n,s,o),e.unpairedTags.indexOf(m)!==-1?e.suppressUnpairedNode?a+=C+">":a+=C+"/>":(!w||w.length===0)&&e.suppressEmptyNode?a+=C+"/>":w&&w.endsWith(">")?a+=C+`>${w}${r}</${m}>`:(a+=C+">",w&&r!==""&&(w.includes("/>")||w.includes("</"))?a+=r+e.indentBy+w+r:a+=w,a+=`</${m}>`),c=!0,n.pop()}return a}i(Rpe,"arrToStr");function vit(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 o=s.startsWith(e.attributeNamePrefix)?s.substr(e.attributeNamePrefix.length):s;r[o]=Zu(t[s]),n=!0}return n?r:null}i(vit,"extractAttributeValues");function Npe(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],o=FG(s);if(o===e.textNodeName)r+=s[o];else if(o===e.cdataPropName)r+=s[o][0][e.textNodeName];else if(o===e.commentPropName)r+=s[o][0][e.textNodeName];else{if(o&&o[0]==="?")continue;if(o){let a=Pit(s[":@"],e),c=Npe(s[o],e);!c||c.length===0?r+=`<${o}${a}/>`:r+=`<${o}${a}>${c}</${o}>`}}}return r}i(Npe,"getRawContent");function Pit(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)}="${Zu(s)}"`}return r}i(Pit,"attr_to_str_raw");function FG(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}}i(FG,"propName");function bpe(t,e,r,n,s){let o="";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:Bpe(c,!0,e,n,s),u;r?u=t[a]:(u=e.attributeValueProcessor(a,t[a]),u=OG(u,e)),u===!0&&e.suppressBooleanAttributes?o+=` ${l}`:o+=` ${l}="${Zu(u)}"`}return o}i(bpe,"attr_to_str");function Qit(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}i(Qit,"checkStopNode");function OG(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}i(OG,"replaceEntitiesValue");function UG(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}i(UG,"getIgnoreAttributesFn");var _it={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:i(function(t,e){return e},"tagValueProcessor"),attributeValueProcessor:i(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 Rs(t){if(this.options=Object.assign({},_it,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&&ArraLine truncated
|
|
|
|
|
`,this.newLine=`
|
|
|
|
|
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}vi.prototype.build=function(t){return this.options.preserveOrder?TM(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)};vi.prototype.j2x=function(t,e,r){let n="",s="",o=r.join(".");for(let i in t)if(Object.prototype.hasOwnProperty.call(t,i))if(typeof t[i]>"u")this.isAttribute(i)&&(s+="");else if(t[i]===null)this.isAttribute(i)||i===this.options.cdataPropName?s+="":i[0]==="?"?s+=this.indentate(e)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+i+"/"+this.tagEndChar;else if(t[i]instanceof Date)s+=this.buildTextValNode(t[i],i,"",e);else if(typeof t[i]!="object"){let a=this.isAttribute(i);if(a&&!this.ignoreAttributesFn(a,o))n+=this.buildAttrPairStr(a,""+t[i]);else if(!a)if(i===this.options.textNodeName){let c=this.options.tagValueProcessor(i,""+t[i]);s+=this.replaceEntitiesValue(c)}else s+=this.buildTextValNode(t[i],i,"",e)}else if(Array.isArray(t[i])){let a=t[i].length,c="",l="";for(let u=0;u<a;u++){let d=t[i][u];if(!(typeof d>"u"))if(d===null)i[0]==="?"?s+=this.indentate(e)+"<"+i+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+i+"/"+this.tagEndChar;else if(typeof d=="object")if(this.options.oneListGroup){let p=this.j2x(d,e+1,r.concat(i));c+=p.val,this.options.attributesGroupName&&d.hasOwnProperty(this.options.attributesGroupName)&&(l+=p.attrStr)}else c+=this.processTextOrObjNode(d,i,e,r);else if(this.options.oneListGroup){let p=this.options.tagValueProcessor(i,d);p=this.replaceEntitiesValue(p),c+=p}else c+=this.buildTextValNode(d,i,"",e)}this.options.oneListGroup&&(c=this.buildObjectNode(c,i,l,e)),s+=c}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){let a=Object.keys(t[i]),c=a.length;for(let l=0;l<c;l++)n+=this.buildAttrPairStr(a[l],""+t[i][a[l]])}else s+=this.processTextOrObjNode(t[i],i,e,r);return{attrStr:n,val:s}};vi.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+e+'"'};function Z3e(t,e,r,n){let s=this.j2x(t,r+1,n.concat(e));return t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,s.attrStr,r):this.buildObjectNode(s.val,e,s.attrStr,r)}vi.prototype.buildObjectNode=function(t,e,r,n){if(t==="")return e[0]==="?"?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let s="</"+e+this.tagEndChar,o="";return e[0]==="?"&&(o="?",s=""),(r||r==="")&&t.indexOf("<")===-1?this.indentate(n)+"<"+e+r+o+">"+t+s:this.options.commentPropName!==!1&&e===this.options.commentPropName&&o.length===0?this.indentate(n)+`<!--${t}-->`+this.newLine:this.indentate(n)+"<"+e+r+o+this.tagEndChar+t+this.indentate(n)+s}};vi.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`></${t}`,e};vi.prototype.buildTextValNode=function(t,e,r,n){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(n)+`<!--${t}-->`+this.newLine;if(e[0]==="?")return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),s===""?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+s+"</"+e+this.tagEndChar}};vi.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){let r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t};function e4e(t){return this.options.indentBy.repeat(t)}function t4e(t){return t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName?t.substr(this.attrPrefixLen):!1}var tie={validate:$B};function sie(t){var e;return{attributesGroupName:"$",textNodeName:(e=t.xmlCharKey)!==null&&e!==void 0?e:"_",ignoreAttributes:!1,suppressBooleanAttributes:!1}}function r4e(t={}){var e,r;return Object.assign(Object.assign({},sie(t)),{attributeNamePrefix:"@_",format:!0,suppressEmptyNode:!0,indentBy:"",rootNodeName:(e=t.rootName)!==null&&e!==void 0?e:"root",cdataPropName:(r=t.cdataPropName)!==null&&r!==void 0?r:"__cdata"})}function n4e(t={}){return Object.assign(Object.assign({},sie(t)),{parseAttributeValue:!1,parseTagValue:!1,attributeNamePrefix:"",stopNodes:t.stopNodes,processEntities:!0,trimValues:!1})}function HB(t,e={}){let r=r4e(e),n=new vi(r),s={[r.rootNodeName]:t};return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${n.build(s)}`.replace(/\n/g,"")}async function PM(t,e={}){if(!t)throw new Error("Document is empty");let r=tie.validate(t);if(r!==!0)throw r;let s=new nf(n4e(e)).parse(t);if(Line truncated
|
|
|
|
|
`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}i(Rs,"Builder");function Dit(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"}i(Dit,"detectXmlVersionFromObj");function qG(t,e,r,n,s){return!r.sanitizeName||am(t,{xmlVersion:s})?t:r.sanitizeName(t,{isAttribute:e,matcher:n.readOnly()})}i(qG,"resolveTagName");Rs.prototype.build=function(t){if(this.options.preserveOrder)return MG(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});let e=new Wa,r=Dit(t,this.options);return this.j2x(t,0,e,r).val}};Rs.prototype.j2x=function(t,e,r,n){let s="",o="";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:qG(l,!1,this.options,r,n);if(typeof t[l]>"u")this.isAttribute(l)&&(o+="");else if(t[l]===null)this.isAttribute(l)||d===this.options.cdataPropName||d===this.options.commentPropName?o+="":d[0]==="?"?o+=this.indentate(e)+"<"+d+"?"+this.tagEndChar:o+=this.indentate(e)+"<"+d+"/"+this.tagEndChar;else if(t[l]instanceof Date)o+=this.buildTextValNode(t[l],d,"",e,r);else if(typeof t[l]!="object"){let p=this.isAttribute(l);if(p&&!this.ignoreAttributesFn(p,a)){let m=qG(p,!0,this.options,r,n);s+=this.buildAttrPairStr(m,""+t[l],c)}else if(!p)if(l===this.options.textNodeName){let m=this.options.tagValueProcessor(l,""+t[l]);o+=this.replaceEntitiesValue(m)}else{r.push(d);let m=this.checkStopNode(r);if(r.pop(),m){let f=""+t[l];f===""?o+=this.indentate(e)+"<"+d+this.closeTag(d)+this.tagEndChar:o+=this.indentate(e)+"<"+d+">"+f+"</"+d+this.tagEndChar}else o+=this.buildTextValNode(t[l],d,"",e,r)}}else if(Array.isArray(t[l])){let p=t[l].length,m="",f="";for(let A=0;A<p;A++){let h=t[l][A];if(!(typeof h>"u"))if(h===null)d[0]==="?"?o+=this.indentate(e)+"<"+d+"?"+this.tagEndChar:o+=this.indentate(e)+"<"+d+"/"+this.tagEndChar;else if(typeof h=="object")if(this.options.oneListGroup){r.push(d);let E=this.j2x(h,e+1,r,n);r.pop(),m+=E.val,this.options.attributesGroupName&&h.hasOwnProperty(this.options.attributesGroupName)&&(f+=E.attrStr)}else m+=this.processTextOrObjNode(h,d,e,r,n);else if(this.options.oneListGroup){let E=this.options.tagValueProcessor(d,h);E=this.replaceEntitiesValue(E),m+=E}else{r.push(d);let E=this.checkStopNode(r);if(r.pop(),E){let C=""+h;C===""?m+=this.indentate(e)+"<"+d+this.closeTag(d)+this.tagEndChar:m+=this.indentate(e)+"<"+d+">"+C+"</"+d+this.tagEndChar}else m+=this.buildTextValNode(h,d,"",e,r)}}this.options.oneListGroup&&(m=this.buildObjectNode(m,d,f,e)),o+=m}else if(this.options.attributesGroupName&&l===this.options.attributesGroupName){let p=Object.keys(t[l]),m=p.length;for(let f=0;f<m;f++){let A=qG(p[f],!0,this.options,r,n);s+=this.buildAttrPairStr(A,""+t[l][p[f]],c)}}else o+=this.processTextOrObjNode(t[l],d,e,r,n)}return{attrStr:s,val:o}};Rs.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+'="'+Zu(e)+'"'};function kit(t,e,r,n,s){let o=this.extractAttributes(t);if(n.push(e,o),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)}i(kit,"processTextOrObjNode");Rs.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 o=s.startsWith(this.options.attributeNamePrefix)?s.substring(this.options.attributeNamePrefix.length):s;e[o]=Zu(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]=Zu(t[n]),r=!0)}return r?e:null};Rs.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(Qe.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===Qe.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(s=>s.name.toLowerCase().startsWith(Qe.PREFIX_FOR_STORAGE));r.sort((s,o)=>eS(s.name.toLowerCase(),o.name.toLowerCase())),r=r.filter((s,o,i)=>!(o>0&&s.name.toLowerCase()===i[o-1].name.toLowerCase()));let n="";return r.forEach(s=>{n+=`${s.name.toLowerCase().trimRight()}:${s.value.trimLeft()}
|
|
|
|
|
`}),n}getCanonicalizedResourceString(e){let r=KB(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let s=XB(e.url),o={};if(s){let i=[];for(let a in s)if(Object.prototype.hasOwnProperty.call(s,a)){let c=a.toLowerCase();o[c]=s[a],i.push(c)}i.sort();for(let a of i)n+=`
|
|
|
|
|
${a}:${decodeURIComponent(o[a])}`}return n}};var gr=class extends Ap{accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new Xy(e,r,this)}computeHMACSHA256(e){return(0,cie.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var Hr=xa("storage-common");var $o;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})($o||($o={}));var gu={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:$o.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},c4e=new ao("The operation was aborted."),Zy=class extends Ra{retryOptions;constructor(e,r,n=gu){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:gu.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):gu.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:gu.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:gu.maxRetryDelayInMs):gu.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:gu.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:gu.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let s=e.clone(),o=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;o||(s.url=JB(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=fu(s.url,Uc.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let i;try{if(Hr.info(`RetryPolicy: =====> Try=${n} ${o?"Primary":"Secondary"}`),i=await this._nextPolicy.sendRequest(s),!this.shouldRetry(o,n,i))return i;r=r||!o&&i.status===404}catch(a){if(Hr.error(`RetryPolicy: Caught error, message: ${a.message}, code: ${a.code}`),!this.shouldRetry(o,n,i,a))throw a}return await this.delay(o,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)return Hr.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let o=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(s){for(let i of o)if(s.name.toUpperCase().includes(i)||s.message.toUpperCase().includes(i)||s.code&&s.code.toString().toUpperCase()===i)return Hr.info(`RetryPolicy: Network error ${i} found, will retry.`),!0}if(n||s){let i=n?n.status:s?s.statusCode:0;if(!e&&i===404)return Hr.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(i===503||i===500)return Hr.info(`RetryPolicy: Will retry for status code ${i}.`),!0}if(n&&n?.status>=400){let i=n.headers.get(Qe.X_MS_CopySourceErrorCode);if(i!==void 0)switch(i){case"InternalError":case"OperationTimedOut":case"ServerBusy":return!0}}return s?.code==="PARSE_ERROR"&&s?.message.startsWith('Error "Error: Unclosed root tag')?(Hr.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 $o.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case $o.FIXED:s=this.retryOptions.retryDelayInMs;break}else s=Math.random()*1e3;return Hr.info(`RetryPolicy: Delay for ${s}ms`),ZB(s,n,c4e)}};var eE=class{retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new Zy(e,r,this.retryOptions)}};var l4e="storageBrowserPolicy";function lie(){return{name:l4e,async sendRequest(t,e){return Ct||((t.method==="GET"||t.method==="HEAD")&&(t.url=fu(t.url,Uc.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Qe.COOKIE),t.headers.delete(Qe.CONTENT_LENGTH)),e(t)}}}var u4e="StorageCorrectContentLengthPolicy";function uie(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(Qe.CONTENT_LENGTH,Buffer.byteLength(e.body))}return{name:u4e,async sendRequest(e,r){return t(e),r(e)}}}var d4e="storageRetryPolicy",sf={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:$o.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},p4e=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],A4e=new ao("The operation was aborted.");function die(t={}){let e=t.retryPolicyType??sf.retryPolicyType,r=t.maxTries??sf.maxTries,n=t.retryDelayInMs??sf.retryDelayInMs,s=t.maxRetryDelayInMs??sf.maxRetryDelayInMs,o=t.secondaryHost??sf.secondaryHost,i=t.tryTimeoutInMs??sf.tryTimeoutInMs;function a({isPrimaryRetry:l,attempt:u,response:d,error:p}){if(u>=r)return Hr.info(`RetryPolicy: Attempt(s) ${u} >= maxTries ${r}, no further try.`),!1;if(p){for(let A of p4e)if(p.name.toUpperCase().includes(A)||p.message.toUpperCase().includes(A)||p.code&&p.code.toString().toUpperCase()===A)return
Line truncated
|
|
|
|
|
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),n=this.factory.computeHMACSHA256(r);return e.headers.set(Be.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${n}`),e}getHeaderValueToSign(e,r){let n=e.headers.get(r);return!n||r===Be.CONTENT_LENGTH&&n==="0"?"":n}getCanonicalizedHeadersString(e){let r=e.headers.headersArray().filter(s=>s.name.toLowerCase().startsWith(Be.PREFIX_FOR_STORAGE));r.sort((s,o)=>MR(s.name.toLowerCase(),o.name.toLowerCase())),r=r.filter((s,o,a)=>!(o>0&&s.name.toLowerCase()===a[o-1].name.toLowerCase()));let n="";return r.forEach(s=>{n+=`${s.name.toLowerCase().trimRight()}:${s.value.trimLeft()}
|
|
|
|
|
`}),n}getCanonicalizedResourceString(e){let r=kR(e.url)||"/",n="";n+=`/${this.factory.accountName}${r}`;let s=LR(e.url),o={};if(s){let a=[];for(let c in s)if(Object.prototype.hasOwnProperty.call(s,c)){let l=c.toLowerCase();o[l]=s[c],a.push(l)}a.sort();for(let c of a)n+=`
|
|
|
|
|
${c}:${decodeURIComponent(o[c])}`}return n}};var rr=class extends um{static{i(this,"StorageSharedKeyCredential")}accountName;accountKey;constructor(e,r){super(),this.accountName=e,this.accountKey=Buffer.from(r,"base64")}create(e,r){return new $C(e,r,this)}computeHMACSHA256(e){return(0,Lpe.createHmac)("sha256",this.accountKey).update(e,"utf8").digest("base64")}};var Lr=Ha("storage-common");var Wo;(function(t){t[t.EXPONENTIAL=0]="EXPONENTIAL",t[t.FIXED=1]="FIXED"})(Wo||(Wo={}));var td={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Wo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},$it=new lo("The operation was aborted."),zC=class extends Ya{static{i(this,"StorageRetryPolicy")}retryOptions;constructor(e,r,n=td){super(e,r),this.retryOptions={retryPolicyType:n.retryPolicyType?n.retryPolicyType:td.retryPolicyType,maxTries:n.maxTries&&n.maxTries>=1?Math.floor(n.maxTries):td.maxTries,tryTimeoutInMs:n.tryTimeoutInMs&&n.tryTimeoutInMs>=0?n.tryTimeoutInMs:td.tryTimeoutInMs,retryDelayInMs:n.retryDelayInMs&&n.retryDelayInMs>=0?Math.min(n.retryDelayInMs,n.maxRetryDelayInMs?n.maxRetryDelayInMs:td.maxRetryDelayInMs):td.retryDelayInMs,maxRetryDelayInMs:n.maxRetryDelayInMs&&n.maxRetryDelayInMs>=0?n.maxRetryDelayInMs:td.maxRetryDelayInMs,secondaryHost:n.secondaryHost?n.secondaryHost:td.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,r,n){let s=e.clone(),o=r||!this.retryOptions.secondaryHost||!(e.method==="GET"||e.method==="HEAD"||e.method==="OPTIONS")||n%2===1;o||(s.url=DR(s.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(s.url=ed(s.url,_l.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));let a;try{if(Lr.info(`RetryPolicy: =====> Try=${n} ${o?"Primary":"Secondary"}`),a=await this._nextPolicy.sendRequest(s),!this.shouldRetry(o,n,a))return a;r=r||!o&&a.status===404}catch(c){if(Lr.error(`RetryPolicy: Caught error, message: ${c.message}, code: ${c.code}`),!this.shouldRetry(o,n,a,c))throw c}return await this.delay(o,n,e.abortSignal),this.attemptSendRequest(e,r,++n)}shouldRetry(e,r,n,s){if(r>=this.retryOptions.maxTries)return Lr.info(`RetryPolicy: Attempt(s) ${r} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;let o=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"];if(s){for(let a of o)if(s.name.toUpperCase().includes(a)||s.message.toUpperCase().includes(a)||s.code&&s.code.toString().toUpperCase()===a)return Lr.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 Lr.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(a===503||a===500)return Lr.info(`RetryPolicy: Will retry for status code ${a}.`),!0}if(n&&n?.status>=400){let a=n.headers.get(Be.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')?(Lr.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 Wo.EXPONENTIAL:s=Math.min((Math.pow(2,r-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case Wo.FIXED:s=this.retryOptions.retryDelayInMs;break}else s=Math.random()*1e3;return Lr.info(`RetryPolicy: Delay for ${s}ms`),OR(s,n,$it)}};var VC=class{static{i(this,"StorageRetryPolicyFactory")}retryOptions;constructor(e){this.retryOptions=e}create(e,r){return new zC(e,r,this.retryOptions)}};var zit="storageBrowserPolicy";function Ope(){return{name:zit,async sendRequest(t,e){return it||((t.method==="GET"||t.method==="HEAD")&&(t.url=ed(t.url,_l.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),t.headers.delete(Be.COOKIE),t.headers.delete(Be.CONTENT_LENGTH)),e(t)}}}i(Ope,"storageBrowserPolicy");var Vit="StorageCorrectContentLengthPolicy";function Mpe(){function t(e){e.body&&(typeof e.body=="string"||Buffer.isBuffer(e.body))&&e.body.length>0&&e.headers.set(Be.CONTENT_LENGTH,Buffer.byteLength(e.body))}return i(t,"correctContentLength"),{name:Vit,async sendRequest(e,r){return t(e),r(e)}}}i(Mpe,"storageCorrectContentLengthPolicy");var Wit="storageRetryPolicy",ch={maxRetryDelayInMs:120*1e3,maxTries:4,retryDelayInMs:4*1e3,retryPolicyType:Wo.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},Yit=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],Jit=new lo("The operation was aborted.");function Fpe(t={}){let e=t.retryPolicyType??ch.retryPolicyType,r=t.maxTries??ch.maxTries,n=t.retryDelayInMs??ch.retryDelayInMs,s=t.maxRetryDelayInMs??ch.maxRetryDelayInMs,o=t.secondaryHost??ch.secondaryHost,a=t.tryTimeoutInMs??ch.tryTimeoutInMs;function c({isPrimaryRetry:u,attempt:d,response:p,error:m}){if(d>=r)return
Line truncated
|
|
|
|
|
`)+`
|
|
|
|
|
`+n(o)+s(o),a=(0,pie.createHmac)("sha256",t.accountKey).update(i,"utf8").digest("base64");o.headers.set(Qe.AUTHORIZATION,`SharedKey ${t.accountName}:${a}`)}function r(o,i){let a=o.headers.get(i);return!a||i===Qe.CONTENT_LENGTH&&a==="0"?"":a}function n(o){let i=[];for(let[c,l]of o.headers)c.toLowerCase().startsWith(Qe.PREFIX_FOR_STORAGE)&&i.push({name:c,value:l});i.sort((c,l)=>eS(c.name.toLowerCase(),l.name.toLowerCase())),i=i.filter((c,l,u)=>!(l>0&&c.name.toLowerCase()===u[l-1].name.toLowerCase()));let a="";return i.forEach(c=>{a+=`${c.name.toLowerCase().trimRight()}:${c.value.trimLeft()}
|
|
|
|
|
`}),a}function s(o){let i=KB(o.url)||"/",a="";a+=`/${t.accountName}${i}`;let c=XB(o.url),l={};if(c){let u=[];for(let d in c)if(Object.prototype.hasOwnProperty.call(c,d)){let p=d.toLowerCase();l[p]=c[d],u.push(p)}u.sort();for(let d of u)a+=`
|
|
|
|
|
${d}:${decodeURIComponent(l[d])}`}return a}return{name:m4e,async sendRequest(o,i){return e(o),i(o)}}}var f4e="storageRequestFailureDetailsParserPolicy";function Aie(){return{name:f4e,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}}}}var mie=require("node:crypto"),tS=class{accountName;userDelegationKey;key;constructor(e,r){this.accountName=e,this.userDelegationKey=r,this.key=Buffer.from(r.value,"base64")}computeHMACSHA256(e){return(0,mie.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var rS="12.31.0",nS="2026-02-06";var sS="https://storage.azure.com/.default",qc={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var Di="",DM="*",g4e=1*1024*1024;var h4e=4*g4e;var fie="AES256",gie="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",hie=["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"],yie=["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"],Eie="BlobUsesCustomerSpecifiedEncryption",Cie="BlobDoesNotUseCustomerSpecifiedEncryption",Iie=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function $c(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}var tE=class{factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function Tr(t,e={}){t||(t=new Kt);let r=new tE([],e);return r._credential=t,r}function y4e(t){let e=[E4e,bie,C4e,I4e,b4e,x4e,B4e];if(t.factories.length){let r=t.factories.filter(n=>!e.some(s=>s(n)));if(r.length){let n=r.some(s=>w4e(s));return{wrappedPolicies:bM(r),afterRetry:n}}}}function kM(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?xM(e):_M(),t._coreHttpClient=n);let s=t._corePipeline;if(!s){let o=`azsdk-js-azure-storage-blob/${rS}`,i=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${o}`:`${o}`;s=Fy({...r,loggingOptions:{additionalAllowedHeaderNames:hie,additionalAllowedQueryParameters:yie,logger:zB.info},userAgentOptions:{userAgentPrefix:i},serializationOptions:{stringifyXML:HB,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:PM,serializerOptions:{xml:{xmlCharKey:"#"}}}}),s.removePolicy({phase:"Retry"}),s.removePolicy({name:XF}),s.addPolicy(uie()),s.addPolicy(die(r.retryOptions),{phase:"Retry"}),s.addPolicy(Aie()),s.addPolicy(lie());let a=y4e(t);a&&s.addPolicy(a.wrappedPolicies,a.afterRetry?{afterPhase:"Retry"}:void 0);let c=LM(t);co(c)?s.addPolicy(ef({credential:c,scopes:r.audience??sS
Line truncated
|
|
|
|
|
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new Mi(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}function E8e(t,e){if(t=bp(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=Ha.parse(t.permissions.toString()).toString():s=za.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Fi(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(`
|
|
|
|
|
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:new Mi(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:o}}function C8e(t,e){if(t=bp(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=Ha.parse(t.permissions.toString()).toString():s=za.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Fi(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(`
|
|
|
|
|
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:new Mi(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope),stringToSign:o}}function I8e(t,e){if(t=bp(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=Ha.parse(t.permissions.toString()).toString():s=za.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?It(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?It(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Fi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:new Mi(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey),stringToSign:o}}function b8e(t,e){if(t=bp(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=Ha.parse(t.permissions.toString()).toString():s=za.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?It(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?It(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Fi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:new Mi(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId),stringToSign:o}}function x8e(t,e){if(t=bp(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=Ha.parse(t.permissions.toString()).toString():s=za.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?It(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?It(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Fi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:new Mi(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope),stringToSign:o}}function w8e(t,e){if(t=bp(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=Ha.parse(t.permissions.toString()).toString():s=za.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?It(t.startsOn,!1):"",t.expiresOn?It(t.expiresOn,!1):"",Ip(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?It(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?It(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?Fi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),i=e.computeHMACSHA256(o);return{sasQueryParameters:new Mi(t.version,i,s,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope,t.delegatedUserObjectId),stringToSign:o}}function Ip(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}function bp(t){let e=t.version?t.version:nS;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}var AE=class{_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=Xm()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Di||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Di||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 de.withSpan("BlobLeaseClient-acquireLease",r,async n=>Ie(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!==Di||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Di||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 de.withSpan("BlobLeaseClient-changeLease",r,async n=>{let s=Ie(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!==Di||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Di||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 de.withSpan("BlobLeaseClient-releaseLease",e,async r=>Ie(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!==Di||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Di||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 de.withSpan("BlobLeaseClient-renewLease",e,async r=>this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.ab
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"}};hf.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Sp=class extends Error{constructor(){super(`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
|
|
|
|
|
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"}};Sp.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var xE=class extends Error{constructor(e){super(e),this.name="RateLimitError"}};var I9e=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},b$=class{constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);Ue(`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=()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(r,e))};this.timeoutHandle=setTimeout(r,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};function Bce(t,e,r){return I9e(this,void 0,void 0,function*(){var n;let s=new Wc(t),o=s.getBlockBlobClient(),i=new b$((n=r?.archiveSizeBytes)!==null&&n!==void 0?n:0),a={blockSize:r?.uploadChunkSize,concurrency:r?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:i.onProgress()};try{i.startDisplayTimer(),k(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let c=yield o.uploadFile(e,a);if(c._response.status>=400)throw new cR(`uploadCacheArchiveSDK: upload failed with status code ${c._response.status}`);return c}catch(c){throw Rr(`uploadCacheArchiveSDK: internal error uploading cache archive: ${c.message}`),c}finally{i.stopDisplayTimer()}})}var Rce=S(require("buffer"),1),Va=S(require("fs"),1),Nce=S(require("stream"),1),Tce=S(require("util"),1);var lR=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};function uR(t){return t?t>=200&&t<300:!1}function b9e(t){return t?t>=500:!0}function x9e(t){return t?[fr.BadGateway,fr.ServiceUnavailable,fr.GatewayTimeout].includes(t):!1}function w9e(t){return lR(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}function Sce(t,e,r){return lR(this,arguments,void 0,function*(n,s,o,i=qw,a=$w,c=void 0){let l="",u=1;for(;u<=i;){let d,p,A=!1;try{d=yield s()}catch(g){c&&(d=c(g)),A=!0,l=g.message}if(d&&(p=o(d),!b9e(p)))return d;if(p&&(A=x9e(p),l=`Cache service responded with ${p}`),k(`${n} - Attempt ${u} of ${i} failed with error: ${l}`),!A){k(`${n} - Error is not retryable`);break}yield w9e(a),u++}throw Error(`${n} failed: ${l}`)})}function wE(t,e){return lR(this,arguments,void 0,function*(r,n,s=qw,o=$w){return yield Sce(r,n,i=>i.statusCode,s,o,i=>{if(i instanceof fa)return{statusCode:i.statusCode,result:null,headers:{},error:i}})})}function yf(t,e){return lR(this,arguments,void 0,function*(r,n,s=qw,o=$w){return yield Sce(r,n,i=>i.message.statusCode,s,o)})}var Yo=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})};function B9e(t,e){return Yo(this,void 0,void 0,function*(){yield Tce.promisify(Nce.pipeline)(t.message,e)})}var dR=class{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,k(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){this.receivedBytes=e}getTransferredBytes(){return this.segmentOffset+this.receivedBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.segmentOffset+this.receivedBytes,r=(100*(e/this.contentLength)).toFixed(1),n=Date.now()-this.startTime,s=(e/(1024*1024)/(n/1e3)).toFixed(1);Ue(`Received ${e} of ${this.contentLength} (${r}%), ${s} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setReceivedBytes(e.loadedBytes)}}startDisplayTimer(
Line truncated
|
|
|
|
|
Other caches with similar key:`);for(let a of o?.artifactCaches||[])k(`Cache Key: ${a?.cacheKey}, Cache Version: ${a?.cacheVersion}, Cache Scope: ${a?.scope}, Cache Created: ${a?.creationTime}`)}}})}function S$(t,e,r){return ks(this,void 0,void 0,function*(){let n=new Mce.URL(t),s=vce(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield Qce(t,e,s):s.concurrentBlobDownloads?yield Pce(t,e,s):yield pR(t,e):yield pR(t,e)})}function qce(t,e,r){return ks(this,void 0,void 0,function*(){let n=B$(),s=Hm(e,r?.compressionMethod,r?.enableCrossOsArchive),o={key:t,version:s,cacheSize:r?.cacheSize};return yield wE("reserveCache",()=>ks(this,void 0,void 0,function*(){return n.postJson(SE("caches"),o)}))})}function Fce(t,e){return`bytes ${t}-${e}/*`}function v9e(t,e,r,n,s){return ks(this,void 0,void 0,function*(){k(`Uploading chunk of size ${s-n+1} bytes at offset ${n} with content range: ${Fce(n,s)}`);let o={"Content-Type":"application/octet-stream","Content-Range":Fce(n,s)},i=yield yf(`uploadChunk (start: ${n}, end: ${s})`,()=>ks(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),o)}));if(!uR(i.message.statusCode))throw new Error(`Cache service responded with ${i.message.statusCode} during upload chunk.`)})}function D9e(t,e,r,n){return ks(this,void 0,void 0,function*(){let s=Ea(r),o=SE(`caches/${e.toString()}`),i=Ef.openSync(r,"r"),a=x$(n),c=fF("uploadConcurrency",a.uploadConcurrency),l=fF("uploadChunkSize",a.uploadChunkSize),u=[...new Array(c).keys()];k("Awaiting all uploads");let d=0;try{yield Promise.all(u.map(()=>ks(this,void 0,void 0,function*(){for(;d<s;){let p=Math.min(s-d,l),A=d,g=d+p-1;d+=l,yield v9e(t,o,()=>Ef.createReadStream(r,{fd:i,start:A,end:g,autoClose:!1}).on("error",E=>{throw new Error(`Cache upload failed because file read failed with ${E.message}`)}),A,g)}})))}finally{Ef.closeSync(i)}})}function k9e(t,e,r){return ks(this,void 0,void 0,function*(){let n={size:r};return yield wE("commitCache",()=>ks(this,void 0,void 0,function*(){return t.postJson(SE(`caches/${e.toString()}`),n)}))})}function R$(t,e,r,n){return ks(this,void 0,void 0,function*(){if(x$(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Bce(r,e,n)}else{let o=B$();k("Upload cache"),yield D9e(o,t,e,n),k("Commiting cache");let i=Ea(e);Ue(`Cache Size: ~${Math.round(i/(1024*1024))} MB (${i} B)`);let a=yield k9e(o,t,i);if(!uR(a.statusCode))throw new Error(`Cache service responded with ${a.statusCode} during commit cache.`);Ue("Cache saved successfully")}})}var kle=S(Nle(),1),_r=S(Qr(),1),mo=S(Qr(),1),Qp=S(Qr(),1),_p=S(Qr(),1),vp=S(Qr(),1);var IG=S(Qr(),1),bG=S(Qr(),1),_le=S(Qr(),1),vle=S(Qr(),1),Dle=S(Qr(),1);var yG=S(Qr(),1),EG=S(Qr(),1),Tle=S(Qr(),1),Ple=S(Qr(),1),Qle=S(Qr(),1),CG=class extends Qle.MessageType{constructor(){super("github.actions.results.entities.v1.CacheScope",[{no:1,name:"scope",kind:"scalar",T:9},{no:2,name:"permission",kind:"scalar",T:3}])}create(e){let r={scope:"",permission:"0"};return globalThis.Object.defineProperty(r,Ple.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,Tle.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),i=e.pos+r;for(;e.pos<i;){let[a,c]=e.tag();switch(a){case 1:o.scope=e.string();break;case 2:o.permission=e.int64().toString();break;default:let l=n.readUnknownField;if(l==="throw")throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);let u=e.skip(c);l!==!1&&(l===!0?EG.UnknownFieldHandler.onRead:l)(this.typeName,o,a,c,u)}}return o}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,yG.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,yG.WireType.Varint).int64(e.permission);let s=n.writeUnknownFields;return s!==!1&&(s==!0?EG.UnknownFieldHandler.onWrite:s)(this.typeName,e,r),r}},ZR=new CG;var xG=class extends Dle.MessageType{constructor(){super("github.actions.results.entities.v1.CacheMetadata",[{no:1,name:"repository_id",kind:"scalar",T:3},{no:2,name:"scope",kind:"message",repeat:1,T:()=>ZR}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,vle.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,_le.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),i=e.pos+r;for(;e.pos<i;){let[a,c]=e.tag();switch(a){case 1:o.repositoryId=e.int64().toString();break;case 2:o.scope.push(ZR.internalBinaryRead(e,e.uint32(),n));break;default:let l=n.readUnknownField;if(l==="throw")throw new globalThis.Error(`Unknown field ${a} (wire type ${c}) for ${this.typeName}`);let u=e.skip(c);l!==!1&&(l===!0?bG.UnknownFieldHandler.onRead:l)(this.typeName,o,a,c,u)}}return o}internalBinaryWrite(e,r,n){e.repositoryId!=="0"&&r.tag(1,IG.WireType.Varint).int64(e.repositoryId);for(let o=0;o<e.scope.length;o++)ZR.internalBinaryWrite(e.scope[o],r.tag(2,IG.WireType.LengthDelimited).fork(),n).join();let s=n.writeUnknownFields;return s!==!1&&(s==!0?bG.UnknownFieldHandler.onWrite:s)(this.ty
Line truncated
|
|
|
|
|
`));let n=yield FG(r,"create");yield MG(n,t)})}var Lf=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{l(n.next(u))}catch(d){i(d)}}function c(u){try{l(n.throw(u))}catch(d){i(d)}}function l(u){u.done?o(u.value):s(u.value).then(a,c)}l((n=n.apply(t,e||[])).next())})},$i=class t extends Error{constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},kf=class t extends Error{constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},n0=class t extends Error{constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function Mle(t){if(!t||t.length===0)throw new $i("Path Validation Error: At least one directory or file path is required")}function $G(t){if(t.length>512)throw new $i(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new $i(`Key Validation Error: ${t} cannot contain commas.`)}function GG(){return BE()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}function Ule(t,e,r,n){return Lf(this,arguments,void 0,function*(s,o,i,a,c=!1){let l=BE();return k(`Cache service version: ${l}`),Mle(s),l==="v2"?yield J6e(s,o,i,a,c):yield W6e(s,o,i,a,c)})}function W6e(t,e,r,n){return Lf(this,arguments,void 0,function*(s,o,i,a,c=!1){i=i||[];let l=[o,...i];if(k("Resolved Keys:"),k(JSON.stringify(l)),l.length>10)throw new $i("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of l)$G(p);let u=yield Ry(),d="";try{let p=yield Uce(l,s,{compressionMethod:u,enableCrossOsArchive:c});if(!p?.archiveLocation)return;if(a?.lookupOnly)return Ue("Lookup only - skipping download"),p.cacheKey;d=$E.join(yield By(),lu(u)),k(`Archive Path: ${d}`),yield S$(p.archiveLocation,d,a),ru()&&(yield qE(d,u));let A=Ea(d);return Ue(`Cache Size: ~${Math.round(A/(1024*1024))} MB (${A} B)`),yield UG(d,u),Ue("Cache restored successfully"),p.cacheKey}catch(p){let A=p;if(A.name===$i.name)throw p;A instanceof fa&&typeof A.statusCode=="number"&&A.statusCode>=500?Dm(`Failed to restore: ${p.message}`):Rr(`Failed to restore: ${p.message}`)}finally{try{yield Sy(d)}catch(p){k(`Failed to delete archive: ${p}`)}}})}function J6e(t,e,r,n){return Lf(this,arguments,void 0,function*(s,o,i,a,c=!1){a=Object.assign(Object.assign({},a),{useAzureSdk:!0}),i=i||[];let l=[o,...i];if(k("Resolved Keys:"),k(JSON.stringify(l)),l.length>10)throw new $i("Key Validation Error: Keys are limited to a maximum of 10.");for(let d of l)$G(d);let u="";try{let d=OG(),p=yield Ry(),A={key:o,restoreKeys:i,version:Hm(s,p,c)},g=yield d.GetCacheEntryDownloadURL(A);if(!g.ok){k(`Cache not found for version ${A.version} of keys: ${l.join(", ")}`);return}if(A.key!==g.matchedKey?Ue(`Cache hit for restore-key: ${g.matchedKey}`):Ue(`Cache hit for: ${g.matchedKey}`),a?.lookupOnly)return Ue("Lookup only - skipping download"),g.matchedKey;u=$E.join(yield By(),lu(p)),k(`Archive path: ${u}`),k(`Starting download of archive to: ${u}`),yield S$(g.signedDownloadUrl,u,a);let I=Ea(u);return Ue(`Cache Size: ~${Math.round(I/(1024*1024))} MB (${I} B)`),ru()&&(yield qE(u,p)),yield UG(u,p),Ue("Cache restored successfully"),g.matchedKey}catch(d){let p=d;if(p.name===$i.name)throw d;p instanceof fa&&typeof p.statusCode=="number"&&p.statusCode>=500?Dm(`Failed to restore: ${d.message}`):Rr(`Failed to restore: ${d.message}`)}finally{try{u&&(yield Sy(u))}catch(d){k(`Failed to delete archive: ${d}`)}}})}function HG(t,e,r){return Lf(this,arguments,void 0,function*(n,s,o,i=!1){let a=BE();return k(`Cache service version: ${a}`),Mle(n),$G(s),a==="v2"?yield X6e(n,s,o,i):yield K6e(n,s,o,i)})}function K6e(t,e,r){return Lf(this,arguments,void 0,function*(n,s,o,i=!1){var a,c,l,u,d;let p=yield Ry(),A=-1,g=yield mF(n);if(k("Cache Paths:"),k(`${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 E=yield By(),I=$E.join(E,lu(p));k(`Archive Path: ${I}`);try{yield qG(E,g,p),ru()&&(yield qE(I,p));let x=10*1024*1024*1024,b=Ea(I);if(k(`File Size: ${b}`),b>x&&!w$())throw new Error(`Cache size of ~${Math.round(b/(1024*1024))} MB (${b} B) is over the 10GB limit, not saving cache.`);k("Reserving Cache");let P=yield qce(s,n,{compressionMethod:p,enableCrossOsArchive:i,cacheSize:b});if(!((a=P?.result)===null||a===void 0)&&a.cacheId)A=(c=P?.result)===null||c===void 0?void 0:c.cacheId;else throw P?.statusCode===400?new Error((u=(l=P?.error)===null||l===void 0?void 0:l.message)!==null&&u!==void 0?u:`Cache size of ~${Math.round(b/(1024*1024))} MB (${b} B) is over the data cap limit, not saving cache.`):new kf(`Unable to reserve cache with key ${s}, another job may be creating this cache. More details: ${(d=P?.error)===null||d===void 0?void 0:d.message}`);k(`Saving Cache (ID: ${A})`),yield R$(A,I,"",o)}catch(x){let b=x;if(b.name===$i.name)throw x;b.name==
Line truncated
|
|
|
|
|
`+n(o)+s(o),c=(0,Upe.createHmac)("sha256",t.accountKey).update(a,"utf8").digest("base64");o.headers.set(Be.AUTHORIZATION,`SharedKey ${t.accountName}:${c}`)}i(e,"signRequest");function r(o,a){let c=o.headers.get(a);return!c||a===Be.CONTENT_LENGTH&&c==="0"?"":c}i(r,"getHeaderValueToSign");function n(o){let a=[];for(let[l,u]of o.headers)l.toLowerCase().startsWith(Be.PREFIX_FOR_STORAGE)&&a.push({name:l,value:u});a.sort((l,u)=>MR(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}i(n,"getCanonicalizedHeadersString");function s(o){let a=kR(o.url)||"/",c="";c+=`/${t.accountName}${a}`;let l=LR(o.url),u={};if(l){let d=[];for(let p in l)if(Object.prototype.hasOwnProperty.call(l,p)){let m=p.toLowerCase();u[m]=l[p],d.push(m)}d.sort();for(let p of d)c+=`
|
|
|
|
|
${p}:${decodeURIComponent(u[p])}`}return c}return i(s,"getCanonicalizedResourceString"),{name:jit,async sendRequest(o,a){return e(o),a(o)}}}i(VG,"storageSharedKeyCredentialPolicy");var Kit="storageRequestFailureDetailsParserPolicy";function qpe(){return{name:Kit,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}}}}i(qpe,"storageRequestFailureDetailsParserPolicy");var Gpe=require("node:crypto");var FR=class{static{i(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,Gpe.createHmac)("sha256",this.key).update(e,"utf8").digest("base64")}};var UR="12.31.0",qR="2026-02-06";var GR="https://storage.azure.com/.default",Dl={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}};var Oi="",WG="*",Xit=1*1024*1024;var Zit=4*Xit;var Hpe="AES256",$pe="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",zpe=["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"],Vpe=["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"],Wpe="BlobUsesCustomerSpecifiedEncryption",Ype="BlobDoesNotUseCustomerSpecifiedEncryption",Jpe=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function kl(t){if(!t||typeof t!="object")return!1;let e=t;return Array.isArray(e.factories)&&typeof e.options=="object"&&typeof e.toServiceClientOptions=="function"}i(kl,"isPipelineLike");var WC=class{static{i(this,"Pipeline")}factories;options;constructor(e,r={}){this.factories=e,this.options=r}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}};function yr(t,e={}){t||(t=new Ft);let r=new WC([],e);return r._credential=t,r}i(yr,"newPipeline");function eat(t){let e=[tat,jpe,rat,nat,sat,oat,aat];if(t.factories.length){let r=t.factories.filter(n=>!e.some(s=>s(n)));if(r.length){let n=r.some(s=>iat(s));return{wrappedPolicies:wG(r),afterRetry:n}}}}i(eat,"processDownlevelPipeline");function YG(t){let{httpClient:e,...r}=t.options,n=t._coreHttpClient;n||(n=e?SG(e):zG(),t._coreHttpClient=n);let s=t._corePipeline;if(!s){let o=`azsdk-js-azure-storage-blob/${UR}`,a=r.userAgentOptions&&r.userAgentOptions.userAgentPrefix?`${r.userAgentOptions.userAgentPrefix} ${o}`:`${o}`;s=TC({...r,loggingOptions:{additionalAllowedHeaderNames:zpe,additionalAllowedQueryParameters:Vpe,logger:TR.info},userAgentOptions:{userAgentPrefix:a},serializationOptions:{stringifyXML:NR,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:HG,serializerOptions:{xml:{xmlCharKey:"#"}}}}),s.removePolicy({phase:"Retry"}),s.removePolicy({name:Xq}),s.addPolicy(Mpe()),s.addPolicy(Fpe(r.retryOptions),{phase:"R
Line truncated
|
|
|
|
|
`),o=e.computeHMACSHA256(s);return{sasQueryParameters:new Gi(t.version,o,n,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,r,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType),stringToSign:s}}i(elt,"generateBlobSASQueryParameters20150405");function tlt(t,e){if(t=Em(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=dc.parse(t.permissions.toString()).toString():s=pc.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?at(t.startsOn,!1):"",t.expiresOn?at(t.expiresOn,!1):"",ym(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?qi(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(o);return{sasQueryParameters:new Gi(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:o}}i(tlt,"generateBlobSASQueryParameters20181109");function rlt(t,e){if(t=Em(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=dc.parse(t.permissions.toString()).toString():s=pc.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?at(t.startsOn,!1):"",t.expiresOn?at(t.expiresOn,!1):"",ym(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?qi(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(o);return{sasQueryParameters:new Gi(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:o}}i(rlt,"generateBlobSASQueryParameters20201206");function nlt(t,e){if(t=Em(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=dc.parse(t.permissions.toString()).toString():s=pc.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?at(t.startsOn,!1):"",t.expiresOn?at(t.expiresOn,!1):"",ym(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?at(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?at(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?qi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(o);return{sasQueryParameters:new Gi(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:o}}i(nlt,"generateBlobSASQueryParametersUDK20181109");function slt(t,e){if(t=Em(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=dc.parse(t.permissions.toString()).toString():s=pc.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?at(t.startsOn,!1):"",t.expiresOn?at(t.expiresOn,!1):"",ym(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?at(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?at(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?qi(t.ipRange):"",t.protocol?t.protocol:"",t.version,r,n,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
|
|
|
|
`),a=e.computeHMACSHA256(o);return{sasQueryParameters:new Gi(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:o}}i(slt,"generateBlobSASQueryParametersUDK20200210");function olt(t,e){if(t=Em(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=dc.parse(t.permissions.toString()).toString():s=pc.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?at(t.startsOn,!1):"",t.expiresOn?at(t.expiresOn,!1):"",ym(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?at(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?at(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?qi(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(o);return{sasQueryParameters:new Gi(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:o}}i(olt,"generateBlobSASQueryParametersUDK20201206");function ilt(t,e){if(t=Em(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=dc.parse(t.permissions.toString()).toString():s=pc.parse(t.permissions.toString()).toString());let o=[s||"",t.startsOn?at(t.startsOn,!1):"",t.expiresOn?at(t.expiresOn,!1):"",ym(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?at(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?at(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,void 0,t.delegatedUserObjectId,t.ipRange?qi(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(o);return{sasQueryParameters:new Gi(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:o}}i(ilt,"generateBlobSASQueryParametersUDK20250705");function ym(t,e,r){let n=[`/blob/${t}/${e}`];return r&&n.push(`/${r}`),n.join("")}i(ym,"getCanonicalName");function Em(t){let e=t.version?t.version:qR;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}i(Em,"SASSignatureValuesSanityCheckAndAutofill");var oI=class{static{i(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=eh()),this._leaseId=r}async acquireLease(e,r={}){if(this._isContainer&&(r.conditions?.ifMatch&&r.conditions?.ifMatch!==Oi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Oi||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=>ue(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!==Oi||r.conditions?.ifNoneMatch&&r.conditions?.ifNoneMatch!==Oi||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=ue(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!==Oi||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Oi||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=>ue(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!==Oi||e.conditions?.ifNoneMatch&&e.conditions?.ifNoneMatch!==Oi||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
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"}};Ch.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var Sm=class extends Error{static{i(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"}};Sm.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1;var AI=class extends Error{static{i(this,"RateLimitError")}constructor(e){super(e),this.name="RateLimitError"}};var nut=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},k3=class{static{i(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);be(`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=i(()=>{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 Zfe(t,e,r){return nut(this,void 0,void 0,function*(){var n;let s=new Gl(t),o=s.getBlockBlobClient(),a=new k3((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(),v(`BlobClient: ${s.name}:${s.accountName}:${s.containerName}`);let l=yield o.uploadFile(e,c);if(l._response.status>=400)throw new VN(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw Ar(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{a.stopDisplayTimer()}})}i(Zfe,"uploadCacheArchiveSDK");var tAe=R(require("buffer"),1),mc=R(require("fs"),1),rAe=R(require("stream"),1),nAe=R(require("util"),1);var WN=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function YN(t){return t?t>=200&&t<300:!1}i(YN,"isSuccessStatusCode");function sut(t){return t?t>=500:!0}i(sut,"isServerErrorStatusCode");function out(t){return t?[ft.BadGateway,ft.ServiceUnavailable,ft.GatewayTimeout].includes(t):!1}i(out,"isRetryableStatusCode");function iut(t){return WN(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}i(iut,"sleep");function eAe(t,e,r){return WN(this,arguments,void 0,function*(n,s,o,a=yB,c=EB,l=void 0){let u="",d=1;for(;d<=a;){let p,m,f=!1;try{p=yield s()}catch(A){l&&(p=l(A)),f=!0,u=A.message}if(p&&(m=o(p),!sut(m)))return p;if(m&&(f=out(m),u=`Cache service responded with ${m}`),v(`${n} - Attempt ${d} of ${a} failed with error: ${u}`),!f){v(`${n} - Error is not retryable`);break}yield iut(c),d++}throw Error(`${n} failed: ${u}`)})}i(eAe,"retry");function hI(t,e){return WN(this,arguments,void 0,function*(r,n,s=yB,o=EB){return yield eAe(r,n,a=>a.statusCode,s,o,a=>{if(a instanceof Fa)return{statusCode:a.statusCode,result:null,headers:{},error:a}})})}i(hI,"retryTypedResponse");function Ih(t,e){return WN(this,arguments,void 0,function*(r,n,s=yB,o=EB){return yield eAe(r,n,a=>a.message.statusCode,s,o)})}i(Ih,"retryHttpClientResponse");var Xo=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})};function aut(t,e){return Xo(this,void 0,void 0,function*(){yield nAe.promisify(rAe.pipeline)(t.message,e)})}i(aut,"pipeResponseToStream");var JN=class{static{i(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,v(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`)}setReceivedBytes(e){t
Line truncated
|
|
|
|
|
Other caches with similar key:`);for(let c of o?.artifactCaches||[])v(`Cache Key: ${c?.cacheKey}, Cache Version: ${c?.cacheVersion}, Cache Scope: ${c?.scope}, Cache Created: ${c?.creationTime}`)}}})}i(fut,"printCachesListForDiagnostics");function U3(t,e,r){return Ts(this,void 0,void 0,function*(){let n=new hAe.URL(t),s=aAe(r);n.hostname.endsWith(".blob.core.windows.net")?s.useAzureSdk?yield oAe(t,e,s):s.concurrentBlobDownloads?yield sAe(t,e,s):yield jN(t,e):yield jN(t,e)})}i(U3,"downloadCache");function yAe(t,e,r){return Ts(this,void 0,void 0,function*(){let n=F3(),s=zA(e,r?.compressionMethod,r?.enableCrossOsArchive),o={key:t,version:s,cacheSize:r?.cacheSize};return yield hI("reserveCache",()=>Ts(this,void 0,void 0,function*(){return n.postJson(yI("caches"),o)}))})}i(yAe,"reserveCache");function AAe(t,e){return`bytes ${t}-${e}/*`}i(AAe,"getContentRange");function Aut(t,e,r,n,s){return Ts(this,void 0,void 0,function*(){v(`Uploading chunk of size ${s-n+1} bytes at offset ${n} with content range: ${AAe(n,s)}`);let o={"Content-Type":"application/octet-stream","Content-Range":AAe(n,s)},a=yield Ih(`uploadChunk (start: ${n}, end: ${s})`,()=>Ts(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,r(),o)}));if(!YN(a.message.statusCode))throw new Error(`Cache service responded with ${a.message.statusCode} during upload chunk.`)})}i(Aut,"uploadChunk");function hut(t,e,r,n){return Ts(this,void 0,void 0,function*(){let s=Ma(r),o=yI(`caches/${e.toString()}`),a=wh.openSync(r,"r"),c=L3(n),l=pq("uploadConcurrency",c.uploadConcurrency),u=pq("uploadChunkSize",c.uploadChunkSize),d=[...new Array(l).keys()];v("Awaiting all uploads");let p=0;try{yield Promise.all(d.map(()=>Ts(this,void 0,void 0,function*(){for(;p<s;){let m=Math.min(s-p,u),f=p,A=p+m-1;p+=u,yield Aut(t,o,()=>wh.createReadStream(r,{fd:a,start:f,end:A,autoClose:!1}).on("error",h=>{throw new Error(`Cache upload failed because file read failed with ${h.message}`)}),f,A)}})))}finally{wh.closeSync(a)}})}i(hut,"uploadFile");function gut(t,e,r){return Ts(this,void 0,void 0,function*(){let n={size:r};return yield hI("commitCache",()=>Ts(this,void 0,void 0,function*(){return t.postJson(yI(`caches/${e.toString()}`),n)}))})}i(gut,"commitCache");function q3(t,e,r,n){return Ts(this,void 0,void 0,function*(){if(L3(n).useAzureSdk){if(!r)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield Zfe(r,e,n)}else{let o=F3();v("Upload cache"),yield hut(o,t,e,n),v("Commiting cache");let a=Ma(e);be(`Cache Size: ~${Math.round(a/(1024*1024))} MB (${a} B)`);let c=yield gut(o,t,a);if(!YN(c.statusCode))throw new Error(`Cache service responded with ${c.statusCode} during commit cache.`);be("Cache saved successfully")}})}i(q3,"saveCache");var phe=R(ohe(),1),Ir=R(Cr(),1),ho=R(Cr(),1),Nm=R(Cr(),1),Tm=R(Cr(),1),vm=R(Cr(),1);var kV=R(Cr(),1),LV=R(Cr(),1),lhe=R(Cr(),1),uhe=R(Cr(),1),dhe=R(Cr(),1);var QV=R(Cr(),1),_V=R(Cr(),1),ihe=R(Cr(),1),ahe=R(Cr(),1),che=R(Cr(),1);var DV=class extends che.MessageType{static{i(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,ahe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,ihe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:o.scope=e.string();break;case 2:o.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?_V.UnknownFieldHandler.onRead:u)(this.typeName,o,c,l,d)}}return o}internalBinaryWrite(e,r,n){e.scope!==""&&r.tag(1,QV.WireType.LengthDelimited).string(e.scope),e.permission!=="0"&&r.tag(2,QV.WireType.Varint).int64(e.permission);let s=n.writeUnknownFields;return s!==!1&&(s==!0?_V.UnknownFieldHandler.onWrite:s)(this.typeName,e,r),r}},OT=new DV;var OV=class extends dhe.MessageType{static{i(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:i(()=>OT,"T")}])}create(e){let r={repositoryId:"0",scope:[]};return globalThis.Object.defineProperty(r,uhe.MESSAGE_TYPE,{enumerable:!1,value:this}),e!==void 0&&(0,lhe.reflectionMergePartial)(this,r,e),r}internalBinaryRead(e,r,n,s){let o=s??this.create(),a=e.pos+r;for(;e.pos<a;){let[c,l]=e.tag();switch(c){case 1:o.repositoryId=e.int64().toString();break;case 2:o.scope.push(OT.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?LV.UnknownFieldHandler.onRead:u)(this.typeName,o,c,l,d)}}return o}internalBinaryWrite(e,r,n){e.repositoryId!
Line truncated
|
|
|
|
|
`));let n=yield XV(r,"create");yield ZV(n,t)})}i(t4,"createTar");var Mh=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return i(s,"adopt"),new(r||(r=Promise))(function(o,a){function c(d){try{u(n.next(d))}catch(p){a(p)}}i(c,"fulfilled");function l(d){try{u(n.throw(d))}catch(p){a(p)}}i(l,"rejected");function u(d){d.done?o(d.value):s(d.value).then(c,l)}i(u,"step"),u((n=n.apply(t,e||[])).next())})},zi=class t extends Error{static{i(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}},Pm=class t extends Error{static{i(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}},r4="cache write denied:",qT=class t extends Pm{static{i(this,"CacheWriteDeniedError")}constructor(e){super(e),this.name="CacheWriteDeniedError",Object.setPrototypeOf(this,t.prototype)}},hhe=CB,GT=class t extends Error{static{i(this,"CacheReadDeniedError")}constructor(e){super(e),this.name="CacheReadDeniedError",Object.setPrototypeOf(this,t.prototype)}},HT=class t extends Error{static{i(this,"FinalizeCacheError")}constructor(e){super(e),this.name="FinalizeCacheError",Object.setPrototypeOf(this,t.prototype)}};function ghe(t){if(!t||t.length===0)throw new zi("Path Validation Error: At least one directory or file path is required")}i(ghe,"checkPaths");function n4(t){if(t.length>512)throw new zi(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new zi(`Key Validation Error: ${t} cannot contain commas.`)}i(n4,"checkKey");function s4(){return gI()==="v2"?!!process.env.ACTIONS_RESULTS_URL:!!process.env.ACTIONS_CACHE_URL}i(s4,"isFeatureAvailable");function yhe(t,e,r,n){return Mh(this,arguments,void 0,function*(s,o,a,c,l=!1){let u=gI();v(`Cache service version: ${u}`),ghe(s);let d=M3();if(!lAe(d)){be(`Cache restore skipped: the effective cache-mode '${d}' does not permit reads.`),v(`Skipped restore for paths [${s.join(", ")}] with primary key '${o}'.`);return}return u==="v2"?yield Qpt(s,o,a,c,l):yield Ppt(s,o,a,c,l)})}i(yhe,"restoreCache");function Ppt(t,e,r,n){return Mh(this,arguments,void 0,function*(s,o,a,c,l=!1){var u;a=a||[];let d=[o,...a];if(v("Resolved Keys:"),v(JSON.stringify(d)),d.length>10)throw new zi("Key Validation Error: Keys are limited to a maximum of 10.");for(let f of d)n4(f);let p=yield hC(),m="";try{let f;try{f=yield gAe(d,s,{compressionMethod:p,enableCrossOsArchive:l})}catch(h){let E=(u=h?.message)!==null&&u!==void 0?u:"";throw E.includes(hhe)?new GT(E):h}if(!f?.archiveLocation)return;if(c?.lookupOnly)return be("Lookup only - skipping download"),f.cacheKey;m=DI.join(yield fC(),Vu(p)),v(`Archive Path: ${m}`),yield U3(f.archiveLocation,m,c),$p()&&(yield _I(m,p));let A=Ma(m);return be(`Cache Size: ~${Math.round(A/(1024*1024))} MB (${A} B)`),yield e4(m,p),be("Cache restored successfully"),f.cacheKey}catch(f){let A=f;if(A.name===zi.name)throw f;A instanceof Fa&&typeof A.statusCode=="number"&&A.statusCode>=500?kA(`Failed to restore: ${f.message}`):Ar(`Failed to restore: ${f.message}`)}finally{try{yield AC(m)}catch(f){v(`Failed to delete archive: ${f}`)}}})}i(Ppt,"restoreCacheV1");function Qpt(t,e,r,n){return Mh(this,arguments,void 0,function*(s,o,a,c,l=!1){var u;c=Object.assign(Object.assign({},c),{useAzureSdk:!0}),a=a||[];let d=[o,...a];if(v("Resolved Keys:"),v(JSON.stringify(d)),d.length>10)throw new zi("Key Validation Error: Keys are limited to a maximum of 10.");for(let m of d)n4(m);let p="";try{let m=KV(),f=yield hC(),A={key:o,restoreKeys:a,version:zA(s,f,l)},h;try{h=yield m.GetCacheEntryDownloadURL(A)}catch(w){let x=(u=w?.message)!==null&&u!==void 0?u:"";throw x.includes(hhe)?new GT(x):w}if(!h.ok){v(`Cache not found for version ${A.version} of keys: ${d.join(", ")}`);return}if(A.key!==h.matchedKey?be(`Cache hit for restore-key: ${h.matchedKey}`):be(`Cache hit for: ${h.matchedKey}`),c?.lookupOnly)return be("Lookup only - skipping download"),h.matchedKey;p=DI.join(yield fC(),Vu(f)),v(`Archive path: ${p}`),v(`Starting download of archive to: ${p}`),yield U3(h.signedDownloadUrl,p,c);let C=Ma(p);return be(`Cache Size: ~${Math.round(C/(1024*1024))} MB (${C} B)`),$p()&&(yield _I(p,f)),yield e4(p,f),be("Cache restored successfully"),h.matchedKey}catch(m){let f=m;if(f.name===zi.name)throw m;f instanceof Fa&&typeof f.statusCode=="number"&&f.statusCode>=500?kA(`Failed to restore: ${m.message}`):Ar(`Failed to restore: ${m.message}`)}finally{try{p&&(yield AC(p))}catch(m){v(`Failed to delete archive: ${m}`)}}})}i(Qpt,"restoreCacheV2");function o4(t,e,r){return Mh(this,arguments,void 0,function*(n,s,o,a=!1){let c=gI();v(`Cache service version: ${c}`),ghe(n),n4(s);let l=M3();return uAe(l)?c==="v2"?yield Dpt(n,s,o,a):yield _pt(n,s,o,a):(be(`Cache save skipped: the effective cache-mode '${l}' does not permit writes.`),v(`Skipped save for paths [${n.join(", ")}] with key '${s}'.`),-1)})}i(o4,"saveCache");function _pt(t,e,r){return Mh(this,argu
Line truncated
|
|
|
|
|
${l}`}let p=c4(t.buffer,s[c],o[c],t.position,d);l+=`${" ".repeat(r.indent)}${l4((t.line+1).toString(),u)} | ${p.str}
|
|
|
|
|
`,l+=`${"-".repeat(r.indent+u+3+p.pos)}^
|
|
|
|
|
`;for(let m=1;m<=r.linesAfter&&!(c+m>=o.length);m++){let f=c4(t.buffer,s[c+m],o[c+m],t.position-(s[c]-s[c+m]),d);l+=`${" ".repeat(r.indent)}${l4((t.line+m+1).toString(),u)} | ${f.str}
|
|
|
|
|
`}return l.replace(/\n$/,"")}i(Hmt,"makeSnippet");function xhe(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),n+" "+r):n}function HE(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=iue(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}HE.prototype=Object.create(Error.prototype);HE.prototype.constructor=HE;HE.prototype.toString=function(e){return this.name+": "+iue(this,e)};var Fs=HE;function YG(t,e,r,n,s){var o="",i="",a=Math.floor(s/2)-1;return n-e>a&&(o=" ... ",e=n-a+o.length),r-n>a&&(i=" ...",r=n+a-i.length),{str:o+t.slice(e,r).replace(/\t/g,"\u2192")+i,pos:n-e+o.length}}function jG(t,e){return Wr.repeat(" ",e-t.length)+t}function pXe(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],s=[],o,i=-1;o=r.exec(t.buffer);)s.push(o.index),n.push(o.index+o[0].length),t.position<=o.index&&i<0&&(i=n.length-2);i<0&&(i=n.length-1);var a="",c,l,u=Math.min(t.line+e.linesAfter,s.length).toString().length,d=e.maxLength-(e.indent+u+3);for(c=1;c<=e.linesBefore&&!(i-c<0);c++)l=YG(t.buffer,n[i-c],s[i-c],t.position-(n[i]-n[i-c]),d),a=Wr.repeat(" ",e.indent)+jG((t.line-c+1).toString(),u)+" | "+l.str+`
|
|
|
|
|
`+a;for(l=YG(t.buffer,n[i],s[i],t.position,d),a+=Wr.repeat(" ",e.indent)+jG((t.line+1).toString(),u)+" | "+l.str+`
|
|
|
|
|
`,a+=Wr.repeat("-",e.indent+u+3+l.pos)+`^
|
|
|
|
|
`,c=1;c<=e.linesAfter&&!(i+c>=s.length);c++)l=YG(t.buffer,n[i+c],s[i+c],t.position-(n[i]-n[i+c]),d),a+=Wr.repeat(" ",e.indent)+jG((t.line+c+1).toString(),u)+" | "+l.str+`
|
|
|
|
|
`;return a.replace(/\n$/,"")}var AXe=pXe,mXe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],fXe=["scalar","sequence","mapping"];function gXe(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}function hXe(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(mXe.indexOf(r)===-1)throw new Fs('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=gXe(e.styleAliases||null),fXe.indexOf(this.kind)===-1)throw new Fs('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Dn=hXe;function Hle(t,e){var r=[];return t[e].forEach(function(n){var s=r.length;r.forEach(function(o,i){o.tag===n.tag&&o.kind===n.kind&&o.multi===n.multi&&(s=i)}),r[s]=n}),r}function yXe(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(s){s.multi?(t.multi[s.kind].push(s),t.multi.fallback.push(s)):t[s.kind][s.tag]=t.fallback[s.tag]=s}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}function JG(t){return this.extend(t)}JG.prototype.extend=function(e){var r=[],n=[];if(e instanceof Dn)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new Fs("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof Dn))throw new Fs("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new Fs("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new Fs("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(o){if(!(o instanceof Dn))throw new Fs("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(JG.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(n),s.compiledImplicit=Hle(s,"implicit"),s.compiledExplicit=Hle(s,"explicit"),s.compiledTypeMap=yXe(s.compiledImplicit,s.compiledExplicit),s};var EXe=JG,CXe=new Dn("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),IXe=new Dn("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),bXe=new Dn("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),xXe=new EXe({explicit:[CXe,IXe,bXe]});function wXe(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function BXe(){return null}function SXe(t){return t===null}var RXe=new Dn("tag:yaml.org,2002:null",{kind:"scalar",resolve:wXe,construct:BXe,predicate:SXe,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function NXe(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function TXe(t){return t==="true"||t==="True"||t==="TRUE"}function PXe(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var QXe=new Dn("tag:yaml.org,2002:bool",{kind:"scalar",resolve:NXe,construct:TXe,predicate:PXe,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function _Xe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function vXe(t){return 48<=t&&t<=55}function DXe(t){return 48<=t&&t<=57}function kXe(t){if(t===null)return!1;var e=t.length,r=0,n=!1,s;if(!e)return!1;if(s=t[r],(s==="-"||s==="+")&&(s=t[++r]),s==="0"){if(r+1===e)return!0;if(s=t[++r],s==="b"){for(r++;r<e;r++)if(s=t[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;n=!0}return n&&s!=="_"}if(s==="x"){for(r++;r<e;r++)if(s=t[r],s!=="_"){if(!_Xe(t.charCodeAt(r)))return!1;n=!0}return n&&s!=="_"}if(s==="o"){for(r++;r<e;r++)if(s=t[r],s!=="_"){if(!vXe(t.charCodeAt(r)))return!1;n=!0}return n&&s!=="_"}}if(s==="_")return!1;for(;r<e;r++)if(s=t[r],s!=="_"){if(!DXe(t.charCodeAt(r)))return!1;n=!0}return!(!n||s==="_")}function LXe(t){var e=t,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;
Line truncated
|
|
|
|
|
\r`;function eZe(t){if(t===null)return!1;var e,r,n=0,s=t.length,o=tH;for(r=0;r<s;r++)if(e=o.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}function tZe(t){var e,r,n=t.replace(/[\r\n=]/g,""),s=n.length,o=tH,i=0,a=[];for(e=0;e<s;e++)e%4===0&&e&&(a.push(i>>16&255),a.push(i>>8&255),a.push(i&255)),i=i<<6|o.indexOf(n.charAt(e));return r=s%4*6,r===0?(a.push(i>>16&255),a.push(i>>8&255),a.push(i&255)):r===18?(a.push(i>>10&255),a.push(i>>2&255)):r===12&&a.push(i>>4&255),new Uint8Array(a)}function rZe(t){var e="",r=0,n,s,o=t.length,i=tH;for(n=0;n<o;n++)n%3===0&&n&&(e+=i[r>>18&63],e+=i[r>>12&63],e+=i[r>>6&63],e+=i[r&63]),r=(r<<8)+t[n];return s=o%3,s===0?(e+=i[r>>18&63],e+=i[r>>12&63],e+=i[r>>6&63],e+=i[r&63]):s===2?(e+=i[r>>10&63],e+=i[r>>4&63],e+=i[r<<2&63],e+=i[64]):s===1&&(e+=i[r>>2&63],e+=i[r<<4&63],e+=i[64],e+=i[64]),e}function nZe(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var sZe=new Dn("tag:yaml.org,2002:binary",{kind:"scalar",resolve:eZe,construct:tZe,predicate:nZe,represent:rZe}),oZe=Object.prototype.hasOwnProperty,iZe=Object.prototype.toString;function aZe(t){if(t===null)return!0;var e=[],r,n,s,o,i,a=t;for(r=0,n=a.length;r<n;r+=1){if(s=a[r],i=!1,iZe.call(s)!=="[object Object]")return!1;for(o in s)if(oZe.call(s,o))if(!i)i=!0;else return!1;if(!i)return!1;if(e.indexOf(o)===-1)e.push(o);else return!1}return!0}function cZe(t){return t!==null?t:[]}var lZe=new Dn("tag:yaml.org,2002:omap",{kind:"sequence",resolve:aZe,construct:cZe}),uZe=Object.prototype.toString;function dZe(t){if(t===null)return!0;var e,r,n,s,o,i=t;for(o=new Array(i.length),e=0,r=i.length;e<r;e+=1){if(n=i[e],uZe.call(n)!=="[object Object]"||(s=Object.keys(n),s.length!==1))return!1;o[e]=[s[0],n[s[0]]]}return!0}function pZe(t){if(t===null)return[];var e,r,n,s,o,i=t;for(o=new Array(i.length),e=0,r=i.length;e<r;e+=1)n=i[e],s=Object.keys(n),o[e]=[s[0],n[s[0]]];return o}var AZe=new Dn("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:dZe,construct:pZe}),mZe=Object.prototype.hasOwnProperty;function fZe(t){if(t===null)return!0;var e,r=t;for(e in r)if(mZe.call(r,e)&&r[e]!==null)return!1;return!0}function gZe(t){return t!==null?t:{}}var hZe=new Dn("tag:yaml.org,2002:set",{kind:"mapping",resolve:fZe,construct:gZe}),lue=YXe.extend({implicit:[KXe,ZXe],explicit:[sZe,lZe,AZe,hZe]}),Su=Object.prototype.hasOwnProperty,o0=1,uue=2,due=3,i0=4,WG=1,yZe=2,zle=3,EZe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,CZe=/[\x85\u2028\u2029]/,IZe=/[,\[\]\{\}]/,pue=/^(?:!|!!|![a-z\-]+!)$/i,Aue=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Vle(t){return Object.prototype.toString.call(t)}function Xa(t){return t===10||t===13}function kp(t){return t===9||t===32}function Ms(t){return t===9||t===32||t===10||t===13}function Mf(t){return t===44||t===91||t===93||t===123||t===125}function bZe(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function xZe(t){return t===120?2:t===117?4:t===85?8:0}function wZe(t){return 48<=t&&t<=57?t-48:-1}function Yle(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
|
|
|
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function BZe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function mue(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}var fue=new Array(256),gue=new Array(256);for(Dp=0;Dp<256;Dp++)fue[Dp]=Yle(Dp)?1:0,gue[Dp]=Yle(Dp);var Dp;function SZe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||lue,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function hue(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=AXe(r),new Fs(e,r)}function he(t,e){throw hue(t,e)}function a0(t,e){t.onWarning&&t.onWarning.call(null,hue(t,e))}var jle={YAML:function(e,r,n){var s,o,i;e.version!==null&&he(e,"duplication of %YAML directive"),n.length!==1&&he(e,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),s===null&&he(e,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),i=parseInt(s[2],10),o!==1&&he(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=i<2,i!==1&&i!==2&&a0(e,"unsupported YAML version of the document")},TAG:function(e,r,n){var s,o;n.length!==2&&he(e,"TAG directive accepts exactly two arguments"),s=n[0],o=n[1],pue.test(s)||he(e,"ill-formed tag handle (first argument) of the TAG directive"),Su.call(e.tagMap,s)&&he(e,'there is a previously declared suffix for "'+s+'" tag handle'),Aue.test(o)||he(e,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{he(e,"tag prefix is malformed: "+o)}e.tagMap[s]=o}};function Bu(t,e,r,n){var s,o,i,a;if(e<r){if(a=t.input.slice(e,r),n)for(s=0,o=a.length;s<o;s+=1)i=a.charCodeAt(s),i===9||32<=i&&i<=1114111||he(t,"expected valid JSON character");else EZe.test(a)&&he(t,"the stream contains non-printable characters");t.result+=a}}function Wle(t,e,r,n){var s,o,i,a;for(Wr.isObject(r)||he(t,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),i=0,a=s.length;i<a;i+=1)o=s[i],Su.call(e,o)||(mue(e,o,r[o]),n[o]=!0)}function Uf(t,e,r,n,s,o,i,a,c){var l,u;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),l=0,u=s.length;l<u;l+=1)Array.isArray(s[l])&&he(t,"nested arrays are not supported inside keys"),typeof s=="object"&&Vle(s[l])==="[object Object]"&&(s[l]="[object Object]");if(typeof s=="object"&&Vle(s)==="[object Object]"&&(s="[object Object]"),s=String(s),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(l=0,u=o.length;l<u;l+=1)Wle(t,e,o[l],r);else Wle(t,e,o,r);else!t.json&&!Su.call(r,s)&&Su.call(e,s)&&(t.line=i||t.line,t.lineStart=a||t.lineStart,t.position=c||t.position,he(t,"duplicated mapping key")),mue(e,s,o),delete r[s];return e}function rH(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):he(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function Mr(t,e,r){for(var n=0,s=t.input.charCodeAt(t.position);s!==0;){for(;kp(s);)s===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),s=t.input.charCodeAt(++t.position);if(e&&s===35)do s=t.input.charCodeAt(++t.position);while(s!==10&&s!==13&&s!==0);if(Xa(s))for(rH(t),s=t.input.charCodeAt(t.position),n++,t.lineIndent=0;s===32;)t.lineIndent++,s=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&a0(t,"deficient indentation"),n}function u0(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Ms(r)))}function nH(t,e){e===1?t.result+=" ":e>1&&(t.result+=Wr.repeat(`
|
|
|
|
|
`,e-1))}function RZe(t,e,r){var n,s,o,i,a,c,l,u,d=t.kind,p=t.result,A;if(A=t.input.charCodeAt(t.position),Ms(A)||Mf(A)||A===35||A===38||A===42||A===33||A===124||A===62||A===39||A===34||A===37||A===64||A===96||(A===63||A===45)&&(s=t.input.charCodeAt(t.position+1),Ms(s)||r&&Mf(s)))return!1;for(t.kind="scalar",t.result="",o=i=t.position,a=!1;A!==0;){if(A===58){if(s=t.input.charCodeAt(t.position+1),Ms(s)||r&&Mf(s))break}else if(A===35){if(n=t.input.charCodeAt(t.position-1),Ms(n))break}else{if(t.position===t.lineStart&&u0(t)||r&&Mf(A))break;if(Xa(A))if(c=t.line,l=t.lineStart,u=t.lineIndent,Mr(t,!1,-1),t.lineIndent>=e){a=!0,A=t.input.charCodeAt(t.position);continue}else{t.position=i,t.line=c,t.lineStart=l,t.lineIndent=u;break}}a&&(Bu(t,o,i,!1),nH(t,t.line-c),o=i=t.position,a=!1),kp(A)||(i=t.position+1),A=t.input.charCodeAt(++t.position)}return Bu(t,o,i,!1),t.result?!0:(t.kind=d,t.result=p,!1)}function NZe(t,e){var r,n,s;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=s=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Bu(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,s=t.position;else return!0;else Xa(r)?(Bu(t,n,s,!0),nH(t,Mr(t,!1,e)),n=s=t.position):t.position===t.lineStart&&u0(t)?he(t,"unexpected end of the document within a single quoted scalar"):(t.position++,s=t.position);he(t,"unexpected end of the stream within a single quoted scalar")}function TZe(t,e){var r,n,s,o,i,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return Bu(t,r,t.position,!0),t.position++,!0;if(a===92){if(Bu(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),Xa(a))Mr(t,!1,e);else if(a<256&&fue[a])t.result+=gue[a],t.position++;else if((i=xZe(a))>0){for(s=i,o=0;s>0;s--)a=t.input.charCodeAt(++t.position),(i=bZe(a))>=0?o=(o<<4)+i:he(t,"expected hexadecimal character");t.result+=BZe(o),t.position++}else he(t,"unknown escape sequence");r=n=t.position}else Xa(a)?(Bu(t,r,n,!0),nH(t,Mr(t,!1,e)),r=n=t.position):t.position===t.lineStart&&u0(t)?he(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}he(t,"unexpected end of the stream within a double quoted scalar")}function PZe(t,e){var r=!0,n,s,o,i=t.tag,a,c=t.anchor,l,u,d,p,A,g=Object.create(null),E,I,x,b;if(b=t.input.charCodeAt(t.position),b===91)u=93,A=!1,a=[];else if(b===123)u=125,A=!0,a={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),b=t.input.charCodeAt(++t.position);b!==0;){if(Mr(t,!0,e),b=t.input.charCodeAt(t.position),b===u)return t.position++,t.tag=i,t.anchor=c,t.kind=A?"mapping":"sequence",t.result=a,!0;r?b===44&&he(t,"expected the node content, but found ','"):he(t,"missed comma between flow collection entries"),I=E=x=null,d=p=!1,b===63&&(l=t.input.charCodeAt(t.position+1),Ms(l)&&(d=p=!0,t.position++,Mr(t,!0,e))),n=t.line,s=t.lineStart,o=t.position,qf(t,e,o0,!1,!0),I=t.tag,E=t.result,Mr(t,!0,e),b=t.input.charCodeAt(t.position),(p||t.line===n)&&b===58&&(d=!0,b=t.input.charCodeAt(++t.position),Mr(t,!0,e),qf(t,e,o0,!1,!0),x=t.result),A?Uf(t,a,g,I,E,x,n,s,o):d?a.push(Uf(t,null,g,I,E,x,n,s,o)):a.push(E),Mr(t,!0,e),b=t.input.charCodeAt(t.position),b===44?(r=!0,b=t.input.charCodeAt(++t.position)):r=!1}he(t,"unexpected end of the stream within a flow collection")}function QZe(t,e){var r,n,s=WG,o=!1,i=!1,a=e,c=0,l=!1,u,d;if(d=t.input.charCodeAt(t.position),d===124)n=!1;else if(d===62)n=!0;else return!1;for(t.kind="scalar",t.result="";d!==0;)if(d=t.input.charCodeAt(++t.position),d===43||d===45)WG===s?s=d===43?zle:yZe:he(t,"repeat of a chomping mode identifier");else if((u=wZe(d))>=0)u===0?he(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):i?he(t,"repeat of an indentation width identifier"):(a=e+u-1,i=!0);else break;if(kp(d)){do d=t.input.charCodeAt(++t.position);while(kp(d));if(d===35)do d=t.input.charCodeAt(++t.position);while(!Xa(d)&&d!==0)}for(;d!==0;){for(rH(t),t.lineIndent=0,d=t.input.charCodeAt(t.position);(!i||t.lineIndent<a)&&d===32;)t.lineIndent++,d=t.input.charCodeAt(++t.position);if(!i&&t.lineIndent>a&&(a=t.lineIndent),Xa(d)){c++;continue}if(t.lineIndent<a){s===zle?t.result+=Wr.repeat(`
|
|
|
|
|
`,o?1+c:c):s===WG&&o&&(t.result+=`
|
|
|
|
|
`);break}for(n?kp(d)?(l=!0,t.result+=Wr.repeat(`
|
|
|
|
|
`,o?1+c:c)):l?(l=!1,t.result+=Wr.repeat(`
|
|
|
|
|
`,c+1)):c===0?o&&(t.result+=" "):t.result+=Wr.repeat(`
|
|
|
|
|
`,c):t.result+=Wr.repeat(`
|
|
|
|
|
`,o?1+c:c),o=!0,i=!0,c=0,r=t.position;!Xa(d)&&d!==0;)d=t.input.charCodeAt(++t.position);Bu(t,r,t.position,!1)}return!0}function Jle(t,e){var r,n=t.tag,s=t.anchor,o=[],i,a=!1,c;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),c=t.input.charCodeAt(t.position);c!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,he(t,"tab characters must not be used in indentation")),!(c!==45||(i=t.input.charCodeAt(t.position+1),!Ms(i))));){if(a=!0,t.position++,Mr(t,!0,-1)&&t.lineIndent<=e){o.push(null),c=t.input.charCodeAt(t.position);continue}if(r=t.line,qf(t,e,due,!1,!0),o.push(t.result),Mr(t,!0,-1),c=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&c!==0)he(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=n,t.anchor=s,t.kind="sequence",t.result=o,!0):!1}function _Ze(t,e,r){var n,s,o,i,a,c,l=t.tag,u=t.anchor,d={},p=Object.create(null),A=null,g=null,E=null,I=!1,x=!1,b;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=d),b=t.input.charCodeAt(t.position);b!==0;){if(!I&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,he(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),o=t.line,(b===63||b===58)&&Ms(n))b===63?(I&&(Uf(t,d,p,A,g,null,i,a,c),A=g=E=null),x=!0,I=!0,s=!0):I?(I=!1,s=!0):he(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,b=n;else{if(i=t.line,a=t.lineStart,c=t.position,!qf(t,r,uue,!1,!0))break;if(t.line===o){for(b=t.input.charCodeAt(t.position);kp(b);)b=t.input.charCodeAt(++t.position);if(b===58)b=t.input.charCodeAt(++t.position),Ms(b)||he(t,"a whitespace character is expected after the key-value separator within a block mapping"),I&&(Uf(t,d,p,A,g,null,i,a,c),A=g=E=null),x=!0,I=!1,s=!1,A=t.tag,g=t.result;else if(x)he(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=l,t.anchor=u,!0}else if(x)he(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=l,t.anchor=u,!0}if((t.line===o||t.lineIndent>e)&&(I&&(i=t.line,a=t.lineStart,c=t.position),qf(t,e,i0,!0,s)&&(I?g=t.result:E=t.result),I||(Uf(t,d,p,A,g,E,i,a,c),A=g=E=null),Mr(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&b!==0)he(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return I&&Uf(t,d,p,A,g,null,i,a,c),x&&(t.tag=l,t.anchor=u,t.kind="mapping",t.result=d),x}function vZe(t){var e,r=!1,n=!1,s,o,i;if(i=t.input.charCodeAt(t.position),i!==33)return!1;if(t.tag!==null&&he(t,"duplication of a tag property"),i=t.input.charCodeAt(++t.position),i===60?(r=!0,i=t.input.charCodeAt(++t.position)):i===33?(n=!0,s="!!",i=t.input.charCodeAt(++t.position)):s="!",e=t.position,r){do i=t.input.charCodeAt(++t.position);while(i!==0&&i!==62);t.position<t.length?(o=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):he(t,"unexpected end of the stream within a verbatim tag")}else{for(;i!==0&&!Ms(i);)i===33&&(n?he(t,"tag suffix cannot contain exclamation marks"):(s=t.input.slice(e-1,t.position+1),pue.test(s)||he(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);o=t.input.slice(e,t.position),IZe.test(o)&&he(t,"tag suffix cannot contain flow indicator characters")}o&&!Aue.test(o)&&he(t,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{he(t,"tag name is malformed: "+o)}return r?t.tag=o:Su.call(t.tagMap,s)?t.tag=t.tagMap[s]+o:s==="!"?t.tag="!"+o:s==="!!"?t.tag="tag:yaml.org,2002:"+o:he(t,'undeclared tag handle "'+s+'"'),!0}function DZe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&he(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Ms(r)&&!Mf(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&he(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function kZe(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!Ms(n)&&!Mf(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&he(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Su.call(t.anchorMap,r)||he(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Mr(t,!0,-1),!0}function qf(t,e,r,n,s){var o,i,a,c=1,l=!1,u=!1,d,p,A,g,E,I;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=i=a=i0===r||due===r,n&&Mr(t,!0,-1)&&(l=!0,t.lineIndent>e?c=1:t.lineIndent===e?c=0:t.lineIndent<e&&(c=-1)),c===1)for(;vZe(t)||DZe(t);)Mr(t,!0,-1)?(l=!0,a=o,t.lineIndent>e?c=1:t.lineIndent===e?c=0:t.lineIndent<e&&(c=-1)):a=!1;if(a&&(a=l||s),(c===1||i0===r)&&(o0===r||uue===r?E=e:E=e+1,I=t.position-t.lineStart,c===1?a&&(Jle(t,I)||_Ze(t,I,E))||PZe(t,E)?u=!0:(i&&QZe(t,E)||NZe(t,E)||TZe(t,E)?u=!0:kZe(t)?(u=!0,(t.tag!==null||t.
Line truncated
|
|
|
|
|
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new SZe(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,he(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)LZe(r);return r.documents}function OZe(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=yue(t,r);if(typeof e!="function")return n;for(var s=0,o=n.length;s<o;s+=1)e(n[s])}function FZe(t,e){var r=yue(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Fs("expected a single document in the stream, but found more")}}var MZe=OZe,UZe=FZe,Eue={loadAll:MZe,load:UZe},Cue=Object.prototype.toString,Iue=Object.prototype.hasOwnProperty,sH=65279,qZe=9,zE=10,$Ze=13,GZe=32,HZe=33,zZe=34,KG=35,VZe=37,YZe=38,jZe=39,WZe=42,bue=44,JZe=45,c0=58,KZe=61,XZe=62,ZZe=63,e7e=64,xue=91,wue=93,t7e=96,Bue=123,r7e=124,Sue=125,kn={};kn[0]="\\0";kn[7]="\\a";kn[8]="\\b";kn[9]="\\t";kn[10]="\\n";kn[11]="\\v";kn[12]="\\f";kn[13]="\\r";kn[27]="\\e";kn[34]='\\"';kn[92]="\\\\";kn[133]="\\N";kn[160]="\\_";kn[8232]="\\L";kn[8233]="\\P";var n7e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],s7e=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function o7e(t,e){var r,n,s,o,i,a,c;if(e===null)return{};for(r={},n=Object.keys(e),s=0,o=n.length;s<o;s+=1)i=n[s],a=String(e[i]),i.slice(0,2)==="!!"&&(i="tag:yaml.org,2002:"+i.slice(2)),c=t.compiledTypeMap.fallback[i],c&&Iue.call(c.styleAliases,a)&&(a=c.styleAliases[a]),r[i]=a;return r}function i7e(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new Fs("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Wr.repeat("0",n-e.length)+e}var a7e=1,VE=2;function c7e(t){this.schema=t.schema||lue,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Wr.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=o7e(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?VE:a7e,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Kle(t,e){for(var r=Wr.repeat(" ",e),n=0,s=-1,o="",i,a=t.length;n<a;)s=t.indexOf(`
|
|
|
|
|
`,n),s===-1?(i=t.slice(n),n=a):(i=t.slice(n,s+1),n=s+1),i.length&&i!==`
|
|
|
|
|
`&&(o+=r),o+=i;return o}function XG(t,e){return`
|
|
|
|
|
`+Wr.repeat(" ",t.indent*e)}function l7e(t,e){var r,n,s;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(s=t.implicitTypes[r],s.resolve(e))return!0;return!1}function l0(t){return t===GZe||t===qZe}function YE(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==sH||65536<=t&&t<=1114111}function Xle(t){return YE(t)&&t!==sH&&t!==$Ze&&t!==zE}function Zle(t,e,r){var n=Xle(t),s=n&&!l0(t);return(r?n:n&&t!==bue&&t!==xue&&t!==wue&&t!==Bue&&t!==Sue)&&t!==KG&&!(e===c0&&!s)||Xle(e)&&!l0(e)&&t===KG||e===c0&&s}function u7e(t){return YE(t)&&t!==sH&&!l0(t)&&t!==JZe&&t!==ZZe&&t!==c0&&t!==bue&&t!==xue&&t!==wue&&t!==Bue&&t!==Sue&&t!==KG&&t!==YZe&&t!==WZe&&t!==HZe&&t!==r7e&&t!==KZe&&t!==XZe&&t!==jZe&&t!==zZe&&t!==VZe&&t!==e7e&&t!==t7e}function d7e(t){return!l0(t)&&t!==c0}function GE(t,e){var r=t.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function Rue(t){var e=/^\n* /;return e.test(t)}var Nue=1,ZG=2,Tue=3,Pue=4,Ff=5;function p7e(t,e,r,n,s,o,i,a){var c,l=0,u=null,d=!1,p=!1,A=n!==-1,g=-1,E=u7e(GE(t,0))&&d7e(GE(t,t.length-1));if(e||i)for(c=0;c<t.length;l>=65536?c+=2:c++){if(l=GE(t,c),!YE(l))return Ff;E=E&&Zle(l,u,a),u=l}else{for(c=0;c<t.length;l>=65536?c+=2:c++){if(l=GE(t,c),l===zE)d=!0,A&&(p=p||c-g-1>n&&t[g+1]!==" ",g=c);else if(!YE(l))return Ff;E=E&&Zle(l,u,a),u=l}p=p||A&&c-g-1>n&&t[g+1]!==" "}return!d&&!p?E&&!i&&!s(t)?Nue:o===VE?Ff:ZG:r>9&&Rue(t)?Ff:i?o===VE?Ff:ZG:p?Pue:Tue}function A7e(t,e,r,n,s){t.dump=(function(){if(e.length===0)return t.quotingType===VE?'""':"''";if(!t.noCompatMode&&(n7e.indexOf(e)!==-1||s7e.test(e)))return t.quotingType===VE?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,r),i=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),a=n||t.flowLevel>-1&&r>=t.flowLevel;function c(l){return l7e(t,l)}switch(p7e(e,a,t.indent,i,c,t.quotingType,t.forceQuotes&&!n,s)){case Nue:return e;case ZG:return"'"+e.replace(/'/g,"''")+"'";case Tue:return"|"+eue(e,t.indent)+tue(Kle(e,o));case Pue:return">"+eue(e,t.indent)+tue(Kle(m7e(e,i),o));case Ff:return'"'+f7e(e)+'"';default:throw new Fs("impossible error: invalid scalar style")}})()}function eue(t,e){var r=Rue(t)?String(e):"",n=t[t.length-1]===`
|
|
|
|
|
`,s=n&&(t[t.length-2]===`
|
|
|
|
|
`||t===`
|
|
|
|
|
`),o=s?"+":n?"":"-";return r+o+`
|
|
|
|
|
`}function tue(t){return t[t.length-1]===`
|
|
|
|
|
`?t.slice(0,-1):t}function m7e(t,e){for(var r=/(\n+)([^\n]*)/g,n=(function(){var l=t.indexOf(`
|
|
|
|
|
`);return l=l!==-1?l:t.length,r.lastIndex=l,rue(t.slice(0,l),e)})(),s=t[0]===`
|
|
|
|
|
`||t[0]===" ",o,i;i=r.exec(t);){var a=i[1],c=i[2];o=c[0]===" ",n+=a+(!s&&!o&&c!==""?`
|
|
|
|
|
`:"")+rue(c,e),s=o}return n}function rue(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,s=0,o,i=0,a=0,c="";n=r.exec(t);)a=n.index,a-s>e&&(o=i>s?i:a,c+=`
|
|
|
|
|
`+t.slice(s,o),s=o+1),i=a;return c+=`
|
|
|
|
|
`,t.length-s>e&&i>s?c+=t.slice(s,i)+`
|
|
|
|
|
`+t.slice(i+1):c+=t.slice(s),c.slice(1)}function f7e(t){for(var e="",r=0,n,s=0;s<t.length;r>=65536?s+=2:s++)r=GE(t,s),n=kn[r],!n&&YE(r)?(e+=t[s],r>=65536&&(e+=t[s+1])):e+=n||i7e(r);return e}function g7e(t,e,r){var n="",s=t.tag,o,i,a;for(o=0,i=r.length;o<i;o+=1)a=r[o],t.replacer&&(a=t.replacer.call(r,String(o),a)),(Xc(t,e,a,!1,!1)||typeof a>"u"&&Xc(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=s,t.dump="["+n+"]"}function nue(t,e,r,n){var s="",o=t.tag,i,a,c;for(i=0,a=r.length;i<a;i+=1)c=r[i],t.replacer&&(c=t.replacer.call(r,String(i),c)),(Xc(t,e+1,c,!0,!0,!1,!0)||typeof c>"u"&&Xc(t,e+1,null,!0,!0,!1,!0))&&((!n||s!=="")&&(s+=XG(t,e)),t.dump&&zE===t.dump.charCodeAt(0)?s+="-":s+="- ",s+=t.dump);t.tag=o,t.dump=s||"[]"}function h7e(t,e,r){var n="",s=t.tag,o=Object.keys(r),i,a,c,l,u;for(i=0,a=o.length;i<a;i+=1)u="",n!==""&&(u+=", "),t.condenseFlow&&(u+='"'),c=o[i],l=r[c],t.replacer&&(l=t.replacer.call(r,c,l)),Xc(t,e,c,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Xc(t,e,l,!1,!1)&&(u+=t.dump,n+=u));t.tag=s,t.dump="{"+n+"}"}function y7e(t,e,r,n){var s="",o=t.tag,i=Object.keys(r),a,c,l,u,d,p;if(t.sortKeys===!0)i.sort();else if(typeof t.sortKeys=="function")i.sort(t.sortKeys);else if(t.sortKeys)throw new Fs("sortKeys must be a boolean or a function");for(a=0,c=i.length;a<c;a+=1)p="",(!n||s!=="")&&(p+=XG(t,e)),l=i[a],u=r[l],t.replacer&&(u=t.replacer.call(r,l,u)),Xc(t,e+1,l,!0,!0,!0)&&(d=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,d&&(t.dump&&zE===t.dump.charCodeAt(0)?p+="?":p+="? "),p+=t.dump,d&&(p+=XG(t,e)),Xc(t,e+1,u,!0,d)&&(t.dump&&zE===t.dump.charCodeAt(0)?p+=":":p+=": ",p+=t.dump,s+=p));t.tag=o,t.dump=s||"{}"}function sue(t,e,r){var n,s,o,i,a,c;for(s=r?t.explicitTypes:t.implicitTypes,o=0,i=s.length;o<i;o+=1)if(a=s[o],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(r?a.multi&&a.representName?t.tag=a.representName(e):t.tag=a.tag:t.tag="?",a.represent){if(c=t.styleMap[a.tag]||a.defaultStyle,Cue.call(a.represent)==="[object Function]")n=a.represent(e,c);else if(Iue.call(a.represent,c))n=a.represent[c](e,c);else throw new Fs("!<"+a.tag+'> tag resolver accepts not "'+c+'" style');t.dump=n}return!0}return!1}function Xc(t,e,r,n,s,o,i){t.tag=null,t.dump=r,sue(t,r,!1)||sue(t,r,!0);var a=Cue.call(t.dump),c=n,l;n&&(n=t.flowLevel<0||t.flowLevel>e);var u=a==="[object Object]"||a==="[object Array]",d,p;if(u&&(d=t.duplicates.indexOf(r),p=d!==-1),(t.tag!==null&&t.tag!=="?"||p||t.indent!==2&&e>0)&&(s=!1),p&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(u&&p&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),a==="[object Object]")n&&Object.keys(t.dump).length!==0?(y7e(t,e,t.dump,s),p&&(t.dump="&ref_"+d+t.dump)):(h7e(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(a==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!i&&e>0?nue(t,e-1,t.dump,s):nue(t,e,t.dump,s),p&&(t.dump="&ref_"+d+t.dump)):(g7e(t,e,t.dump),p&&(t.dump="&ref_"+d+" "+t.dump));else if(a==="[object String]")t.tag!=="?"&&A7e(t,t.dump,e,o,c);else{if(a==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Fs("unacceptable kind of an object to dump "+a)}t.tag!==null&&t.tag!=="?"&&(l=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?l="!"+l:l.slice(0,18)==="tag:yaml.org,2002:"?l="!!"+l.slice(18):l="!<"+l+">",t.dump=l+" "+t.dump)}return!0}function E7e(t,e){var r=[],n=[],s,o;for(eH(t,r,n),s=0,o=n.length;s<o;s+=1)e.duplicates.push(r[n[s]]);e.usedDuplicates=new Array(o)}function eH(t,e,r){var n,s,o;if(t!==null&&typeof t=="object")if(s=e.indexOf(t),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(e.push(t),Array.isArray(t))for(s=0,o=t.length;s<o;s+=1)eH(t[s],e,r);else for(n=Object.keys(t),s=0,o=n.length;s<o;s+=1)eH(t[n[s]],e,r)}function C7e(t,e){e=e||{};var r=new c7e(e);r.noRefs||E7e(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),Xc(r,0,n,!0,!0)?r.dump+`
|
|
|
|
|
`:""}var I7e=C7e,b7e={dump:I7e};function oH(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}var Que=Eue.load,mJt=Eue.loadAll,fJt=b7e.dump;var gJt=oH("safeLoad","load"),hJt=oH("safeLoadAll","loadAll"),yJt=oH("safeDump","dump");var ei=S(require("fs"),1),Us=S(require("path"),1);var YAe=S(Cpe(),1);var x0=class t{static protoRegexp=new RegExp("^[a-zA-Z0-9]+://");static supportedProtos={http:{},https:{},ssh:{},git:{}};static parseURL(e){let r=e.match(t.protoRegexp);if(r&&r.length>0){let n=r[0].toLowerCase();if(n=n.slice(0,n.lastIndexOf("://")),!(n in t.supportedProtos))throw new Error(`Invalid protocol: ${n}`);return t.fromURL(new URL(e))}throw new Error("Unknown protocol")}static fromURL(e){let r=new URL(e.toString());r.hash="";let n;return(e.username||e.password)&&(n={username:e.username,password:e.password,passwordSet:e.password!==""}),{scheme:e.protocol.slice(0,-1),user:n,host:`${e.hostname}${e.port?":"+e.port:""}`,path:e.pathname,fragment:t.splitGitFragment(e.hash),remote:r.toString()}}static splitGitFragment(e){if(e==="")return;let[r,n]=e.slice(1).split(":");return{ref:r,subdir:n}}static parseRef(e){let r={},n;if(e.startsWith("./")||e.startsWith("../"))throw new Error("Invalid argument");if(e.startsWith("github.com/"))r.indistinguishableFromLocal=!0,n=t.fromURL(new URL("https://"+e));else if(n=t.parseURL(e),["http","git"].includes(n.scheme)&&(r.unencryptedTCP=!0),["http","https"].includes(n.scheme)&&!n.path.endsWith(".git"))throw new Error("Invalid argument");r.remote=n.remote,r.indistinguishableFromLocal&&(r.remote=r.remote.split("://")[1]),n.fragment&&(r.commit=n.fragment.ref,r.subDir=n.fragment.subdir);let s=r.remote.split("/");return r.shortName=s[s.length-1].replace(".git",""),r}};var DH=S(require("fs"),1),Wpe=S(require("os"),1),rC=S(require("path"),1);var TH=S(require("fs"),1),Mpe=S(require("os"),1),Upe=S(require("path"),1),qpe=S(Fpe(),1),S0=class t{static _tmpDir=TH.default.mkdtempSync(Upe.default.join(t.ensureDirExists(process.env.RUNNER_TEMP||Mpe.default.tmpdir()),"docker-actions-toolkit-"));static ensureDirExists(e){return TH.default.mkdirSync(e,{recursive:!0}),e}static tmpDir(){return t._tmpDir}static tmpName(e){return qpe.tmpNameSync(e)}};var el=class{static async exec(e,r,n){return k(`Exec.exec: ${e} ${r?.join(" ")}`),tu(e,r,n)}static async getExecOutput(e,r,n){return k(`Exec.getExecOutput: ${e} ${r?.join(" ")}`),AO(e,r,n)}};var vH=S(require("crypto"),1),jpe=S(require("fs"),1),tC=S(require("path"),1);var mt=class t extends Error{constructor(e,r,n,...s){Array.isArray(r)&&(r=r.join(" ").trim()),super(r),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,t),this.code=e;for(let o of s)for(let i in o){let a=o[i];this[i]=Buffer.isBuffer(a)?a.toString(n.encoding):a==null?a:JSON.parse(JSON.stringify(a))}}};var $pe=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)};var R0=function(t){let e=[];for(let r=0,n=t.length;r<n;r++){let s=t[r];if(s==null||s===!1)e[r]={disabled:!0};else if(typeof s=="string"||typeof s=="number")e[r]={name:`${s}`};else if($pe(s)){if(typeof s.name!="string")throw new mt("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${r}`,"when column is an object literal"]);e[r]=s}else throw new mt("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(s)} at position ${r}`])}return e};var PH=class{constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let r=this.length+e.length;if(r>=this.size&&(this.resize(),r>=this.size))throw Error("INVALID_BUFFER_STATE");let n=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),n.copy(this.buf,e.length),this.length+=e.length}else{let r=this.length++;r===this.size&&this.resize();let n=this.clone();this.buf[0]=e,n.copy(this.buf,1,0,r)}}append(e){let r=this.length++;r===this.size&&this.resize(),this.buf[r]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let r=Buffer.allocUnsafe(this.size);this.buf.copy(r,0,0,e),this.buf=r}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},QH=PH;var qrt=12,$rt=13,Grt=10,Hrt=32,zrt=9,Gpe=function(t){return{bomSkipped:!1,bufBytesStart:0,castField:t.cast_function,commenting:!1,error:void 0,enabled:t.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(t.escape)&&Buffer.isBuffer(t.quote)&&Buffer.compare(t.escape,t.quote)===0,expectedRecordLength:Array.isArray(t.columns)?t.columns.length:void 0,field:new QH(20),firstLineToHeaders:t.cast_first_line_to_header,needMoreDataSize:Math.max(t.comment!==null?t.comment.length:0,...t.delimiter.map(e=>e.length),t.quote!==null?t.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,ra
Line truncated
|
|
|
|
|
`,i).length:d,l?(a===null?0:a.length)+c.length:0,l?c.length+d:0);return p<A},parse:function(n,s,o,i){let{bom:a,comment_no_infix:c,encoding:l,from_line:u,ltrim:d,max_record_size:p,raw:A,relax_quotes:g,rtrim:E,skip_empty_lines:I,to:x,to_line:b}=this.options,{comment:P,escape:v,quote:F,record_delimiter:q}=this.options,{bomSkipped:X,previousBuf:V,rawBuffer:Ee,escapeIsQuote:Ne}=this.state,ee;if(V===void 0)if(n===void 0){i();return}else ee=n;else V!==void 0&&n===void 0?ee=V:ee=Buffer.concat([V,n]);if(X===!1)if(a===!1)this.state.bomSkipped=!0;else if(ee.length<3){if(s===!1){this.state.previousBuf=ee;return}}else{for(let ut in zf)if(zf[ut].compare(ee,0,zf[ut].length)===0){let nn=zf[ut].length;this.state.bufBytesStart+=nn,ee=ee.slice(nn);let vt=_H({...this.original_options,encoding:ut});for(let wt in vt)this.options[wt]=vt[wt];({comment:P,escape:v,quote:F}=this.options);break}this.state.bomSkipped=!0}let Ge=ee.length,ae;for(ae=0;ae<Ge&&!this.__needMoreData(ae,Ge,s);ae++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),b!==-1&&this.info.lines>b){this.state.stop=!0,i();return}this.state.quoting===!1&&q.length===0&&this.__autoDiscoverRecordDelimiter(ee,ae)&&(q=this.options.record_delimiter);let ut=ee[ae];if(A===!0&&Ee.append(ut),(ut===Vrt||ut===Yrt)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(v!==null&&this.state.quoting===!0&&this.__isEscape(ee,ae,ut)&&ae+v.length<Ge)if(Ne){if(this.__isQuote(ee,ae+v.length)){this.state.escaping=!0,ae+=v.length-1;continue}}else{this.state.escaping=!0,ae+=v.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(ee,ae))if(this.state.quoting===!0){let wt=ee[ae+F.length],Kn=E&&this.__isCharTrimable(ee,ae+F.length),Xn=P!==null&&this.__compareBytes(P,ee,ae+F.length,wt),wo=this.__isDelimiter(ee,ae+F.length,wt),yc=q.length===0?this.__autoDiscoverRecordDelimiter(ee,ae+F.length):this.__isRecordDelimiter(wt,ee,ae+F.length);if(v!==null&&this.__isEscape(ee,ae,ut)&&this.__isQuote(ee,ae+v.length))ae+=v.length-1;else if(!wt||wo||yc||Xn||Kn){this.state.quoting=!1,this.state.wasQuoting=!0,ae+=F.length-1;continue}else if(g===!1){let _l=this.__error(new mt("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(wt)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(_l!==void 0)return _l}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(F),ae+=F.length-1}else if(this.state.field.length!==0){if(g===!1){let wt=this.__infoField(),Kn=Object.keys(zf).map(wo=>zf[wo].equals(this.state.field.toString())?wo:!1).filter(Boolean)[0],Xn=this.__error(new mt("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(wt.column)} at line ${wt.lines}, value is ${JSON.stringify(this.state.field.toString(l))}`,Kn?`(${Kn} bom)`:void 0],this.options,wt,{field:this.state.field}));if(Xn!==void 0)return Xn}}else{this.state.quoting=!0,ae+=F.length-1;continue}if(this.state.quoting===!1){let wt=this.__isRecordDelimiter(ut,ee,ae);if(wt!==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)>=u){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),ae+=wt-1;continue}if(I===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,ae+=wt-1;continue}this.info.bytes=this.state.bufBytesStart+ae;let wo=this.__onField();if(wo!==void 0)return wo;this.info.bytes=this.state.bufBytesStart+ae+wt;let yc=this.__onRecord(o);if(yc!==void 0)return yc;if(x!==-1&&this.info.records>=x){this.state.stop=!0,i();return}}this.state.commenting=!1,ae+=wt-1;continue}if(this.state.commenting)continue;if(P!==null&&(c===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(P,ee,ae,ut)!==0){this.state.commenting=!0;continue}let Kn=this.__isDelimiter(ee,ae,ut);if(Kn!==0){this.info.bytes=this.state.bufBytesStart+ae;let Xn=this.__onField();if(Xn!==void 0)return Xn;ae+=Kn-1;continue}}}if(this.state.commenting===!1&&p!==0&&this.state.record_length+this.state.field.length>p)return this.__error(new mt("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${p}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let nn=d===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(ee,ae),vt=E===!1||this.state.wasQuoting===!1;if(nn===!0&&vt===!0)this.state.field.append(ut);else{if(E===!0&&!this.__isCharTrimable(ee,ae))return this.__error(new mt("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));nn
Line truncated
|
|
|
|
|
${t.mark.snippet}`),`${t.reason} ${r}`):t.reason}i(xhe,"formatError");var VT=class extends Error{static{i(this,"YAMLException")}reason;mark;constructor(t,e){super(),this.name="YAMLException",this.reason=t,this.mark=e,this.message=xhe(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(t){return`${this.name}: ${xhe(this,t)}`}};function ZT(t,e,r,n=""){let s=0,o=0;for(let c=0;c<e;c++){let l=t.charCodeAt(c);l===10?(s++,o=c+1):l===13&&(s++,t.charCodeAt(c+1)===10&&c++,o=c+1)}let a={name:n,buffer:t,position:e,line:s,column:e-o};throw a.snippet=Hmt(a),new VT(r,a)}i(ZT,"throwErrorAt");var $mt=-1;function bhe(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""}}i(bhe,"simpleEscapeSequence");var khe=new Array(256),Lhe=new Array(256);for(let t=0;t<256;t++)khe[t]=bhe(t)?1:0,Lhe[t]=bhe(t);function zmt(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}i(zmt,"charFromCodepoint");function Vmt(t){return t>=48&&t<=57?t-48:(t|32)-97+10}i(Vmt,"fromHexCode$1");function Wmt(t){return t===120?2:t===117?4:8}i(Wmt,"escapedHexLen$1");function WT(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}}i(WT,"skipFoldedBreaks");function I4(t){return t===1?" ":`
|
|
|
|
|
`.repeat(t-1)}i(I4,"foldedBreaks");function Ymt(t,e,r){let n="",s=e,o=e,a=e;for(;s<r;){let c=t.charCodeAt(s);if(c===10||c===13){n+=t.slice(o,a);let l=WT(t,s,r);n+=I4(l.breaks),s=o=a=l.position}else s++,c!==32&&c!==9&&(a=s)}return n+t.slice(o,a)}i(Ymt,"getPlainValue");function Jmt(t,e,r){let n="",s=e,o=e,a=e;for(;s<r;){let c=t.charCodeAt(s);if(c===39)n+=t.slice(o,s)+"'",s+=2,o=a=s;else if(c===10||c===13){n+=t.slice(o,a);let l=WT(t,s,r);n+=I4(l.breaks),s=o=a=l.position}else s++,c!==32&&c!==9&&(a=s)}return n+t.slice(o,r)}i(Jmt,"getSingleQuotedValue");function jmt(t,e,r){let n="",s=e,o=e,a=e;for(;s<r;){let c=t.charCodeAt(s);if(c===92){n+=t.slice(o,s),s++;let l=t.charCodeAt(s);if(l===10||l===13)s=WT(t,s,r).position;else if(l<256&&khe[l])n+=Lhe[l],s++;else{let u=Wmt(l),d=0;for(;u>0;u--){s++;let p=Vmt(t.charCodeAt(s));d=(d<<4)+p}n+=zmt(d),s++}o=a=s}else if(c===10||c===13){n+=t.slice(o,a);let l=WT(t,s,r);n+=I4(l.breaks),s=o=a=l.position}else s++,c!==32&&c!==9&&(a=s)}return n+t.slice(o,r)}i(jmt,"getDoubleQuotedValue");function Bhe(t,e,r,n,s,o){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,p=0,m=!1;for(let f of l){let A=0;for(;A<a&&f.charCodeAt(A)===32;)A++;if(n<0||A>=f.length){p++;continue}let h=f.slice(a),E=h.charCodeAt(0);o?E===32||E===9?(m=!0,u+=`
|
|
|
|
|
`.repeat(d?1+p:p)):m?(m=!1,u+=`
|
|
|
|
|
`.repeat(p+1)):p===0?d&&(u+=" "):u+=`
|
|
|
|
|
`.repeat(p):u+=`
|
|
|
|
|
`.repeat(d?1+p:p),u+=h,d=!0,p=0}return s===3?u+=`
|
|
|
|
|
`.repeat(d?1+p:p):s!==2&&d&&(u+=`
|
|
|
|
|
`),u}i(Bhe,"getBlockValue");function Kmt(t,e){if(e.valueStart===$mt)return"";let{valueStart:r,valueEnd:n}=e;if(e.fast)return t.slice(r,n);switch(e.style){case 2:return Jmt(t,r,n);case 3:return jmt(t,r,n);case 4:return Bhe(t,r,n,e.indent,e.chomping,!1);case 5:return Bhe(t,r,n,e.indent,e.chomping,!0);default:return Ymt(t,r,n)}}i(Kmt,"getScalarValue");var Xmt={"!":"!","!!":"tag:yaml.org,2002:"};function Ohe(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]??Xmt[n]??n;return decodeURIComponent(s)+decodeURIComponent(t.slice(n.length))}i(Ohe,"tagNameFull");var Uh=-1,w4={filename:"",schema:Umt,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function Zmt(t){return"tagStart"in t&&t.tagStart!==Uh?t.tagStart:"anchorStart"in t&&t.anchorStart!==Uh?t.anchorStart:"valueStart"in t&&t.valueStart!==Uh?t.valueStart:"start"in t?t.start:0}i(Zmt,"eventPosition$1");function _s(t,e){ZT(t.source,t.position,e,t.filename)}i(_s,"throwError$1");function Mhe(t,e,r,n){try{return r.finalize(n)}catch(s){if(s instanceof VT)throw s;ZT(t.source,e,s instanceof Error?s.message:String(s),t.filename)}}i(Mhe,"finalizeCollection");function zT(t,e,r){let n=t[r];if(n)return n;for(let s of e)if(r.startsWith(s.tagName))return s}i(zT,"lookupTag");function eft(t,e,r,n,s){let o=zT(e,r,n);if(o)return o;_s(t,`unknown ${s} tag !<${n}>`)}i(eft,"findExplicitTag");function tft(t,e){let r=Kmt(t.source,e),n=e.tagStart===Uh?"":t.source.slice(e.tagStart,e.tagEnd),s=t.schema.defaultScalarTag;if(n!==""){if(n==="!")return{value:r,tag:s};let o=Ohe(n,t.tagHandlers),a=zT(t.schema.exact.scalar,t.schema.prefix.scalar,o);if(a){let l=a.resolve(r,!0,o);return l===nt&&_s(t,`cannot resolve a node with !<${o}> explicit tag`),{value:l,tag:a}}let c=zT(t.schema.exact.mapping,t.schema.prefix.mapping,o)??zT(t.schema.exact.sequence,t.schema.prefix.sequence,o);if(c){r!==""&&_s(t,`cannot resolve a node with !<${o}> explicit tag`);let l=c.create(o);return{value:c.carrierIsResult?l:Mhe(t,t.position,c,l),tag:c}}_s(t,`unknown scalar tag !<${o}>`)}if(e.style===1){let o=t.schema.implicitScalarByFirstChar.get(r.charAt(0))??t.schema.implicitScalarAnyFirstChar;for(let a of o){let c=a.resolve(r,!1,a.tagName);if(c!==nt)return{value:c,tag:a}}}return{value:s.resolve(r,!1,s.tagName),tag:s}}i(tft,"constructScalar");function Rhe(t,e,r,n,s,o){let a=e.tagStart===Uh?"":t.source.slice(e.tagStart,e.tagEnd),c=a===""||a==="!"?s:Ohe(a,t.tagHandlers);return{tagName:c,tag:eft(t,r,n,c,o)}}i(Rhe,"collectionTag");function Fhe(t){return t.nodeKind==="mapping"}i(Fhe,"isMappingTag");function Nhe(t,e,r,n){for(let s of n.keys(r)){if(t.maxTotalMergeKeys!==-1&&++t.totalMergeKeys>t.maxTotalMergeKeys&&_s(t,`merge keys exceeded maxTotalMergeKeys (${t.maxTotalMergeKeys})`),e.tag.has(e.value,s))continue;let o=e.tag.addPair(e.value,s,n.get(r,s));o&&_s(t,o),(e.overridable??=new Set).add(s)}}i(Nhe,"mergeKeys");function rft(t,e,r,n){if(t.position=e.keyPosition,Fhe(n))Nhe(t,e,r,n);else if(n.nodeKind==="sequence"&&Array.isArray(r))for(let s of r)Nhe(t,e,s,e.tag);else _s(t,"cannot merge mappings; the provided source object is unacceptable")}i(rft,"mergeSource");function nft(t,e,r,n,s){if(t.position=e.keyPosition,r===y4){rft(t,e,n,s);return}!t.json&&e.tag.has(e.value,r)&&!e.overridable?.has(r)&&_s(t,"duplicated mapping key");let o=e.tag.addPair(e.value,r,n);o&&_s(t,o),e.overridable?.delete(r)}i(nft,"addMappingValue");function u4(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&&(Fhe(r)||_s(t,"cannot merge mappings; the provided source object is unacceptable"));let s=n.tag.addItem(n.value,e,n.index++);s&&_s(t,s)}else if(n.hasKey){let s=n.key;n.key=void 0,n.hasKey=!1,nft(t,n,s,e,r)}else n.key=e,n.keyPosition=t.position,n.hasKey=!0}i(u4,"addValue");function d4(t,e,r,n,s){if(e.anchorStart!==Uh){let o={value:r,tag:n,isValueFinal:s};return t.anchors.set(t.source.slice(e.anchorStart,e.anchorEnd),o),o}return null}i(d4,"storeAnchor");function sft(t,e){let r={...w4,...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=Zmt(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:o}=tft(r,n);d4(r,n,s,o,!0),u4(r,s,o);break}case 2:{let s=Rhe(r,n,r.schema.exact.sequence,r.schema.prefix.sequence,"tag:yaml.org,2002:seq","sequence"),o=s.tag.create(s.tagName),a=d4(r,n,o,s.tag,s.tag.carrierIsResult),c=r.frames[r.frames.length-1],l=c!==void 0&&c.kind==="mapping"&&c.hasKey&&c.key===y4;r.frames.push({kind:"sequence",position:r.position,value:o,tag:s.tag,anchor:a,index:0,merge:l});break}case 3:{let s=Rhe(r,n,r.schem
Line truncated
|
|
|
|
|
`,a).length:p,u?(c===null?0:c.length)+l.length:0,u?l.length+p:0);return m<f},"__needMoreData"),parse:i(function(n,s,o,a){let{bom:c,comment_no_infix:l,delimiter_auto:u,encoding:d,from_line:p,ltrim:m,max_record_size:f,raw:A,relax_quotes:h,rtrim:E,skip_empty_lines:C,to:w,to_line:x}=this.options,{comment:b,escape:N,quote:P,record_delimiter:_}=this.options,{bomSkipped:re,delimiterDiscovered:ye,delimiterBufPrevious:ae,rawBuffer:qe,escapeIsQuote:ne}=this.state;if(!ye&&u){let lt;if(ae===void 0?lt=n:ae!==void 0&&n===void 0?lt=ae:lt=Buffer.concat([ae,n]),n=void 0,s||lt.length>u.size)this.options.delimiter=[Buffer.from(KCe(lt,this.options.delimiter_auto))],this.state.previousBuf=lt,this.state.delimiterBufPrevious=void 0,this.state.delimiterDiscovered=!0;else{this.state.delimiterBufPrevious=lt;return}}let{previousBuf:K}=this.state,U;if(K===void 0)if(n===void 0){a();return}else U=n;else K!==void 0&&n===void 0?U=K:U=Buffer.concat([K,n]);if(re===!1)if(c===!1)this.state.bomSkipped=!0;else if(U.length<3){if(s===!1){this.state.previousBuf=U;return}}else{for(let lt in sg)if(sg[lt].compare(U,0,sg[lt].length)===0){let Ia=sg[lt].length;this.state.bufBytesStart+=Ia,U=U.slice(Ia);let hu=ng({...this.original_options,encoding:lt});for(let er in hu)this.options[er]=hu[er];({comment:b,escape:N,quote:P}=this.options);break}this.state.bomSkipped=!0}let wt=U.length,X;for(X=0;X<wt&&!this.__needMoreData(X,wt,s);X++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),x!==-1&&this.info.lines>x){this.state.stop=!0,a();return}this.state.quoting===!1&&_.length===0&&this.__autoDiscoverRecordDelimiter(U,X)&&(_=this.options.record_delimiter);let lt=U[X];if(A===!0&&qe.append(lt),(lt===XCt||lt===ZCt)&&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(U,X,lt)&&X+N.length<wt)if(ne){if(this.__isQuote(U,X+N.length)){this.state.escaping=!0,X+=N.length-1;continue}}else{this.state.escaping=!0,X+=N.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(U,X))if(this.state.quoting===!0){let er=U[X+P.length],wa=E&&this.__isCharTrimable(U,X+P.length),$s=b!==null&&this.__compareBytes(b,U,X+P.length,er),pp=this.__isDelimiter(U,X+P.length,er),Dx=_.length===0?this.__autoDiscoverRecordDelimiter(U,X+P.length):this.__isRecordDelimiter(er,U,X+P.length);if(N!==null&&this.__isEscape(U,X,lt)&&this.__isQuote(U,X+N.length))X+=N.length-1;else if(!er||pp||Dx||$s||wa){this.state.quoting=!1,this.state.wasQuoting=!0,X+=P.length-1;continue}else if(h===!1){let J9=this.__error(new Ve("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(er)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(J9!==void 0)return J9}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(P),X+=P.length-1}else if(this.state.field.length!==0){if(h===!1){let er=this.__infoField(),wa=Object.keys(sg).map(pp=>sg[pp].equals(this.state.field.toString())?pp:!1).filter(Boolean)[0],$s=this.__error(new Ve("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(er.column)} at line ${er.lines}, value is ${JSON.stringify(this.state.field.toString(d))}`,wa?`(${wa} bom)`:void 0],this.options,er,{field:this.state.field}));if($s!==void 0)return $s}}else{this.state.quoting=!0,X+=P.length-1;continue}if(this.state.quoting===!1){let er=this.__isRecordDelimiter(lt,U,X);if(er!==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)>=p){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),X+=er-1;continue}if(C===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,X+=er-1;continue}this.info.bytes=this.state.bufBytesStart+X;let pp=this.__onField();if(pp!==void 0)return pp;this.info.bytes=this.state.bufBytesStart+X+er;let Dx=this.__onRecord(o);if(Dx!==void 0)return Dx;if(w!==-1&&this.info.records>=w){this.state.stop=!0,a();return}}this.state.commenting=!1,X+=er-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,U,X,lt)!==0){this.state.commenting=!0;continue}let wa=this.__isDelimiter(U,X,lt);if(wa!==0){this.info.bytes=this.state.bufBytesStart+X;let $s=this.__onField();if($s!==void 0)return $s;X+=wa-1;continue}}}if(this.state.commenting===!1&&f!==0&&this.state.record_length+this.state.field.length>f)return this.__error(new Ve("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 Ia=m===!1||this.state.quoting===!0||this.sta
Line truncated
|
|
|
|
|
`,o),Buffer.from(`
|
|
|
|
|
`,o),Buffer.from("\r",o)];e:for(let a=0;a<i.length;a++){let c=i[a].length;for(let l=0;l<c;l++)if(i[a][l]!==n[s+l])continue e;return this.options.record_delimiter.push(i[a]),this.state.recordDelimiterMaxLength=i[a].length,i[a].length}return 0},__error:function(n){let{encoding:s,raw:o,skip_records_with_error:i}=this.options,a=typeof n=="string"?new Error(n):n;if(i){if(this.state.recordHasError=!0,this.options.on_skip!==void 0)try{this.options.on_skip(a,o?this.state.rawBuffer.toString(s):void 0)}catch(c){return c}return}else return a},__infoDataSet:function(){return{...this.info,columns:this.options.columns}},__infoRecord:function(){let{columns:n,raw:s,encoding:o}=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(o):void 0}},__infoField:function(){let{columns:n}=this.options,s=Array.isArray(n),o=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:o,column:s===!0?n.length>this.state.record.length?n[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}}}};var Ype=function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?{}:[],n=Vpe(e),s=a=>{n.options.objname===void 0?r.push(a):r[a[0]]=a[1]},o=()=>{},i=n.parse(t,!0,s,o);if(i!==void 0)throw i;return r};var Ru=class t{static getInputList(e,r){return this.getList(Ti(e),r)}static getList(e,r){let n=[];if(e=="")return n;let s=Ype(e,{columns:!1,relaxQuotes:!0,comment:r?.comment,comment_no_infix:r?.commentNoInfix,relaxColumnCount:!0,skipEmptyLines:!0,quote:r?.quote});for(let o of s)o.length==1?r?.ignoreComma?n.push(o[0]):n.push(...o[0].split(",")):r?.ignoreComma?n.push(o.join(",")):n.push(...o);return n.filter(o=>o).map(o=>o.trim())}static getInputNumber(e){let r=Ti(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 Ns("powershell",!0),s=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),o=[];if(r)for(let i in r)o.push(`-${i} '${r[i].replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`);return{command:`"${n}"`,args:["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${s}' ${o.join(" ")}`]}}static isDirectory(e){try{return jpe.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 vH.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 vH.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}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=tC.default.resolve(e);return tC.default.resolve(r).startsWith(n.endsWith(tC.default.sep)?n:`${n}${tC.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),o=r%60,i=[];return n&&i.push(`${n}h`),s&&i.push(`${s}m`),(o||i.length===0)&&i.push(`${o}s`),i.join("")}};var Nu=class t{static get configDir(){return process.env.DOCKER_CONFIG||rC.default.join(Wpe.default.homedir(),".docker")}static configFile(){let e=rC.default.join(t.configDir,"config.json");if(DH.default.existsSync(e))return JSON.parse(DH.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await Ns("docker",!0).then(e=>(k(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(k(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0}catch{return!1}}static async exec(e,r){return el.exec("docker",e,t.execOptions(r))}static async getExecOutput(e,r){return el.getExecOutput("docker",e,t.execOptions(r))}static execOptions(e){return e||(e={}),e.env?e.env.DOCKER_CONTENT_TRUST="false":e.env=Object.assign({},process.env,{DOCKER_CONTENT_TRUST:"false"}),e}static async context(e
Line truncated
|
|
|
|
|
`,o),Buffer.from("\r",o)];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:i(function(n){let{encoding:s,raw:o,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,o?this.state.rawBuffer.toString(s):void 0)}catch(l){return l}return}else return c},"__error"),__infoDataSet:i(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:i(function(){let{columns:n,raw:s,encoding:o}=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(o):void 0}},"__infoRecord"),__infoField:i(function(){let{columns:n}=this.options,s=Array.isArray(n),o=this.info.bytes_records;return{...this.__infoRecord(),bytes_records:o,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 ZCe=i(function(t,e={}){typeof t=="string"&&(t=Buffer.from(t));let r=e&&e.objname?Object.create(null):[],n=eP(e),s=i(c=>{n.options.objname===void 0?r.push(c):r[c[0]]=c[1]},"push"),o=i(()=>{},"close"),a=n.parse(t,!0,s,o);if(a!==void 0)throw a;return r},"parse");var hd=class t{static{i(this,"Util")}static getInputList(e,r){return this.getList(_i(e,{trimWhitespace:r?.trimWhitespace!==!1}),r)}static getList(e,r){let n=[];if(e=="")return n;let s=ZCe(e,{columns:!1,relaxQuotes:!0,comment:r?.comment,comment_no_infix:r?.commentNoInfix,relaxColumnCount:!0,skipEmptyLines:!0,quote:r?.quote});for(let o of s)o.length==1?r?.ignoreComma?n.push(o[0]):n.push(...o[0].split(",")):r?.ignoreComma?n.push(o.join(",")):n.push(...o);return n.filter(o=>o).map(o=>r?.trimWhitespace===!1?o:o.trim())}static getInputNumber(e){let r=_i(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 Es("powershell",!0),s=e.replace(/'/g,"''").replace(/"|\n|\r/g,""),o=[];if(r)for(let a in r)o.push(`-${a} '${r[a].replace(/'/g,"''").replace(/"|\n|\r/g,"")}'`);return{command:`"${n}"`,args:["-NoLogo","-Sta","-NoProfile","-NonInteractive","-ExecutionPolicy","Unrestricted","-Command",`& '${s}' ${o.join(" ")}`]}}static isDirectory(e){try{return eIe.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 $W.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 $W.default.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)}static compileHandlebars(e,r,n){return tIe.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=nw.default.resolve(e);return nw.default.resolve(r).startsWith(n.endsWith(nw.default.sep)?n:`${n}${nw.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),o=r%60,a=[];return n&&a.push(`${n}h`),s&&a.push(`${s}m`),(o||a.length===0)&&a.push(`${o}s`),a.join("")}};var gd=class t{static{i(this,"Docker")}static get configDir(){return process.env.DOCKER_CONFIG||sw.default.join(rIe.default.homedir(),".docker")}static configFile(){let e=sw.default.join(t.configDir,"config.json");if(zW.default.existsSync(e))return JSON.parse(zW.default.readFileSync(e,{encoding:"utf-8"}))}static async isAvailable(){return await Es("docker",!0).then(e=>(v(`Docker.isAvailable ok: ${e}`),!0)).catch(e=>(v(`Docker.isAvailable error: ${e}`),!1))}static async isDaemonRunning(){try{return await t.getExecOutput(["version"],{silent:!0}),!0}
Line truncated
|
|
|
|
|
`+t.errors.map(e=>` - ${e.message}`).join(`
|
|
|
|
|
`)}var Unt=class extends Error{constructor(t,e,r){super(Mnt(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},qnt=["method","baseUrl","url","headers","request","query","mediaType","operationName"],$nt=["query","method","url"],vAe=/\/api\/v3\/?$/;function Gnt(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 i in r)if($nt.includes(i))return Promise.reject(new Error(`[@octokit/graphql] "${i}" cannot be used as variable name`))}let n=typeof e=="string"?Object.assign({query:e},r):e,s=Object.keys(n).reduce((i,a)=>qnt.includes(a)?(i[a]=n[a],i):(i.variables||(i.variables={}),i.variables[a]=n[a],i),{}),o=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return vAe.test(o)&&(s.url=o.replace(vAe,"/api/graphql")),t(s).then(i=>{if(i.data.errors){let a={};for(let c of Object.keys(i.headers))a[c]=i.headers[c];throw new Unt(s,a,i.data)}return i.data.data})}function HH(t,e){let r=t.defaults(e);return Object.assign((s,o)=>Gnt(r,s,o),{defaults:HH.bind(null,r),endpoint:r.endpoint})}var c4t=HH(iC,{headers:{"user-agent":`octokit-graphql.js/${Fnt} ${Tu()}`},method:"POST",url:"/graphql"});function DAe(t){return HH(t,{method:"POST",url:"/graphql"})}var zH="(?:[a-zA-Z0-9_-]+)",kAe="\\.",LAe=new RegExp(`^${zH}${kAe}${zH}${kAe}${zH}$`),Hnt=LAe.test.bind(LAe);async function znt(t){let e=Hnt(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"}}function Vnt(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}async function Ynt(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=Vnt(t),e(s)}var OAe=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(znt.bind(null,e),{hook:Ynt.bind(null,e)})};var VH="7.0.6";var FAe=()=>{},jnt=console.warn.bind(console),Wnt=console.error.bind(console);function Jnt(t={}){return typeof t.debug!="function"&&(t.debug=FAe),typeof t.info!="function"&&(t.info=FAe),typeof t.warn!="function"&&(t.warn=jnt),typeof t.error!="function"&&(t.error=Wnt),t}var MAe=`octokit-core.js/${VH} ${Tu()}`,M0=class{static VERSION=VH;static defaults(e){return class extends this{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 plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new pAe.Collection,n={baseUrl:iC.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} ${MAe}`:MAe,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=iC.defaults(n),this.graphql=DAe(this.request).defaults(n),this.log=Jnt(e.log),this.hook=r,e.authStrategy){let{authStrategy:o,...i}=e,a=o(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:i},e.auth));r.wrap("request",a.hook),this.auth=a}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{let o=OAe(e.auth);r.wrap("request",o.hook),this.auth=o}let s=this.constructor;for(let o=0;o<s.plugins.length;++o)Object.assign(this,s.plugins[o](this,e))}request;graphql;log;hook;auth};var YH="17.0.0";var Knt={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"],createHostedRunnerForOrg:["POST /orgs/{org}/actions/hosted-runners"],createOrUpdateEnvironmentSecret:["PUT /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],createOrgVaria
Line truncated
|
|
|
|
|
More info: ${c.url}`);let A=c.range&&c.range.length>0?c.range[0]?.start.line:void 0,g=!1;for(let E of i)if(E.remote||E.path.endsWith(l)&&E.content===u){a.push({title:d,message:p,file:E.path,startLine:A}),g=!0;break}g||k(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${l}: ${d}`)}return a}};function jAe(){return{registry:Ti("registry"),username:Ti("username"),password:Ti("password"),scope:Ti("scope"),ecr:Ti("ecr"),logout:m7("logout"),registryAuth:Ti("registry-auth")}}function WAe(t){if(t.registryAuth&&(t.registry||t.username||t.password||t.scope||t.ecr))throw new Error("Cannot use registry-auth with other inputs");let e=[];if(t.registryAuth)e=Que(t.registryAuth).map(r=>{Zs(r.password);let n=r.registry||"docker.io";return{registry:n,username:r.username,password:r.password,scope:r.scope,ecr:r.ecr||"auto",configDir:q0(n,r.scope)}});else{let r=t.registry||"docker.io";e.push({registry:r,username:t.username,password:t.password,scope:t.scope,ecr:t.ecr||"auto",configDir:q0(r,t.scope)})}if(e.length==0)throw new Error("No registry to login");return e}function q0(t,e){if(ast()||!e||e==="")return"";let r=ZH.default.join(U0.configDir,"config",t==="docker.io"?"registry-1.docker.io":t);return e.startsWith("@")?r+=e:r=ZH.default.join(r,e),r}function ast(){return process.env.DOCKER_LOGIN_SCOPE_DISABLED?Ru.parseBool(process.env.DOCKER_LOGIN_SCOPE_DISABLED):!1}var UNe=S(h0e(),1),qNe=S(bNe(),1),n3=S(tc(),1);var SNe=S(require("net"),1),RNe=S(require("tls"),1),NNe=S(ap(),1),TNe=require("events");var xNe=S(require("net"),1),wNe=S(require("http"),1),BNe=require("https"),gc=Symbol("AgentBaseInternalState"),gv=class extends wNe.Agent{constructor(e){super(e),this[gc]={}}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 xNe.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)?BNe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},o=this.getName(s),i=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,s)).then(a=>{if(this.decrementSockets(o,i),typeof a.addRequest=="function")try{return a.addRequest(e,s)}catch(c){return n(c)}this[gc].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(o,i),n(a)})}createConnection(){let e=this[gc].currentSocket;if(this[gc].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[gc].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[gc]&&(this[gc].defaultPort=e)}get protocol(){return this[gc].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[gc]&&(this[gc].protocol=e)}};var t3=require("url"),Xg=(0,NNe.default)("http-proxy-agent"),sb=class extends gv{constructor(e,r){super(r),this.proxy=typeof e=="string"?new t3.URL(e):e,this.proxyHeaders=r?.headers??{},Xg("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?hTt(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:",o=e.getHeader("host")||"localhost",i=`${s}//${o}`,a=new t3.URL(e.path,i);r.port!==80&&(a.port=String(r.port)),e.path=String(a);let c=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders};if(n.username||n.password){let l=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;c["Proxy-Authorization"]=`Basic ${Buffer.from(l).toString("base64")}`}c["Proxy-Connection"]||(c["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let l of Object.keys(c)){let u=c[l];u&&e.setHeader(l,u)}}async connect(e,r){e._header=null,e.path.includes("://")||this.setRequestProps(e,r);let n,s;Xg("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Xg("Patching connection write() output buffer with updated header"),n=e.outputData[0].data,s=n.indexOf(`\r
|
|
|
|
|
`)}i(zIt,"_buildMessageForResponseErrors");var VIt=class extends Error{static{i(this,"GraphqlResponseError")}constructor(t,e,r){super(zIt(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},WIt=["method","baseUrl","url","headers","request","query","mediaType","operationName"],YIt=["query","method","url"],UIe=/\/api\/v3\/?$/;function JIt(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(YIt.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)=>WIt.includes(c)?(a[c]=n[c],a):(a.variables||(a.variables={}),a.variables[c]=n[c],a),{}),o=n.baseUrl||t.endpoint.DEFAULTS.baseUrl;return UIe.test(o)&&(s.url=o.replace(UIe,"/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 VIt(s,c,a.data)}return a.data.data})}i(JIt,"graphql");function rY(t,e){let r=t.defaults(e);return Object.assign(i((s,o)=>JIt(r,s,o),"newApi"),{defaults:rY.bind(null,r),endpoint:r.endpoint})}i(rY,"withDefaults");var OCr=rY(cw,{headers:{"user-agent":`octokit-graphql.js/${$It} ${yd()}`},method:"POST",url:"/graphql"});function qIe(t){return rY(t,{method:"POST",url:"/graphql"})}i(qIe,"withCustomRequest");var nY="(?:[a-zA-Z0-9_-]+)",GIe="\\.",HIe=new RegExp(`^${nY}${GIe}${nY}${GIe}${nY}$`),jIt=HIe.test.bind(HIe);async function KIt(t){let e=jIt(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"}}i(KIt,"auth");function XIt(t){return t.split(/\./).length===3?`bearer ${t}`:`token ${t}`}i(XIt,"withAuthorizationPrefix");async function ZIt(t,e,r,n){let s=e.endpoint.merge(r,n);return s.headers.authorization=XIt(t),e(s)}i(ZIt,"hook");var $Ie=i(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(KIt.bind(null,e),{hook:ZIt.bind(null,e)})},"createTokenAuth2");var sY="7.0.6";var zIe=i(()=>{},"noop"),ewt=console.warn.bind(console),twt=console.error.bind(console);function rwt(t={}){return typeof t.debug!="function"&&(t.debug=zIe),typeof t.info!="function"&&(t.info=zIe),typeof t.warn!="function"&&(t.warn=ewt),typeof t.error!="function"&&(t.error=twt),t}i(rwt,"createLogger");var VIe=`octokit-core.js/${sY} ${yd()}`,pP=class{static{i(this,"Octokit")}static VERSION=sY;static defaults(e){return class extends this{static{i(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{i(this,"NewOctokit")}static plugins=r.concat(e.filter(s=>!r.includes(s)))}}constructor(e={}){let r=new EIe.Collection,n={baseUrl:cw.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} ${VIe}`:VIe,e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=cw.defaults(n),this.graphql=qIe(this.request).defaults(n),this.log=rwt(e.log),this.hook=r,e.authStrategy){let{authStrategy:o,...a}=e,c=o(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 o=$Ie(e.auth);r.wrap("request",o.hook),this.auth=o}let s=this.constructor;for(let o=0;o<s.plugins.length;++o)Object.assign(this,s.plugins[o](this,e))}request;graphql;log;hook;auth};var oY="17.0.0";var nwt={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,A=!1;for(let h of a)if(h.remote||h.path.endsWith(u)&&h.content===d){c.push({title:p,message:m,file:h.path,startLine:f}),A=!0;break}A||v(`Buildx.convertWarningsToGitHubAnnotations: skipping warning without matching Dockerfile ${u}: ${p}`)}return c}};function twe(){return{registry:_i("registry"),username:_i("username"),password:_i("password"),scope:_i("scope"),ecr:_i("ecr"),logout:roe("logout"),registryAuth:_i("registry-auth")}}i(twe,"getInputs");function rwe(t){if(t.registryAuth&&(t.registry||t.username||t.password||t.scope||t.ecr))throw new Error("Cannot use registry-auth with other inputs");let e=[];if(t.registryAuth)e=Vhe(t.registryAuth).map(r=>{r.password&&xn(r.password);let n=r.registry||"docker.io";return{registry:n,username:r.username,password:r.password,scope:r.scope,ecr:r.ecr||"auto",configDir:fP(n,r.scope)}});else{let r=t.registry||"docker.io";e.push({registry:r,username:t.username,password:t.password,scope:t.scope,ecr:t.ecr||"auto",configDir:fP(r,t.scope)})}if(e.length==0)throw new Error("No registry to login");return e}i(rwe,"getAuthList");function fP(t,e){if(mwt()||!e||e==="")return"";let r=dY.default.join(mP.configDir,"config",t==="docker.io"?"registry-1.docker.io":t);return e.startsWith("@")?r+=e:r=dY.default.join(r,e),r}i(fP,"scopeToConfigDir");function mwt(){return process.env.DOCKER_LOGIN_SCOPE_DISABLED?hd.parseBool(process.env.DOCKER_LOGIN_SCOPE_DISABLED):!1}i(mwt,"scopeDisabled");var Jqe=R(tUe(),1),jqe=R(_qe(),1),z9=R(lu(),1);var Oqe=R(require("net"),1),Mqe=R(require("tls"),1),Fqe=R(nm(),1),Uqe=require("events");var Dqe=R(require("net"),1),kqe=R(require("http"),1),Lqe=require("https");var al=Symbol("AgentBaseInternalState"),aM=class extends kqe.Agent{static{i(this,"Agent")}constructor(e){super(e),this[al]={}}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 Dqe.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)?Lqe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},o=this.getName(s),a=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(o,a),typeof c.addRequest=="function")try{return c.addRequest(e,s)}catch(l){return n(l)}this[al].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(o,a),n(c)})}createConnection(){let e=this[al].currentSocket;if(this[al].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[al].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[al]&&(this[al].defaultPort=e)}get protocol(){return this[al].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[al]&&(this[al].protocol=e)}};var G9=require("url");function cM(){return async({response:t,scheme:e})=>{if(e.toLowerCase()!=="negotiate")throw new Error(`Expected Negotiate scheme but got "${e}"`);let r;try{r=await import("kerberos")}catch{throw new Error('The "kerberos" package is required for Negotiate proxy authentication. Install it with: npm install kerberos')}let n=t.headers["proxy-authenticate"]||"",s=Array.isArray(n)?n[0]:n,o=typeof s=="string"&&s.includes(" ")?s.split(" ").slice(1).join(" "):void 0,c=await(await r.initializeClient("HTTP@proxy",{mechOID:r.GSS_MECH_OID_SPNEGO})).step(o||"");if(!c)throw new Error("Kerberos client.step() returned no token");return{headers:{"Proxy-Authorization":`Negotiate ${c}`}}}}i(cM,"createNegotiateAuth");var Dy=(0,Fqe.default)("http-proxy-agent"),Px=class extends aM{static{i(this,"HttpProxyAgent")}constructor(e,r){super(r),this.proxy=typeof e=="string"?new G9.URL(e):e,this.proxyHeaders=r?.headers??{},Dy("Creating new HttpProxyAgent instance: %o",this.proxy.href),r?.negotiate?this.onProxyAuth=cM():r?.onProxyAuth&&(this.onProxyAuth=r.onProxyAuth);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?OGt(r,"headers","onProxyAuth","negotiate"):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:",o=e.getHeader("host")||"localhost",a=`${s}//${o}`,c=new G9.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;Dy("Regenerating stored HTTP header string for request"),e._implicitHeader(),e.outputData&&e.outputData.length>0&&(Dy("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),Xg("Output buffer: %o",e.outputData[0].data));let o;return this.proxy.protocol==="https:"?(Xg("Creating `tls.Socket`: %o",this.connectOpts),o=RNe.connect(this.connectOpts)):(Xg("Creating `net.Socket`: %o",this.connectOpts),o=SNe.connect(this.connectOpts)),await(0,TNe.once)(o,"connect"),o}};sb.protocols=["http","https"];function hTt(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}var yd=S(require("net"),1),r3=S(require("tls"),1),ONe=S(require("assert"),1),FNe=S(ap(),1);var PNe=S(require("net"),1),QNe=S(require("http"),1),_Ne=require("https"),hc=Symbol("AgentBaseInternalState"),hv=class extends QNe.Agent{constructor(e){super(e),this[hc]={}}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 PNe.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)?_Ne.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},o=this.getName(s),i=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,s)).then(a=>{if(this.decrementSockets(o,i),typeof a.addRequest=="function")try{return a.addRequest(e,s)}catch(c){return n(c)}this[hc].currentSocket=a,super.createSocket(e,r,n)},a=>{this.decrementSockets(o,i),n(a)})}createConnection(){let e=this[hc].currentSocket;if(this[hc].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[hc].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[hc]&&(this[hc].defaultPort=e)}get protocol(){return this[hc].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[hc]&&(this[hc].protocol=e)}};var MNe=require("url");var vNe=S(ap(),1),yv=(0,vNe.default)("https-proxy-agent:parse-proxy-response");function DNe(t){return new Promise((e,r)=>{let n=0,s=[];function o(){let u=t.read();u?l(u):t.once("readable",o)}function i(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",o)}function a(){i(),yv("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function c(u){i(),yv("onerror %o",u),r(u)}function l(u){s.push(u),n+=u.length;let d=Buffer.concat(s,n),p=d.indexOf(`\r
|
|
|
|
|
`)+4,e.outputData[0].data=e._header+n.substring(s),Dy("Output buffer: %o",e.outputData[0].data));let o;this.proxy.protocol==="https:"?(Dy("Creating `tls.Socket`: %o",this.connectOpts),o=Mqe.connect(this.connectOpts)):(Dy("Creating `net.Socket`: %o",this.connectOpts),o=Oqe.connect(this.connectOpts)),await(0,Uqe.once)(o,"connect");let a={socket:o};return e.emit("proxyConnect",a),this.emit("proxyConnect",a,e),e.emit("proxy",{proxy:this.proxy.href,socket:o}),o}};Px.protocols=["http","https"];function OGt(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i(OGt,"omit");var ll=R(require("net"),1),Qx=R(require("tls"),1),Vqe=R(require("assert"),1),Wqe=R(nm(),1);var qqe=R(require("net"),1),Gqe=R(require("http"),1),Hqe=require("https");var cl=Symbol("AgentBaseInternalState"),lM=class extends Gqe.Agent{static{i(this,"Agent")}constructor(e){super(e),this[cl]={}}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 qqe.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)?Hqe.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,r,n){let s={...r,secureEndpoint:this.isSecureEndpoint(r)},o=this.getName(s),a=this.incrementSockets(o);Promise.resolve().then(()=>this.connect(e,s)).then(c=>{if(this.decrementSockets(o,a),typeof c.addRequest=="function")try{return c.addRequest(e,s)}catch(l){return n(l)}this[cl].currentSocket=c,super.createSocket(e,r,n)},c=>{this.decrementSockets(o,a),n(c)})}createConnection(){let e=this[cl].currentSocket;if(this[cl].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[cl].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[cl]&&(this[cl].defaultPort=e)}get protocol(){return this[cl].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[cl]&&(this[cl].protocol=e)}};var Yqe=require("url");var $qe=R(nm(),1);var uM=(0,$qe.default)("https-proxy-agent:parse-proxy-response");function H9(t){return new Promise((e,r)=>{let n=0,s=[];function o(){let d=t.read();d?u(d):t.once("readable",o)}i(o,"read");function a(){t.removeListener("end",c),t.removeListener("error",l),t.removeListener("readable",o)}i(a,"cleanup");function c(){a(),uM("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}i(c,"onend");function l(d){a(),uM("onerror %o",d),r(d)}i(l,"onerror");function u(d){s.push(d),n+=d.length;let p=Buffer.concat(s,n),m=p.indexOf(`\r
|
|
|
|
|
\r
|
|
|
|
|
`);if(p===-1){yv("have not received end of HTTP headers yet..."),o();return}let A=d.slice(0,p).toString("ascii").split(`\r
|
|
|
|
|
`),g=A.shift();if(!g)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let E=g.split(" "),I=+E[1],x=E.slice(2).join(" "),b={};for(let P of A){if(!P)continue;let v=P.indexOf(":");if(v===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${P}"`));let F=P.slice(0,v).toLowerCase(),q=P.slice(v+1).trimStart(),X=b[F];typeof X=="string"?b[F]=[X,q]:Array.isArray(X)?X.push(q):b[F]=q}yv("got proxy server response: %o %o",g,b),i(),e({connect:{statusCode:I,statusText:x,headers:b},buffered:d})}t.on("error",c),t.on("end",a),o()})}var ob=(0,FNe.default)("https-proxy-agent"),kNe=t=>t.servername===void 0&&t.host&&!yd.isIP(t.host)?{...t,servername:t.host}:t,ib=class extends hv{constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new MNe.URL(e):e,this.proxyHeaders=r?.headers??{},ob("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?LNe(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:"?(ob("Creating `tls.Socket`: %o",this.connectOpts),s=r3.connect(kNe(this.connectOpts))):(ob("Creating `net.Socket`: %o",this.connectOpts),s=yd.connect(this.connectOpts));let o=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},i=yd.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${i}:${r.port} HTTP/1.1\r
|
|
|
|
|
`;if(n.username||n.password){let p=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}o.Host=`${i}:${r.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(o))a+=`${p}: ${o[p]}\r
|
|
|
|
|
`;let c=DNe(s);s.write(`${a}\r
|
|
|
|
|
`);let{connect:l,buffered:u}=await c;if(e.emit("proxyConnect",l),this.emit("proxyConnect",l,e),l.statusCode===200)return e.once("socket",yTt),r.secureEndpoint?(ob("Upgrading socket connection to TLS"),r3.connect({...LNe(kNe(r),"host","path","port"),socket:s})):s;s.destroy();let d=new yd.Socket({writable:!1});return d.readable=!0,e.once("socket",p=>{ob("Replaying proxy buffer for failed request"),(0,ONe.default)(p.listenerCount("data")>0),p.push(u),p.push(null)}),d}};ib.protocols=["http","https"];function yTt(t){t.resume()}function LNe(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}var s3=/^(([0-9]{12})\.(dkr\.ecr|dkr-ecr)\.(.+)\.(on\.aws|amazonaws\.(com(.cn)?|eu)))(\/([^:]+)(:.+)?)?$/,ETt=/public\.ecr\.aws|ecr-public\.aws\.com/,$Ne=t=>s3.test(t)||Ev(t),Ev=t=>ETt.test(t),CTt=t=>{if(Ev(t))return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1";let e=t.match(s3);return e?e[4]:""},ITt=t=>{if(Ev(t))return[];let e=t.match(s3);if(!e)return[];let r=[e[2]];return process.env.AWS_ACCOUNT_IDS&&r.push(...process.env.AWS_ACCOUNT_IDS.split(",")),r.filter((n,s)=>r.indexOf(n)===s)},GNe=async(t,e,r)=>{let n=CTt(t),s=ITt(t),o={};s.length>0&&(k(`Requesting AWS ECR auth token for ${s.join(", ")}`),o.registryIds=s);let i,a=process.env.http_proxy||process.env.HTTP_PROXY||"";a&&(k(`Using http proxy ${a}`),i=new sb(a));let c,l=process.env.https_proxy||process.env.HTTPS_PROXY||"";l&&(k(`Using https proxy ${l}`),c=new ib(l));let u=e&&r?{accessKeyId:e,secretAccessKey:r}:void 0;if(Ev(t)){Ue(`AWS Public ECR detected with ${n} region`);let p=await new qNe.ECRPUBLIC({customUserAgent:"docker-login-action",credentials:u,region:n,requestHandler:new n3.NodeHttpHandler({httpAgent:i,httpsAgent:c})}).getAuthorizationToken(o);if(!p.authorizationData||!p.authorizationData.authorizationToken)throw new Error("Could not retrieve an authorization token from AWS Public ECR");let g=Buffer.from(p.authorizationData.authorizationToken,"base64").toString("utf-8").split(":",2);return Zs(g[0]),Zs(g[1]),[{registry:"public.ecr.aws",username:g[0],password:g[1]}]}else{Ue(`AWS ECR detected with ${n} region`);let p=await new UNe.ECR({customUserAgent:"docker-login-action",credentials:u,region:n,requestHandler:new n3.NodeHttpHandler({httpAgent:i,httpsAgent:c})}).getAuthorizationToken(o);if(!Array.isArray(p.authorizationData)||!p.authorizationData.length)throw new Error("Could not retrieve an authorization token from AWS ECR");let A=[];for(let g of p.authorizationData){let I=Buffer.from(g.authorizationToken||"","base64").toString("utf-8").split(":",2);Zs(I[0]),Zs(I[1]),A.push({registry:g.proxyEndpoint||"",username:I[0],password:I[1]})}return A}};async function o3(t){/true/i.test(t.ecr)||t.ecr=="auto"&&$Ne(t.registry)?await wTt(t.registry,t.username,t.password,t.scope):await xTt(t.registry,t.username,t.password,t.scope)}async function HNe(t,e){let r;e!==""&&(r=Object.assign({},process.env,{DOCKER_CONFIG:e}),Ue(`Alternative config dir: ${e}`)),await Nu.getExecOutput(["logout",t],{ignoreReturnCode:!0,env:r}).then(n=>{n.stderr.length>0&&n.exitCode!=0&&Rr(n.stderr.trim())})}async function xTt(t,e,r,n){if(!e&&!r)throw new Error("Username and password required");if(!e)throw new Error("Username required");if(!r)throw new Error("Password required");await zNe(t,e,r,n)}async function wTt(t,e,r,n){Ue("Retrieving registries data through AWS SDK...");let s=await GNe(t,e,r);for(let o of s)await zNe(o.registry,o.username,o.password,n)}async function zNe(t,e,r,n){let s,o=q0(t,n);o!==""?(s=Object.assign({},process.env,{DOCKER_CONFIG:o}),Ue(`Logging into ${t} (scope ${n})...`)):Ue(`Logging into ${t}...`),await Nu.getExecOutput(["login","--password-stdin","--username",e,t],{ignoreReturnCode:!0,silent:!0,input:Buffer.from(r),env:s}).then(i=>{if(i.stderr.length>0&&i.exitCode!=0)throw new Error(i.stderr.trim());Ue("Login Succeeded!")})}var VNe=process.env.STATE_registries?JSON.parse(process.env.STATE_registries):[],YNe=/true/i.test(process.env.STATE_logout||"");function jNe(t){jd("registries",JSON.stringify(t))}function WNe(t){jd("logout",t)}async function JNe(){let t=jAe();WNe(t.logout);let e=WAe(t);if(jNe(Array.from(new Map(e.map(r=>[`${r.registry}|${r.configDir}`,{registry:r.registry,configDir:r.configDir}])).values())),e.length===1){await o3(e[0]);return}for(let r of e)await ny(`Login to ${r.registry}`,async()=>{await o3(r)})}async function RTt(){if(YNe)for(let t of VNe)await ny(`Logout from ${t.registry}`,async()=>{await HNe(t.registry,t.configDir)})}Gle(JNe,RTt);0&&(module.exports={main});
|
|
|
|
|
`);if(m===-1){uM("have not received end of HTTP headers yet..."),o();return}let f=p.slice(0,m).toString("ascii").split(`\r
|
|
|
|
|
`),A=f.shift();if(!A)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let h=A.split(" "),E=+h[1],C=h.slice(2).join(" "),w={};for(let x of f){if(!x)continue;let b=x.indexOf(":");if(b===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${x}"`));let N=x.slice(0,b).toLowerCase(),P=x.slice(b+1).trimStart(),_=w[N];typeof _=="string"?w[N]=[_,P]:Array.isArray(_)?_.push(P):w[N]=P}uM("got proxy server response: %o %o",A,w),a(),e({connect:{statusCode:E,statusText:C,headers:w},buffered:p})}i(u,"ondata"),t.on("error",l),t.on("end",c),o()})}i(H9,"parseProxyResponse");var kf=(0,Wqe.default)("https-proxy-agent"),dM=i(t=>t.servername===void 0&&t.host&&!ll.isIP(t.host)?{...t,servername:t.host}:t,"setServernameFromNonIpHost"),_x=class extends lM{static{i(this,"HttpsProxyAgent")}constructor(e,r){super(r),this.options={path:void 0},this.proxy=typeof e=="string"?new Yqe.URL(e):e,this.proxyHeaders=r?.headers??{},kf("Creating new HttpsProxyAgent instance: %o",this.proxy.href),r?.negotiate?this.onProxyAuth=cM():r?.onProxyAuth&&(this.onProxyAuth=r.onProxyAuth);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?$9(r,"headers","onProxyAuth","negotiate"):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:"?(kf("Creating `tls.Socket`: %o",this.connectOpts),s=Qx.connect(dM(this.connectOpts))):(kf("Creating `net.Socket`: %o",this.connectOpts),s=ll.connect(this.connectOpts));let o=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},a=ll.isIPv6(r.host)?`[${r.host}]`:r.host,c=`CONNECT ${a}:${r.port} HTTP/1.1\r
|
|
|
|
|
`;if(n.username||n.password){let m=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(m).toString("base64")}`}o.Host=`${a}:${r.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let m of Object.keys(o))c+=`${m}: ${o[m]}\r
|
|
|
|
|
`;let l=H9(s);s.write(`${c}\r
|
|
|
|
|
`);let{connect:u,buffered:d}=await l;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),e.emit("proxy",{proxy:this.proxy.href,socket:s}),u.statusCode===200)return e.once("socket",zqe),r.secureEndpoint?(kf("Upgrading socket connection to TLS"),Qx.connect({...$9(dM(r),"host","path","port"),socket:s})):s;if(u.statusCode===407&&this.onProxyAuth){kf("Got 407 response, invoking onProxyAuth callback"),s.destroy();let m=u.headers["proxy-authenticate"]||"",f=Array.isArray(m)?m[0].split(/\s/)[0]:m.split(/\s/)[0],A=await this.onProxyAuth({response:u,scheme:f});return this._connectWithAuth(e,r,A.headers)}s.destroy();let p=new ll.Socket({writable:!1});return p.readable=!0,e.once("socket",m=>{kf("Replaying proxy buffer for failed request"),(0,Vqe.default)(m.listenerCount("data")>0),m.push(d),m.push(null)}),p}async _connectWithAuth(e,r,n){let{proxy:s}=this,o;s.protocol==="https:"?o=Qx.connect(dM(this.connectOpts)):o=ll.connect(this.connectOpts);let a=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},c=ll.isIPv6(r.host)?`[${r.host}]`:r.host,l=`CONNECT ${c}:${r.port} HTTP/1.1\r
|
|
|
|
|
`;if(s.username||s.password){let p=`${decodeURIComponent(s.username)}:${decodeURIComponent(s.password)}`;a["Proxy-Authorization"]=`Basic ${Buffer.from(p).toString("base64")}`}Object.assign(a,n),a.Host=`${c}:${r.port}`,a["Proxy-Connection"]||(a["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let p of Object.keys(a))l+=`${p}: ${a[p]}\r
|
|
|
|
|
`;let u=H9(o);o.write(`${l}\r
|
|
|
|
|
`);let{connect:d}=await u;if(e.emit("proxyConnect",d),this.emit("proxyConnect",d,e),d.statusCode===200)return e.once("socket",zqe),r.secureEndpoint?(kf("Upgrading socket connection to TLS"),Qx.connect({...$9(dM(r),"host","path","port"),socket:o})):o;throw o.destroy(),new Error(`Proxy authentication failed with status ${d.statusCode} after retry`)}};_x.protocols=["http","https"];function zqe(t){setImmediate(()=>{t.resume()})}i(zqe,"resume");function $9(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}i($9,"omit");var V9=/^(([0-9]{12})\.(dkr\.ecr|dkr-ecr)\.(.+)\.(on\.aws|amazonaws\.(com(.cn)?|eu)))(\/([^:]+)(:.+)?)?$/,MGt=/public\.ecr\.aws|ecr-public\.aws\.com/,Kqe=i(t=>V9.test(t)||pM(t),"isECR"),pM=i(t=>MGt.test(t),"isPubECR"),FGt=i(t=>{if(pM(t))return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||"us-east-1";let e=t.match(V9);return e?e[4]:""},"getRegion"),UGt=i(t=>{if(pM(t))return[];let e=t.match(V9);if(!e)return[];let r=[e[2]];return process.env.AWS_ACCOUNT_IDS&&r.push(...process.env.AWS_ACCOUNT_IDS.split(",")),r.filter((n,s)=>r.indexOf(n)===s)},"getAccountIDs"),Xqe=i(async(t,e,r)=>{let n=FGt(t),s=UGt(t),o={};s.length>0&&(v(`Requesting AWS ECR auth token for ${s.join(", ")}`),o.registryIds=s);let a,c=process.env.http_proxy||process.env.HTTP_PROXY||"";c&&(v(`Using http proxy ${c}`),a=new Px(c));let l,u=process.env.https_proxy||process.env.HTTPS_PROXY||"";u&&(v(`Using https proxy ${u}`),l=new _x(u));let d=e&&r?{accessKeyId:e,secretAccessKey:r}:void 0;if(pM(t)){be(`AWS Public ECR detected with ${n} region`);let m=await new jqe.ECRPUBLIC({customUserAgent:"docker-login-action",credentials:d,region:n,requestHandler:new z9.NodeHttpHandler({httpAgent:a,httpsAgent:l})}).getAuthorizationToken(o);if(!m.authorizationData||!m.authorizationData.authorizationToken)throw new Error("Could not retrieve an authorization token from AWS Public ECR");let A=Buffer.from(m.authorizationData.authorizationToken,"base64").toString("utf-8").split(":",2);return xn(A[0]),xn(A[1]),[{registry:"public.ecr.aws",username:A[0],password:A[1]}]}else{be(`AWS ECR detected with ${n} region`);let m=await new Jqe.ECR({customUserAgent:"docker-login-action",credentials:d,region:n,requestHandler:new z9.NodeHttpHandler({httpAgent:a,httpsAgent:l})}).getAuthorizationToken(o);if(!Array.isArray(m.authorizationData)||!m.authorizationData.length)throw new Error("Could not retrieve an authorization token from AWS ECR");let f=[];for(let A of m.authorizationData){let E=Buffer.from(A.authorizationToken||"","base64").toString("utf-8").split(":",2);xn(E[0]),xn(E[1]),f.push({registry:A.proxyEndpoint||"",username:E[0],password:E[1]})}return f}},"getRegistriesData");var Zqe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function GGt(t){return typeof t=="string"&&Zqe.test(t)}i(GGt,"validate");var W9=GGt;var HGt=300,eGe=300,tGe=3600,rGe=5,nGe=i((t,e)=>process.env.DOCKERHUB_OIDC_CONNECTIONID!==void 0&&!e&&$Gt(t),"isDockerHubOIDC"),$Gt=i(t=>t===""||t==="docker.io"||t==="registry-1.docker.io"||t==="registry-1-stage.docker.io","isDockerHubRegistry"),sGe=i(async(t,e)=>{let r=process.env.DOCKERHUB_OIDC_CONNECTIONID?.trim();if(!r)throw new Error("DOCKERHUB_OIDC_CONNECTIONID is required for Docker Hub OIDC login");if(!W9(r))throw new Error("Invalid DOCKERHUB_OIDC_CONNECTIONID. Must be a valid UUID.");let n=zGt(),s=t==="registry-1-stage.docker.io"?"identity-stage.docker.com":"identity.docker.com",o=`https://${s}`,a=await ooe(o),c=new so("github.com/docker/login-action",[],{headers:{"Content-Type":"application/x-www-form-urlencoded"}}),l=new URLSearchParams;l.set("grant_type","urn:ietf:params:oauth:grant-type:token-exchange"),l.set("subject_token_type","urn:ietf:params:oauth:token-type:id_token"),l.set("subject_token",a),l.set("connection_id",r),l.set("expires_in",n.toString());let u=await VGt(c,`https://${s}/oauth/token`,l.toString()),d=JSON.parse(await YGt(u));return xn(d.access_token),{username:e,token:d.access_token}},"getOIDCToken"),zGt=i(()=>{let t=process.env.DOCKERHUB_OIDC_EXPIREIN?.trim()||HGt.toString(),e=Number(t);if(isNaN(e)||e<eGe||e>tGe)throw new Error(`Invalid DOCKERHUB_OIDC_EXPIREIN: ${t}. Must be between ${eGe} and ${tGe}`);return e},"getExpiresIn"),VGt=i(async(t,e,r)=>{let n=await t.post(e,r);for(let s=0;(n.message.statusCode||ft.InternalServerError)===ft.TooManyRequests&&s<rGe;s++){let o=WGt(n.message.headers["retry-after"]);if(o===null)break;await n.readBody(),be(`Docker Hub OIDC token request rate limited, retrying in ${o}ms (attempt ${s+1}/${rGe})`),await new Promise(a=>setTimeout(a,o)),n=await t.post(e,r)}return n},"postWithRetry"),WGt=i(t=>{if(t===void 0)return null;Array.isArray(t)&&(t=t[0]);let e=Number(t);return isNaN(e)?null:Math.max(0,e*1e3)},"parseRetryAfter"),YGt=i(async t=>{let e=await t.readBody(),r=t.message.statusCode||ft.InternalServerError;if(r<ft.OK||r>=ft.MultipleChoices)throw JGt(r,e);return e},"handleResp
Line truncated
|
|
|
|
|
/*! Bundled license information:
|
|
|
|
|
|
|
|
|
|
undici/lib/web/fetch/body.js:
|
|
|
|
@@ -224,7 +239,7 @@ tmp/lib/tmp.js:
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
js-yaml/dist/js-yaml.mjs:
|
|
|
|
|
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
|
|
|
(*! js-yaml 5.2.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
|
|
|
|
|
|
|
|
@octokit/request-error/dist-src/index.js:
|
|
|
|
|
(* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist *)
|
|
|
|
|